summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/3rdparty/harfbuzz/src/harfbuzz-thai.c2
-rw-r--r--src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h10
-rw-r--r--src/3rdparty/libconninet.pri18
-rw-r--r--src/3rdparty/libconninet/AUTHORS0
-rw-r--r--src/3rdparty/libconninet/COPYING510
-rw-r--r--src/3rdparty/libconninet/ChangeLog0
-rw-r--r--src/3rdparty/libconninet/INSTALL229
-rw-r--r--src/3rdparty/libconninet/Makefile.am49
-rw-r--r--src/3rdparty/libconninet/NEWS0
-rw-r--r--src/3rdparty/libconninet/README0
-rwxr-xr-xsrc/3rdparty/libconninet/autogen.sh3
-rwxr-xr-xsrc/3rdparty/libconninet/config.guess1533
-rwxr-xr-xsrc/3rdparty/libconninet/config.sub1693
-rw-r--r--src/3rdparty/libconninet/configure.ac90
-rw-r--r--src/3rdparty/libconninet/conninet.pc.in11
-rw-r--r--src/3rdparty/libconninet/debian/changelog285
-rw-r--r--src/3rdparty/libconninet/debian/compat1
-rw-r--r--src/3rdparty/libconninet/debian/control39
-rw-r--r--src/3rdparty/libconninet/debian/copyright19
-rw-r--r--src/3rdparty/libconninet/debian/libconninet0-dev.dirs2
-rw-r--r--src/3rdparty/libconninet/debian/libconninet0-dev.files4
-rw-r--r--src/3rdparty/libconninet/debian/libconninet0.dirs1
-rw-r--r--src/3rdparty/libconninet/debian/libconninet0.files1
-rwxr-xr-xsrc/3rdparty/libconninet/debian/rules123
-rw-r--r--src/3rdparty/libconninet/doxygen.cfg.in1147
-rw-r--r--src/3rdparty/libconninet/src/Makefile.am36
-rw-r--r--src/3rdparty/libconninet/src/dbusdispatcher.cpp611
-rw-r--r--src/3rdparty/libconninet/src/dbusdispatcher.h91
-rw-r--r--src/3rdparty/libconninet/src/iapconf.cpp299
-rw-r--r--src/3rdparty/libconninet/src/iapconf.h84
-rw-r--r--src/3rdparty/libconninet/src/iapmonitor.cpp110
-rw-r--r--src/3rdparty/libconninet/src/iapmonitor.h48
-rw-r--r--src/3rdparty/libconninet/src/maemo_icd.cpp1277
-rw-r--r--src/3rdparty/libconninet/src/maemo_icd.h182
-rw-r--r--src/3rdparty/libconninet/src/proxyconf.cpp315
-rw-r--r--src/3rdparty/libconninet/src/proxyconf.h53
-rw-r--r--src/3rdparty/libconninet/tests/Makefile.am39
-rw-r--r--src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp191
-rw-r--r--src/3rdparty/libconninet/tests/ut_iapconf.cpp186
-rw-r--r--src/3rdparty/libconninet/tests/ut_iapmonitor.cpp118
-rw-r--r--src/3rdparty/libconninet/tests/ut_maemo_icd.cpp274
-rw-r--r--src/3rdparty/libconninet/tests/ut_proxyconf.cpp400
-rw-r--r--src/3rdparty/libgq.pri9
-rw-r--r--src/3rdparty/libgq/.gitignore37
-rw-r--r--src/3rdparty/libgq/Makefile.am4
-rw-r--r--src/3rdparty/libgq/README6
-rwxr-xr-xsrc/3rdparty/libgq/autogen.sh2
-rw-r--r--src/3rdparty/libgq/configure.ac23
-rw-r--r--src/3rdparty/libgq/debian/README.scratchbox28
-rw-r--r--src/3rdparty/libgq/debian/changelog31
-rw-r--r--src/3rdparty/libgq/debian/compat1
-rw-r--r--src/3rdparty/libgq/debian/control43
-rw-r--r--src/3rdparty/libgq/debian/copyright8
-rwxr-xr-xsrc/3rdparty/libgq/debian/fixup-scratchbox79
-rw-r--r--src/3rdparty/libgq/debian/libgq-gconf-dev.install5
-rw-r--r--src/3rdparty/libgq/debian/libgq-gconf-doc.install1
-rw-r--r--src/3rdparty/libgq/debian/libgq-gconf0.install1
-rw-r--r--src/3rdparty/libgq/debian/maemo-sanitize0
-rwxr-xr-xsrc/3rdparty/libgq/debian/rules32
-rw-r--r--src/3rdparty/libgq/gconf/Doxyfile1514
-rw-r--r--src/3rdparty/libgq/gconf/GConfItem1
-rw-r--r--src/3rdparty/libgq/gconf/Makefile.am37
-rw-r--r--src/3rdparty/libgq/gconf/gconfitem.cpp376
-rw-r--r--src/3rdparty/libgq/gconf/gconfitem.h147
-rw-r--r--src/3rdparty/libgq/gconf/gq-gconf.pc.in11
-rwxr-xr-xsrc/3rdparty/libgq/gconf/run-test-gconf49
-rw-r--r--src/3rdparty/libgq/gconf/test-gconf.cpp299
-rw-r--r--src/3rdparty/libgq/gconf/test-gconf.h86
-rw-r--r--src/3rdparty/libjpeg/ansi2knr.136
-rw-r--r--src/3rdparty/libjpeg/ansi2knr.c739
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.cpp28
-rw-r--r--src/3rdparty/phonon/mmf/abstractmediaplayer.h6
-rw-r--r--src/3rdparty/phonon/mmf/abstractplayer.h4
-rw-r--r--src/3rdparty/phonon/mmf/abstractvideoplayer.cpp6
-rw-r--r--src/3rdparty/phonon/mmf/abstractvideoplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/audioplayer.cpp6
-rw-r--r--src/3rdparty/phonon/mmf/audioplayer.h1
-rw-r--r--src/3rdparty/phonon/mmf/dummyplayer.cpp2
-rw-r--r--src/3rdparty/phonon/mmf/dummyplayer.h2
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.cpp75
-rw-r--r--src/3rdparty/phonon/mmf/mediaobject.h11
-rw-r--r--src/3rdparty/phonon/phonon/mediasource.cpp3
-rw-r--r--src/3rdparty/sqlite.pri4
-rw-r--r--src/3rdparty/webkit/.tag2
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/ChangeLog87
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp16
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp43
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h4
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp6
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h1
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp2
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog246
-rw-r--r--src/3rdparty/webkit/WebCore/WebCore.pro12
-rw-r--r--src/3rdparty/webkit/WebCore/dom/CharacterData.cpp8
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.cpp17
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Element.h4
-rw-r--r--src/3rdparty/webkit/WebCore/dom/Text.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp11
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/text/BidiResolver.h67
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp6
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h3
-rw-r--r--src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGElement.cpp9
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp4
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog80
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp12
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp2
-rw-r--r--src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri1
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp28
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp3
-rw-r--r--src/corelib/concurrent/qtconcurrentexception.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentmap.cpp2
-rw-r--r--src/corelib/corelib.pro15
-rw-r--r--src/corelib/global/qglobal.cpp55
-rw-r--r--src/corelib/global/qglobal.h8
-rw-r--r--src/corelib/global/qnamespace.h3
-rw-r--r--src/corelib/global/qnamespace.qdoc5
-rw-r--r--src/corelib/io/qabstractfileengine.cpp6
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp4
-rw-r--r--src/corelib/io/qiodevice_p.h2
-rw-r--r--src/corelib/io/qprocess.cpp4
-rw-r--r--src/corelib/io/qtextstream.cpp2
-rw-r--r--src/corelib/kernel/qabstractitemmodel.cpp16
-rw-r--r--src/corelib/kernel/qeventdispatcher_glib.cpp6
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp2
-rw-r--r--src/corelib/kernel/qmetatype.cpp2
-rw-r--r--src/corelib/plugin/quuid.cpp31
-rw-r--r--src/corelib/tools/qbytearray.cpp8
-rw-r--r--src/corelib/tools/qbytearraymatcher.cpp2
-rw-r--r--src/corelib/tools/qlocale.cpp1
-rw-r--r--src/corelib/tools/qsharedpointer.cpp2
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h31
-rw-r--r--src/corelib/tools/qsimd.cpp66
-rw-r--r--src/corelib/tools/qsimd_p.h28
-rw-r--r--src/corelib/tools/qstring.cpp12
-rw-r--r--src/corelib/tools/qstringmatcher.cpp2
-rw-r--r--src/corelib/tools/qtextboundaryfinder.cpp2
-rw-r--r--src/dbus/dbus.pro2
-rw-r--r--src/dbus/qdbusabstractadaptor.h2
-rw-r--r--src/dbus/qdbusabstractinterface.h4
-rw-r--r--src/dbus/qdbusargument.h48
-rw-r--r--src/dbus/qdbusconnection.cpp4
-rw-r--r--src/dbus/qdbusconnection.h5
-rw-r--r--src/dbus/qdbusconnectioninterface.h2
-rw-r--r--src/dbus/qdbuscontext.h2
-rw-r--r--src/dbus/qdbuserror.h4
-rw-r--r--src/dbus/qdbusextratypes.h4
-rw-r--r--src/dbus/qdbusintegrator.cpp22
-rw-r--r--src/dbus/qdbusinterface.cpp2
-rw-r--r--src/dbus/qdbusinterface.h2
-rw-r--r--src/dbus/qdbusintrospection_p.h2
-rw-r--r--src/dbus/qdbusmacros.h8
-rw-r--r--src/dbus/qdbusmessage.h4
-rw-r--r--src/dbus/qdbusmetaobject_p.h2
-rw-r--r--src/dbus/qdbusmetatype.h2
-rw-r--r--src/dbus/qdbuspendingcall.h4
-rw-r--r--src/dbus/qdbuspendingreply.h2
-rw-r--r--src/dbus/qdbusreply.h2
-rw-r--r--src/dbus/qdbusserver.cpp2
-rw-r--r--src/dbus/qdbusserver.h2
-rw-r--r--src/dbus/qdbusservicewatcher.h2
-rw-r--r--src/dbus/qdbusthreaddebug_p.h4
-rw-r--r--src/dbus/qdbusutil_p.h20
-rw-r--r--src/dbus/qdbusxmlgenerator.cpp10
-rw-r--r--src/declarative/QmlChanges.txt12
-rw-r--r--src/declarative/debugger/qdeclarativedebugtrace.cpp12
-rw-r--r--src/declarative/debugger/qpacketprotocol.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeanchors_p.h6
-rw-r--r--src/declarative/graphicsitems/qdeclarativeborderimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeflickable.cpp60
-rw-r--r--src/declarative/graphicsitems/qdeclarativegridview.cpp29
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimage.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativeimagebase.cpp7
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.cpp220
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem.h10
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitem_p.h28
-rw-r--r--src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp5
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview.cpp38
-rw-r--r--src/declarative/graphicsitems/qdeclarativelistview_p.h7
-rw-r--r--src/declarative/graphicsitems/qdeclarativeloader.cpp10
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea.cpp101
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p.h10
-rw-r--r--src/declarative/graphicsitems/qdeclarativemousearea_p_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativepainteditem.cpp16
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath.cpp16
-rw-r--r--src/declarative/graphicsitems/qdeclarativepath_p.h41
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview.cpp119
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview_p.h13
-rw-r--r--src/declarative/graphicsitems/qdeclarativepathview_p_p.h13
-rw-r--r--src/declarative/graphicsitems/qdeclarativerepeater.cpp1
-rw-r--r--src/declarative/graphicsitems/qdeclarativetext.cpp117
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp55
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp51
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p.h8
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput_p_p.h4
-rw-r--r--src/declarative/graphicsitems/qdeclarativetranslate.cpp6
-rw-r--r--src/declarative/graphicsitems/qdeclarativetranslate_p.h7
-rw-r--r--src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp70
-rw-r--r--src/declarative/qml/parser/qdeclarativejslexer.cpp10
-rw-r--r--src/declarative/qml/qdeclarative.h14
-rw-r--r--src/declarative/qml/qdeclarativecompiler.cpp10
-rw-r--r--src/declarative/qml/qdeclarativecomponent.cpp31
-rw-r--r--src/declarative/qml/qdeclarativeengine.cpp89
-rw-r--r--src/declarative/qml/qdeclarativeengine.h2
-rw-r--r--src/declarative/qml/qdeclarativeengine_p.h2
-rw-r--r--src/declarative/qml/qdeclarativeenginedebug.cpp30
-rw-r--r--src/declarative/qml/qdeclarativeerror.cpp2
-rw-r--r--src/declarative/qml/qdeclarativeexpression.cpp1
-rw-r--r--src/declarative/qml/qdeclarativeexpression_p.h1
-rw-r--r--src/declarative/qml/qdeclarativeextensionplugin.cpp77
-rw-r--r--src/declarative/qml/qdeclarativeimageprovider.cpp3
-rw-r--r--src/declarative/qml/qdeclarativeinstruction_p.h3
-rw-r--r--src/declarative/qml/qdeclarativelist.cpp2
-rw-r--r--src/declarative/qml/qdeclarativemetatype.cpp25
-rw-r--r--src/declarative/qml/qdeclarativemetatype_p.h8
-rw-r--r--src/declarative/qml/qdeclarativeprivate.h30
-rw-r--r--src/declarative/qml/qdeclarativerewrite.cpp2
-rw-r--r--src/declarative/qml/qdeclarativerewrite_p.h4
-rw-r--r--src/declarative/qml/qdeclarativescriptparser.cpp99
-rw-r--r--src/declarative/qml/qdeclarativestringconverters.cpp8
-rw-r--r--src/declarative/qml/qdeclarativestringconverters_p.h2
-rw-r--r--src/declarative/qml/qdeclarativevaluetype.cpp4
-rw-r--r--src/declarative/qml/qdeclarativevme.cpp5
-rw-r--r--src/declarative/qml/qdeclarativexmlhttprequest.cpp7
-rw-r--r--src/declarative/qml/qdeclarativexmlhttprequest_p.h4
-rw-r--r--src/declarative/util/qdeclarativeanimation.cpp440
-rw-r--r--src/declarative/util/qdeclarativeanimation_p.h10
-rw-r--r--src/declarative/util/qdeclarativeanimation_p_p.h2
-rw-r--r--src/declarative/util/qdeclarativebehavior.cpp41
-rw-r--r--src/declarative/util/qdeclarativeopenmetaobject.cpp12
-rw-r--r--src/declarative/util/qdeclarativeopenmetaobject_p.h1
-rw-r--r--src/declarative/util/qdeclarativepixmapcache.cpp90
-rw-r--r--src/declarative/util/qdeclarativesmoothedanimation.cpp73
-rw-r--r--src/declarative/util/qdeclarativespringanimation.cpp57
-rw-r--r--src/declarative/util/qdeclarativestate.cpp15
-rw-r--r--src/declarative/util/qdeclarativestateoperations.cpp8
-rw-r--r--src/declarative/util/qdeclarativetimeline.cpp4
-rw-r--r--src/declarative/util/qdeclarativetimer.cpp11
-rw-r--r--src/declarative/util/qdeclarativetransition.cpp94
-rw-r--r--src/declarative/util/qdeclarativeview.cpp23
-rw-r--r--src/declarative/util/qdeclarativeview.h4
-rw-r--r--src/declarative/util/qdeclarativexmllistmodel.cpp4
-rw-r--r--src/declarative/util/qlistmodelinterface.cpp2
-rw-r--r--src/gui/dialogs/qfiledialog_mac.mm8
-rw-r--r--src/gui/dialogs/qwizard_win.cpp42
-rw-r--r--src/gui/dialogs/qwizard_win_p.h21
-rw-r--r--src/gui/graphicsview/qgraphicsgridlayout.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp56
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h15
-rw-r--r--src/gui/graphicsview/qgraphicslinearlayout.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp7
-rw-r--r--src/gui/graphicsview/qgraphicstransform.cpp3
-rw-r--r--src/gui/graphicsview/qgraphicstransform.h9
-rw-r--r--src/gui/gui.pro25
-rw-r--r--src/gui/image/image.pri1
-rw-r--r--src/gui/image/qimage.cpp54
-rw-r--r--src/gui/image/qimage_ssse3.cpp150
-rw-r--r--src/gui/image/qpixmap_s60.cpp20
-rw-r--r--src/gui/image/qpnghandler.cpp2
-rw-r--r--src/gui/inputmethod/qcoefepinputcontext_s60.cpp4
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp2
-rw-r--r--src/gui/itemviews/qfileiconprovider.cpp71
-rw-r--r--src/gui/itemviews/qheaderview.cpp2
-rw-r--r--src/gui/itemviews/qlistview.cpp7
-rw-r--r--src/gui/kernel/qapplication.cpp12
-rw-r--r--src/gui/kernel/qapplication.h3
-rw-r--r--src/gui/kernel/qapplication_p.h2
-rw-r--r--src/gui/kernel/qapplication_s60.cpp564
-rw-r--r--src/gui/kernel/qapplication_win.cpp2
-rw-r--r--src/gui/kernel/qcocoaapplicationdelegate_mac.mm1
-rw-r--r--src/gui/kernel/qcocoasharedwindowmethods_mac_p.h4
-rw-r--r--src/gui/kernel/qcocoaview_mac.mm43
-rw-r--r--src/gui/kernel/qcocoaview_mac_p.h1
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac.mm20
-rw-r--r--src/gui/kernel/qcocoawindowdelegate_mac_p.h1
-rw-r--r--src/gui/kernel/qdesktopwidget_s60.cpp22
-rw-r--r--src/gui/kernel/qevent.cpp8
-rw-r--r--src/gui/kernel/qgesture.cpp35
-rw-r--r--src/gui/kernel/qgesture.h6
-rw-r--r--src/gui/kernel/qgesture_p.h1
-rw-r--r--src/gui/kernel/qgesturemanager.cpp4
-rw-r--r--src/gui/kernel/qguifunctions_wince.cpp28
-rw-r--r--src/gui/kernel/qpalette.cpp10
-rw-r--r--src/gui/kernel/qstandardgestures.cpp15
-rw-r--r--src/gui/kernel/qt_s60_p.h13
-rw-r--r--src/gui/kernel/qwidget.cpp8
-rw-r--r--src/gui/kernel/qwidget_mac.mm11
-rw-r--r--src/gui/kernel/qwidget_s60.cpp17
-rw-r--r--src/gui/kernel/qwidget_win.cpp1
-rw-r--r--src/gui/kernel/qwidget_wince.cpp1
-rw-r--r--src/gui/painting/qdrawhelper.cpp135
-rw-r--r--src/gui/painting/qdrawhelper_iwmmxt.cpp25
-rw-r--r--src/gui/painting/qdrawhelper_mmx.cpp23
-rw-r--r--src/gui/painting/qdrawhelper_mmx3dnow.cpp25
-rw-r--r--src/gui/painting/qdrawhelper_p.h40
-rw-r--r--src/gui/painting/qdrawhelper_sse.cpp25
-rw-r--r--src/gui/painting/qdrawhelper_sse2.cpp81
-rw-r--r--src/gui/painting/qdrawhelper_sse3dnow.cpp25
-rw-r--r--src/gui/painting/qdrawingprimitive_sse2_p.h33
-rw-r--r--src/gui/painting/qpaintengine_x11.cpp22
-rw-r--r--src/gui/painting/qrgb.h2
-rw-r--r--src/gui/styles/qstyle.cpp4
-rw-r--r--src/gui/styles/qstyle.h2
-rw-r--r--src/gui/styles/qstyleoption.cpp6
-rw-r--r--src/gui/styles/qstyleoption.h2
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp7
-rw-r--r--src/gui/text/qfontengine_s60.cpp9
-rw-r--r--src/gui/text/qstatictext.cpp23
-rw-r--r--src/gui/text/qtextcursor.cpp6
-rw-r--r--src/gui/text/qtextdocument_p.cpp2
-rw-r--r--src/gui/text/qtextlayout.cpp2
-rw-r--r--src/gui/text/qtextobject.cpp2
-rw-r--r--src/gui/text/qtextoption.cpp7
-rw-r--r--src/gui/text/qtexttable.cpp35
-rw-r--r--src/gui/text/text.pri2
-rw-r--r--src/gui/util/qcompleter.cpp4
-rw-r--r--src/gui/util/qdesktopservices_x11.cpp12
-rw-r--r--src/gui/widgets/qlineedit.cpp8
-rw-r--r--src/gui/widgets/qmainwindowlayout_mac.mm20
-rw-r--r--src/gui/widgets/qtabbar.cpp6
-rw-r--r--src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp2
-rw-r--r--src/imports/gestures/plugin.cpp7
-rw-r--r--src/imports/gestures/qdeclarativegesturearea.cpp7
-rw-r--r--src/imports/particles/qdeclarativeparticles.cpp8
-rw-r--r--src/multimedia/audio/qaudiodevicefactory.cpp22
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp46
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_alsa_p.h5
-rw-r--r--src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp5
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.cpp54
-rw-r--r--src/multimedia/audio/qaudioinput_alsa_p.h1
-rw-r--r--src/multimedia/audio/qaudioinput_win32_p.cpp2
-rw-r--r--src/multimedia/audio/qaudiooutput_win32_p.cpp101
-rw-r--r--src/multimedia/video/qabstractvideobuffer.cpp1
-rw-r--r--src/multimedia/video/qabstractvideobuffer.h1
-rw-r--r--src/multimedia/video/qvideosurfaceformat.cpp2
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp9
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp8
-rw-r--r--src/network/access/qnetworkrequest.cpp8
-rw-r--r--src/network/access/qnetworkrequest.h2
-rw-r--r--src/network/bearer/qnetworkconfiguration.cpp19
-rw-r--r--src/network/bearer/qnetworkconfiguration_p.h3
-rw-r--r--src/network/bearer/qnetworksession.cpp12
-rw-r--r--src/network/kernel/qauthenticator.cpp408
-rw-r--r--src/network/kernel/qauthenticator.h5
-rw-r--r--src/network/kernel/qauthenticator_p.h6
-rw-r--r--src/network/kernel/qnetworkproxy_mac.cpp5
-rw-r--r--src/network/socket/qtcpserver.cpp2
-rw-r--r--src/network/ssl/qsslsocket.cpp4
-rw-r--r--src/network/ssl/qsslsocket_openssl.cpp93
-rw-r--r--src/network/ssl/qsslsocket_openssl_p.h1
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp2
-rw-r--r--src/opengl/qgl.cpp16
-rw-r--r--src/opengl/qglbuffer.cpp4
-rw-r--r--src/opengl/qglbuffer.h4
-rw-r--r--src/opengl/qwindowsurface_gl.cpp7
-rw-r--r--src/openvg/qpaintengine_vg.cpp14
-rw-r--r--src/plugins/accessible/widgets/complexwidgets.cpp8
-rw-r--r--src/plugins/accessible/widgets/qaccessiblewidgets.cpp4
-rw-r--r--src/plugins/bearer/bearer.pro3
-rw-r--r--src/plugins/bearer/connman/connman.pro19
-rw-r--r--src/plugins/bearer/connman/main.cpp93
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.cpp787
-rw-r--r--src/plugins/bearer/connman/qconnmanengine.h179
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux.cpp1072
-rw-r--r--src/plugins/bearer/connman/qconnmanservice_linux_p.h381
-rw-r--r--src/plugins/bearer/icd/icd.pro7
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.cpp62
-rw-r--r--src/plugins/bearer/icd/qnetworksession_impl.h8
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.cpp127
-rw-r--r--src/plugins/bearer/symbian/qnetworksession_impl.h5
-rw-r--r--src/plugins/bearer/symbian/symbian_3/symbian_3.pro2
-rw-r--r--src/plugins/bearer/symbian/symbianengine.cpp218
-rw-r--r--src/plugins/bearer/symbian/symbianengine.h1
-rw-r--r--src/plugins/sqldrivers/db2/db2.pro10
-rw-r--r--src/plugins/sqldrivers/ibase/ibase.pro14
-rw-r--r--src/plugins/sqldrivers/mysql/mysql.pro23
-rw-r--r--src/plugins/sqldrivers/oci/oci.pro13
-rw-r--r--src/plugins/sqldrivers/odbc/odbc.pro19
-rw-r--r--src/plugins/sqldrivers/psql/psql.pro18
-rw-r--r--src/plugins/sqldrivers/sqlite/sqlite.pro17
-rw-r--r--src/plugins/sqldrivers/sqlite2/sqlite2.pro9
-rw-r--r--src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri40
-rw-r--r--src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro2
-rw-r--r--src/plugins/sqldrivers/tds/tds.pro15
-rw-r--r--src/qbase.pri14
-rw-r--r--src/s60installs/bwins/QtCoreu.def132
-rw-r--r--src/s60installs/bwins/QtDeclarativeu.def28
-rw-r--r--src/s60installs/bwins/QtGuiu.def11
-rw-r--r--src/s60installs/bwins/QtNetworku.def361
-rw-r--r--src/s60installs/bwins/QtOpenVGu.def15
-rw-r--r--src/s60installs/eabi/QtDeclarativeu.def27
-rw-r--r--src/s60installs/eabi/QtGuiu.def11
-rw-r--r--src/s60installs/eabi/QtNetworku.def3
-rw-r--r--src/s60installs/s60installs.pro4
-rw-r--r--src/s60main/s60main.pro1
-rw-r--r--src/script/api/qscriptcontext.cpp10
-rw-r--r--src/script/api/qscriptcontextinfo.cpp11
-rw-r--r--src/script/api/qscriptcontextinfo.h4
-rw-r--r--src/script/api/qscriptengine.cpp16
-rw-r--r--src/script/api/qscriptengineagent.cpp12
-rw-r--r--src/script/api/qscriptvalue.cpp6
-rw-r--r--src/script/api/qscriptvalue_p.h2
-rw-r--r--src/script/bridge/qscriptdeclarativeobject.cpp4
-rw-r--r--src/sql/drivers/db2/qsql_db2.pri8
-rw-r--r--src/sql/drivers/drivers.pri130
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.pri11
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.pri16
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp36
-rw-r--r--src/sql/drivers/oci/qsql_oci.pri9
-rw-r--r--src/sql/drivers/odbc/qsql_odbc.pri13
-rw-r--r--src/sql/drivers/psql/qsql_psql.pri13
-rw-r--r--src/sql/drivers/sqlite/qsql_sqlite.pri11
-rw-r--r--src/sql/drivers/sqlite2/qsql_sqlite2.pri4
-rw-r--r--src/sql/drivers/tds/qsql_tds.h3
-rw-r--r--src/sql/drivers/tds/qsql_tds.pri10
-rw-r--r--src/sql/kernel/qsqldatabase.cpp3
-rw-r--r--src/svg/qsvgstyle.cpp2
-rw-r--r--src/svg/qsvgstyle_p.h2
-rw-r--r--src/testlib/qtestcase.cpp30
-rw-r--r--src/tools/moc/moc.cpp22
430 files changed, 21166 insertions, 3334 deletions
diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
index e153ba940c..e80e2c5880 100644
--- a/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
+++ b/src/3rdparty/harfbuzz/src/harfbuzz-thai.c
@@ -91,7 +91,7 @@ static void thaiWordBreaks(const HB_UChar16 *string, hb_uint32 len, HB_CharAttri
for (i = 0; i < numbreaks; ++i) {
if (break_positions[i] > 0) {
attributes[break_positions[i]-1].lineBreakType = HB_Break;
- attributes[i].wordBoundary = TRUE;
+ attributes[break_positions[i]-1].wordBoundary = TRUE;
}
}
diff --git a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
index e4f2f91acd..4a38df90ab 100644
--- a/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
+++ b/src/3rdparty/javascriptcore/JavaScriptCore/runtime/CollectorHeapIterator.h
@@ -97,14 +97,12 @@ namespace JSC {
inline LiveObjectIterator& LiveObjectIterator::operator++()
{
- if (m_block < m_heap.nextBlock || m_cell < m_heap.nextCell) {
- advance(HeapConstants::cellsPerBlock);
+ advance(HeapConstants::cellsPerBlock - 1);
+ if (m_block < m_heap.nextBlock || (m_block == m_heap.nextBlock && m_cell < m_heap.nextCell))
return *this;
- }
- do {
- advance(HeapConstants::cellsPerBlock);
- } while (m_block < m_heap.usedBlocks && !m_heap.blocks[m_block]->marked.get(m_cell));
+ while (m_block < m_heap.usedBlocks && !m_heap.blocks[m_block]->marked.get(m_cell))
+ advance(HeapConstants::cellsPerBlock - 1);
return *this;
}
diff --git a/src/3rdparty/libconninet.pri b/src/3rdparty/libconninet.pri
new file mode 100644
index 0000000000..e041e2b913
--- /dev/null
+++ b/src/3rdparty/libconninet.pri
@@ -0,0 +1,18 @@
+INCLUDEPATH += $$PWD/libconninet/src
+
+QMAKE_CXXFLAGS += $$QT_CFLAGS_GLIB
+
+HEADERS += \
+ $$PWD/libconninet/src/dbusdispatcher.h \
+ $$PWD/libconninet/src/iapconf.h \
+ $$PWD/libconninet/src/iapmonitor.h \
+ $$PWD/libconninet/src/maemo_icd.h \
+ $$PWD/libconninet/src/proxyconf.h
+
+SOURCES += \
+ $$PWD/libconninet/src/dbusdispatcher.cpp \
+ $$PWD/libconninet/src/iapconf.cpp \
+ $$PWD/libconninet/src/iapmonitor.cpp \
+ $$PWD/libconninet/src/maemo_icd.cpp \
+ $$PWD/libconninet/src/proxyconf.cpp
+
diff --git a/src/3rdparty/libconninet/AUTHORS b/src/3rdparty/libconninet/AUTHORS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/3rdparty/libconninet/AUTHORS
diff --git a/src/3rdparty/libconninet/COPYING b/src/3rdparty/libconninet/COPYING
new file mode 100644
index 0000000000..b124cf5812
--- /dev/null
+++ b/src/3rdparty/libconninet/COPYING
@@ -0,0 +1,510 @@
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes a de-facto standard. To achieve this, non-free programs must
+be allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at least
+ three years, to give the same user the materials specified in
+ Subsection 6a, above, for a charge no more than the cost of
+ performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+ <one line to give the library's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+Also add information on how to contact you by electronic and paper mail.
+
+You should also get your employer (if you work as a programmer) or
+your school, if any, to sign a "copyright disclaimer" for the library,
+if necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James
+ Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/src/3rdparty/libconninet/ChangeLog b/src/3rdparty/libconninet/ChangeLog
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/3rdparty/libconninet/ChangeLog
diff --git a/src/3rdparty/libconninet/INSTALL b/src/3rdparty/libconninet/INSTALL
new file mode 100644
index 0000000000..54caf7c190
--- /dev/null
+++ b/src/3rdparty/libconninet/INSTALL
@@ -0,0 +1,229 @@
+Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software
+Foundation, Inc.
+
+ This file is free documentation; the Free Software Foundation gives
+unlimited permission to copy, distribute and modify it.
+
+Basic Installation
+==================
+
+ These are generic installation instructions.
+
+ The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation. It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions. Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+ It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring. (Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.)
+
+ If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release. If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+ The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'. You only need
+`configure.ac' if you want to change it or regenerate `configure' using
+a newer version of `autoconf'.
+
+The simplest way to compile this package is:
+
+ 1. `cd' to the directory containing the package's source code and type
+ `./configure' to configure the package for your system. If you're
+ using `csh' on an old version of System V, you might need to type
+ `sh ./configure' instead to prevent `csh' from trying to execute
+ `configure' itself.
+
+ Running `configure' takes awhile. While running, it prints some
+ messages telling which features it is checking for.
+
+ 2. Type `make' to compile the package.
+
+ 3. Optionally, type `make check' to run any self-tests that come with
+ the package.
+
+ 4. Type `make install' to install the programs and any data files and
+ documentation.
+
+ 5. You can remove the program binaries and object files from the
+ source code directory by typing `make clean'. To also remove the
+ files that `configure' created (so you can compile the package for
+ a different kind of computer), type `make distclean'. There is
+ also a `make maintainer-clean' target, but that is intended mainly
+ for the package's developers. If you use it, you may have to get
+ all sorts of other programs in order to regenerate files that came
+ with the distribution.
+
+Compilers and Options
+=====================
+
+ Some systems require unusual options for compilation or linking that
+the `configure' script does not know about. Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+ You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment. Here
+is an example:
+
+ ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix
+
+ *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+ You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory. To do this, you must use a version of `make' that
+supports the `VPATH' variable, such as GNU `make'. `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script. `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.
+
+ If you have to use a `make' that does not support the `VPATH'
+variable, you have to compile the package for one architecture at a
+time in the source code directory. After you have installed the
+package for one architecture, use `make distclean' before reconfiguring
+for another architecture.
+
+Installation Names
+==================
+
+ By default, `make install' will install the package's files in
+`/usr/local/bin', `/usr/local/man', etc. You can specify an
+installation prefix other than `/usr/local' by giving `configure' the
+option `--prefix=PATH'.
+
+ You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files. If you
+give `configure' the option `--exec-prefix=PATH', the package will use
+PATH as the prefix for installing programs and libraries.
+Documentation and other data files will still use the regular prefix.
+
+ In addition, if you use an unusual directory layout you can give
+options like `--bindir=PATH' to specify different values for particular
+kinds of files. Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.
+
+ If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+Optional Features
+=================
+
+ Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System). The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+ For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+Specifying the System Type
+==========================
+
+ There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on. Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option. TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+ CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+ OS KERNEL-OS
+
+ See the file `config.sub' for the possible values of each field. If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+ If you are _building_ compiler tools for cross-compiling, you should
+use the `--target=TYPE' option to select the type of system they will
+produce code for.
+
+ If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+ If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists. Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+ Variables not defined in a site shell script can be set in the
+environment passed to `configure'. However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost. In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'. For example:
+
+ ./configure CC=/usr/local2/bin/gcc
+
+will cause the specified gcc to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+`configure' Invocation
+======================
+
+ `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+ Print a summary of the options to `configure', and exit.
+
+`--version'
+`-V'
+ Print the version of Autoconf used to generate the `configure'
+ script, and exit.
+
+`--cache-file=FILE'
+ Enable the cache: use and save the results of the tests in FILE,
+ traditionally `config.cache'. FILE defaults to `/dev/null' to
+ disable caching.
+
+`--config-cache'
+`-C'
+ Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+ Do not print messages saying which checks are being made. To
+ suppress all normal output, redirect it to `/dev/null' (any error
+ messages will still be shown).
+
+`--srcdir=DIR'
+ Look for the package's source code in directory DIR. Usually
+ `configure' can determine that directory automatically.
+
+`configure' also accepts some other, not widely useful, options. Run
+`configure --help' for more details.
+
diff --git a/src/3rdparty/libconninet/Makefile.am b/src/3rdparty/libconninet/Makefile.am
new file mode 100644
index 0000000000..250637ae87
--- /dev/null
+++ b/src/3rdparty/libconninet/Makefile.am
@@ -0,0 +1,49 @@
+SUBDIRS = src tests
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = conninet.pc
+
+MAINTAINERCLEANFILES = \
+ Makefile.in config.h.in configure \
+ install-sh ltmain.sh missing mkinstalldirs \
+ config.log config.status config.guess config.sub \
+ build-stamp compile depcomp acinclude.m4 aclocal.m4 \
+ debian/files \
+ debian/libconninet0.postinst.debhelper \
+ debian/libconninet0.postrm.debhelper \
+ debian/libconninet0.substvars
+
+EXTRA_DIST = \
+ debian/changelog \
+ debian/compat \
+ debian/control \
+ debian/copyright \
+ debian/libconninet0-dev.dirs \
+ debian/libconninet0-dev.files \
+ debian/libconninet0.dirs \
+ debian/libconninet0.files \
+ debian/rules
+
+# get rid of debian build dirs
+maintainer-clean-local:
+ -rm -rf debian/build debian/tmp \
+ debian/libconninet0 \
+ debian/libconninet0-dev \
+ debian/libconninet0-dbg
+
+if DOXYGEN_DOCS_ENABLED
+ DOXYGEN_LINE = $(DOXYGEN) doxygen.cfg
+else
+ DOXYGEN_LINE =
+endif
+
+.PHONY : doc
+
+doc:
+ $(DOXYGEN_LINE)
+
+deb: dist
+ -mkdir $(top_builddir)/debian-build
+ cd $(top_builddir)/debian-build && tar zxf ../$(top_builddir)/$(PACKAGE)-$(VERSION).tar.gz
+ cd $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) && dpkg-buildpackage -rfakeroot -sa -D
+ -rm -rf $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION)
diff --git a/src/3rdparty/libconninet/NEWS b/src/3rdparty/libconninet/NEWS
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/3rdparty/libconninet/NEWS
diff --git a/src/3rdparty/libconninet/README b/src/3rdparty/libconninet/README
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/3rdparty/libconninet/README
diff --git a/src/3rdparty/libconninet/autogen.sh b/src/3rdparty/libconninet/autogen.sh
new file mode 100755
index 0000000000..a8fd885ec5
--- /dev/null
+++ b/src/3rdparty/libconninet/autogen.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+autoreconf --verbose --install --force
diff --git a/src/3rdparty/libconninet/config.guess b/src/3rdparty/libconninet/config.guess
new file mode 100755
index 0000000000..e3a2116a7d
--- /dev/null
+++ b/src/3rdparty/libconninet/config.guess
@@ -0,0 +1,1533 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2009-06-10'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <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 -q __ELF__
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ s390x:SunOS:*:*)
+ echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
+ eval $set_cc_for_build
+ SUN_ARCH="i386"
+ # If there is a compiler, see if it is configured for 64-bit objects.
+ # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+ # This test works for both compilers.
+ if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+ if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+ grep IS_64BIT_ARCH >/dev/null
+ then
+ SUN_ARCH="x86_64"
+ fi
+ fi
+ echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <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 -q __LP64__
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <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 ;;
+ 8664:Windows_NT:*)
+ echo x86_64-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ eval $set_cc_for_build
+ if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep -q __ARM_EABI__
+ then
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ else
+ echo ${UNAME_MACHINE}-unknown-linux-gnueabi
+ fi
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:* | mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef ${UNAME_MACHINE}
+ #undef ${UNAME_MACHINE}el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=${UNAME_MACHINE}el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=${UNAME_MACHINE}
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep -q ld.so.1
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ padre:Linux:*:*)
+ echo sparc-unknown-linux-gnu
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <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.[02]*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </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.[02]*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <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/libconninet/config.sub b/src/3rdparty/libconninet/config.sub
new file mode 100755
index 0000000000..eb0389a693
--- /dev/null
+++ b/src/3rdparty/libconninet/config.sub
@@ -0,0 +1,1693 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+# Free Software Foundation, Inc.
+
+timestamp='2009-06-11'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <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
+ ;;
+ -bluegene*)
+ os=-cnk
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | lm32 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep | metag \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64octeon | mips64octeonel \
+ | mips64orion | mips64orionel \
+ | mips64r5900 | mips64r5900el \
+ | mips64vr | mips64vrel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | moxie \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k | z80)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | lm32-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64octeon-* | mips64octeonel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64r5900-* | mips64r5900el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa*-* \
+ | ymp-* \
+ | z8k-* | z80-*)
+ ;;
+ # Recognize the basic CPU types without company name, with glob match.
+ xtensa*)
+ basic_machine=$basic_machine-unknown
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aros)
+ basic_machine=i386-pc
+ os=-aros
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ blackfin)
+ basic_machine=bfin-unknown
+ os=-linux
+ ;;
+ blackfin-*)
+ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ bluegene*)
+ basic_machine=powerpc-ibm
+ os=-cnk
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ cegcc)
+ basic_machine=arm-unknown
+ os=-cegcc
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16)
+ basic_machine=cr16-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ dicos)
+ basic_machine=i686-pc
+ os=-dicos
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m68knommu)
+ basic_machine=m68k-unknown
+ os=-linux
+ ;;
+ m68knommu-*)
+ basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ mingw32ce)
+ basic_machine=arm-unknown
+ os=-mingw32ce
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ parisc)
+ basic_machine=hppa-unknown
+ os=-linux
+ ;;
+ parisc-*)
+ basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'`
+ os=-linux
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tile*)
+ basic_machine=tile-unknown
+ os=-linux-gnu
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ z80-*-coff)
+ basic_machine=z80-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -kopensolaris* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* | -aros* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* | -cegcc* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -dicos*)
+ os=-dicos
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -cnk*|-aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/src/3rdparty/libconninet/configure.ac b/src/3rdparty/libconninet/configure.ac
new file mode 100644
index 0000000000..2a383ee130
--- /dev/null
+++ b/src/3rdparty/libconninet/configure.ac
@@ -0,0 +1,90 @@
+AC_INIT([libconninet], patsubst(esyscmd([dpkg-parsechangelog | sed -n '/^Version: \(.*\)$/ {s//\1/;p}']), [
+]), [jukka.rissanen@nokia.com])
+AM_INIT_AUTOMAKE([foreign])
+
+AC_PROG_CXX
+AC_PROG_LIBTOOL
+
+AC_ARG_ENABLE(docs, [ --enable-docs Build DOXYGEN documentation (requires Doxygen)],enable_docs=$enableval,enable_docs=auto)
+
+AC_PATH_PROG(DOXYGEN, doxygen, no)
+AC_MSG_CHECKING([whether to build Doxygen documentation])
+
+if test x$DOXYGEN = xno ; then
+ have_doxygen=no
+else
+ have_doxygen=yes
+fi
+if test x$enable_docs = xauto ; then
+ if test x$have_doxygen = xno ; then
+ enable_docs=no
+ else
+ enable_docs=yes
+ fi
+fi
+if test x$enable_docs = xyes; then
+ if test x$have_doxygen = xno; then
+ AC_MSG_ERROR([Building Doxygen docs explicitly required, but Doxygen not found])
+ else
+ AC_MSG_RESULT(yes)
+ fi
+else
+ AC_MSG_RESULT(no)
+fi
+
+AM_CONDITIONAL(DOXYGEN_DOCS_ENABLED, test x$enable_docs = xyes)
+AC_SUBST(DOXYGEN)
+
+PKG_CHECK_MODULES(GLIB, glib-2.0)
+AC_SUBST(GLIB_CFLAGS)
+AC_SUBST(GLIB_LIBS)
+
+PKG_CHECK_MODULES(QTCORE, QtCore)
+AC_SUBST(QTCORE_CFLAGS)
+AC_SUBST(QTCORE_LIBS)
+
+PKG_CHECK_MODULES(QTNETWORK, QtNetwork)
+AC_SUBST(QTNETWORK_CFLAGS)
+AC_SUBST(QTNETWORK_LIBS)
+
+PKG_CHECK_MODULES(QTDBUS, QtDBus)
+AC_SUBST(QTDBUS_CFLAGS)
+AC_SUBST(QTDBUS_LIBS)
+
+PKG_CHECK_MODULES(QTTEST, QtTest)
+AC_SUBST(QTTEST_CFLAGS)
+AC_SUBST(QTTEST_LIBS)
+
+PKG_CHECK_MODULES(DBUS, dbus-glib-1)
+AC_SUBST(DBUS_CFLAGS)
+AC_SUBST(DBUS_LIBS)
+
+PKG_CHECK_MODULES(CONNSETTINGS, connsettings)
+AC_SUBST(CONNSETTINGS_CFLAGS)
+AC_SUBST(CONNSETTINGS_LIBS)
+
+PKG_CHECK_MODULES(OSSO_IC, osso-ic)
+AC_SUBST(OSSO_IC_CFLAGS)
+AC_SUBST(OSSO_IC_LIBS)
+
+PKG_CHECK_MODULES(ICD_DEV, icd2)
+AC_SUBST(ICD_DEV_CFLAGS)
+AC_SUBST(ICD_DEV_LIBS)
+
+PKG_CHECK_MODULES(GCONF, gconf-2.0)
+AC_SUBST(GCONF_CFLAGS)
+AC_SUBST(GCONF_LIBS)
+
+PKG_CHECK_MODULES(QGCONF, gq-gconf)
+AC_SUBST(QGCONF_CFLAGS)
+AC_SUBST(QGCONF_LIBS)
+
+CONCFLAGS="-Wall -Werror -Wmissing-prototypes"
+AC_SUBST(CONCFLAGS)
+
+AC_CONFIG_FILES([Makefile \
+ src/Makefile \
+ tests/Makefile \
+ conninet.pc \
+ doxygen.cfg])
+AC_OUTPUT
diff --git a/src/3rdparty/libconninet/conninet.pc.in b/src/3rdparty/libconninet/conninet.pc.in
new file mode 100644
index 0000000000..68cdee02fb
--- /dev/null
+++ b/src/3rdparty/libconninet/conninet.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: libconninet
+Description: Internet Connectivity support library
+Version: @VERSION@
+Requires: dbus-1 >= 0.60 glib-2.0 QtCore QtDBus QtGui
+Libs: -lconninet
+Cflags: -I${includedir}/conninet
diff --git a/src/3rdparty/libconninet/debian/changelog b/src/3rdparty/libconninet/debian/changelog
new file mode 100644
index 0000000000..436d318d7e
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/changelog
@@ -0,0 +1,285 @@
+libconninet (0.41+0m6) unstable; urgency=low
+
+ * This entry has been added by BIFH queue processor
+ version has been changed to 0.41+0m6
+
+ -- Qing Jin <ext-qing.1.jin@nokia.com> Thu, 15 Jul 2010 15:56:38 +0300
+
+libconninet (0.41) unstable; urgency=low
+
+ * Fixes: NB#175098 - Qt4.7 Webkit crashes when bearer API QNetworkSession
+ constructor calls QNetworkSession::syncStateWithInterface() which in turn
+ calls Maemo::state() and Maemo::addrinfo() and webkit expects that event
+ loop is not run but those function process main loop events.
+ Now Maemo::state() and Maemo::addrinfo() are changed to be synchronous
+ and fully blocking functions. The old non-blocking versions are called
+ Maemo::state_non_blocking() and Maemo::addrinfo_non_blocking().
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 14 Jul 2010 10:12:47 +0300
+
+libconninet (0.40) unstable; urgency=low
+
+ * Fixes: NB#167465 - Unable to open network connection using libbearer
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 11 May 2010 10:47:10 +0300
+
+libconninet (0.39) unstable; urgency=low
+
+ * Fixes: NB#167982 - initialize DBus vtable in DBusDispatcher.
+
+ -- Aapo Makela <aapo.makela@nokia.com> Mon, 10 May 2010 14:42:39 +0300
+
+libconninet (0.38) unstable; urgency=low
+
+ * Changing icd2 connect_req to be synchronous as the check for
+ returned connect signal did not work correctly, this caused a
+ long timeout when connect() was called.
+ * Scan sometimes missed results and did not return them to caller.
+ * HTTP proxy settings were not set correctly.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 15 Apr 2010 11:25:06 +0300
+
+libconninet (0.37) unstable; urgency=low
+
+ * Make proxy config reference counting atomic.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 3 Mar 2010 13:23:08 +0200
+
+libconninet (0.36) unstable; urgency=low
+
+ * Fixes: NB#157586 - Cleanup dbus listener when WLAN scanning object is
+ deleted.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Fri, 26 Feb 2010 13:30:41 +0200
+
+libconninet (0.35) unstable; urgency=low
+
+ * Fixes: NB#156883 - libconninet fails to build under the Platform SDK (SB2)
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 18 Feb 2010 12:14:40 +0200
+
+libconninet (0.34) unstable; urgency=low
+
+ * Coverity fix
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 16 Feb 2010 16:38:00 +0200
+
+libconninet (0.33) unstable; urgency=low
+
+ * Added API to update Qt proxy config.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 26 Jan 2010 15:48:36 +0200
+
+libconninet (0.32) unstable; urgency=low
+
+ * Fixed IAPConf to unset value when set value is invalid.
+ * Updated IAPMonitor to use libconnsettings.
+
+ -- Aapo Makela <aapo.makela@nokia.com> Wed, 03 Feb 2010 07:32:45 +0200
+
+libconninet (0.31) unstable; urgency=low
+
+ * Fixes: NB#154892 - Check nulls in IAPConf.
+
+ -- Aapo Makela <aapo.makela@nokia.com> Mon, 01 Feb 2010 09:32:06 +0200
+
+libconninet (0.30) unstable; urgency=low
+
+ * Updated IAPConf to use libconnsettings.
+
+ -- Aapo Makela <aapo.makela@nokia.com> Fri, 29 Jan 2010 12:58:03 +0200
+
+libconninet (0.29) unstable; urgency=low
+
+ * Fixed dependencies
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Fri, 15 Jan 2010 10:16:07 +0200
+
+libconninet (0.28) unstable; urgency=low
+
+ * Get rid of libdui dependency
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 13 Jan 2010 09:56:26 +0200
+
+libconninet (0.27) unstable; urgency=low
+
+ * Insert new pending calls to the list in DBusDispatcher.
+
+ -- Aapo Makela <aapo.makela@nokia.com> Tue, 22 Dec 2009 14:27:32 +0200
+
+libconninet (0.26) unstable; urgency=low
+
+ * Added possibility to specify different signal path for DBusDispatcher.
+
+ -- Aapo Makela <aapo.makela@nokia.com> Wed, 25 Nov 2009 14:27:34 +0200
+
+libconninet (0.25) unstable; urgency=low
+
+ * Fixes: NB#146450 - All scan results were not returned to the caller.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 16 Nov 2009 17:23:15 +0200
+
+libconninet (0.24) unstable; urgency=low
+
+ * Wait all scan results for all network types in Maemo::Icd::scan()
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Fri, 6 Nov 2009 14:45:23 +0200
+
+libconninet (0.23) unstable; urgency=low
+
+ * Fixes: NB#143361 - Assert failure in session class for GPRS IAP.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 19 Oct 2009 16:00:14 +0300
+
+libconninet (0.22) unstable; urgency=low
+
+ * Fixed the error checking if scan returns 0 results.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 7 Oct 2009 13:50:27 +0300
+
+libconninet (0.21) unstable; urgency=low
+
+ * Support multiple DBusDispatcher classes at the same time. This is
+ required by Maemo::Icd class so that multiple instances of it can
+ be used the same time.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 5 Oct 2009 16:33:43 +0300
+
+libconninet (0.20) unstable; urgency=low
+
+ * Fixed memory leak in IAPConf::setValue()
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Fri, 2 Oct 2009 13:02:21 +0300
+
+libconninet (0.19) unstable; urgency=low
+
+ * Fixed connect_req to one specific IAP in Icd class.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 29 Sep 2009 17:02:46 +0300
+
+libconninet (0.18) unstable; urgency=low
+
+ * Make sure the library will not abort in Icd class if scan does
+ not return any results.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 22 Sep 2009 17:00:12 +0300
+
+libconninet (0.17) unstable; urgency=low
+
+ * Added IAP monitoring support.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 21 Sep 2009 16:29:31 +0300
+
+libconninet (0.16) unstable; urgency=low
+
+ * Disabled the old osso-ic dbus interface as it is currently not used.
+ * Fixed the addrinfo request, now addresses are returned correctly to
+ the caller.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 17 Sep 2009 15:56:13 +0300
+
+libconninet (0.15) unstable; urgency=low
+
+ * Enabling state_req, statistics_req and addrinfo_req support
+ functions in Maemo::Icd as the corresponding DBUS API functions are
+ fixed in icd2 v0.89
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Fri, 24 Jul 2009 15:23:02 +0300
+
+libconninet (0.14) unstable; urgency=low
+
+ * Icd statistics support added.
+ * Icd address information support added.
+ * Icd scan method does not return the final (and empty) result any more.
+ * Added initial unit test implementation for Icd class.
+ * Some of the status functions in Icd class disabled because of issues
+ in icd2 and the dbus api.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 23 Jul 2009 11:03:05 +0300
+
+libconninet (0.13) unstable; urgency=low
+
+ * Added API to get all the configured IAPs.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 21 Jul 2009 09:47:18 +0300
+
+libconninet (0.12) unstable; urgency=low
+
+ * Replaced duivaluespace by Dui in pkg-config file because the
+ duivaluespace is deprecated.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 20 Jul 2009 16:00:10 +0300
+
+libconninet (0.11) unstable; urgency=low
+
+ * Using libdui instead of libduivaluespace because it is deprecated.
+ * The IAPConf::clear() uses native gconf API instead of launching gconftool
+ * Check that state_req call returned list and the list contains entries
+ before trying to access it.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 20 Jul 2009 14:55:15 +0300
+
+libconninet (0.10) unstable; urgency=low
+
+ * connect() did not return ok when connection succeeded.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 25 Jun 2009 09:31:21 +0300
+
+libconninet (0.9) unstable; urgency=low
+
+ * Connection timeout set to 2.5min, same as in fremantle.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 17 Jun 2009 13:36:40 +0300
+
+libconninet (0.8) unstable; urgency=low
+
+ * Fix state_req signal received from Icd
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 11 Jun 2009 17:19:33 +0300
+
+libconninet (0.7) unstable; urgency=low
+
+ * Icd disconnect and select reqs are made synchronous as we do not
+ wait the return status. The previous async version was causing core
+ dumps if Icd class was destroyed too early.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 11 Jun 2009 11:52:36 +0300
+
+libconninet (0.6) unstable; urgency=low
+
+ * Fixed the libconninet0-dev dependencies.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 8 Jun 2009 10:47:56 +0300
+
+libconninet (0.5) unstable; urgency=low
+
+ * Fixed missing QObject connect functions.
+ * Fixed IAPConf to return invalid QVariant if the value does not exist.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Mon, 01 Jun 2009 13:58:53 +0300
+
+libconninet (0.4) unstable; urgency=low
+
+ * Fixed QObject signal setting for Maemo::Icd
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 20 May 2009 13:51:11 +0300
+
+libconninet (0.3) unstable; urgency=low
+
+ * Refactoring classes
+ * Added IAPConf class.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 14 May 2009 13:24:11 +0300
+
+libconninet (0.2) unstable; urgency=low
+
+ * Fixed pkgconfig file which had wrong dependency
+ * Added DBus array and struct support to DBusDispatcher.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Wed, 13 May 2009 12:11:00 +0300
+
+libconninet (0.1) unstable; urgency=low
+
+ * Initial Release.
+
+ -- Jukka Rissanen <jukka.rissanen@nokia.com> Tue, 12 May 2009 16:10:27 +0200
diff --git a/src/3rdparty/libconninet/debian/compat b/src/3rdparty/libconninet/debian/compat
new file mode 100644
index 0000000000..b8626c4cff
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/compat
@@ -0,0 +1 @@
+4
diff --git a/src/3rdparty/libconninet/debian/control b/src/3rdparty/libconninet/debian/control
new file mode 100644
index 0000000000..2db660f4d5
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/control
@@ -0,0 +1,39 @@
+Source: libconninet
+Priority: optional
+Maintainer: Jukka Rissanen <jukka.rissanen@nokia.com>
+Build-Depends: debhelper (>= 4.0.0), autotools-dev, libglib2.0-dev (>= 2.8),
+ libdbus-1-dev (>= 0.60), libconnsettings0-dev (>= 0.4), icd2-osso-ic-dev,
+ icd2-dev, libqt4-dev, libgconf2-dev (>> 2.6.4), libgq-gconf-dev
+Standards-Version: 3.6.2
+Section: libs
+
+Package: libconninet0-dev
+Section: libdevel
+Architecture: any
+Depends: libconninet0 (= ${Source-Version}), libdbus-1-dev (>= 0.60),
+ libglib2.0-dev (>= 2.8), libconnsettings0-dev (>= 0.4), libqt4-dev,
+ icd2-osso-ic-dev, icd2-dev, libgconf2-dev (>> 2.6.4), libgq-gconf-dev
+Description: Internet Connectivity support library development files
+ Internet Connectivity support library (libconninet) provides common
+ support functions for connecting to icd2 and accessing configuration
+ data.
+ .
+ This package contains the header files.
+
+Package: libconninet0
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Internet Connectivity support library
+ Internet Connectivity support library (libconninet) provides common
+ support functions for connecting to icd2 and accessing configuration
+ data.
+ .
+ This package contains the shared libraries.
+
+Package: libconninet0-dbg
+Section: libs
+Architecture: any
+Depends: libconninet0 (= ${Source-Version}), ${shlibs:Depends}, ${misc:Depends}
+Description: Debug symbols for the Internet Connectivity support library
+ Internet Connectivity support library (libconninet) debug symbols.
diff --git a/src/3rdparty/libconninet/debian/copyright b/src/3rdparty/libconninet/debian/copyright
new file mode 100644
index 0000000000..97e8e68905
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/copyright
@@ -0,0 +1,19 @@
+libconninet - Internet Connectivity support library
+
+Copyright (C) 2009 Nokia Corporation. All rights reserved.
+
+Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+This library is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License version 2.1
+as published by the Free Software Foundation.
+
+This library is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Lesser General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public
+License along with this library; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA
diff --git a/src/3rdparty/libconninet/debian/libconninet0-dev.dirs b/src/3rdparty/libconninet/debian/libconninet0-dev.dirs
new file mode 100644
index 0000000000..44188162ec
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/libconninet0-dev.dirs
@@ -0,0 +1,2 @@
+usr/lib
+usr/include
diff --git a/src/3rdparty/libconninet/debian/libconninet0-dev.files b/src/3rdparty/libconninet/debian/libconninet0-dev.files
new file mode 100644
index 0000000000..78bbac8f47
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/libconninet0-dev.files
@@ -0,0 +1,4 @@
+usr/include/*
+usr/lib/lib*.so
+usr/lib/pkgconfig/*
+usr/share/pkgconfig/*
diff --git a/src/3rdparty/libconninet/debian/libconninet0.dirs b/src/3rdparty/libconninet/debian/libconninet0.dirs
new file mode 100644
index 0000000000..68457717bd
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/libconninet0.dirs
@@ -0,0 +1 @@
+usr/lib
diff --git a/src/3rdparty/libconninet/debian/libconninet0.files b/src/3rdparty/libconninet/debian/libconninet0.files
new file mode 100644
index 0000000000..d0dbfd18ac
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/libconninet0.files
@@ -0,0 +1 @@
+usr/lib/lib*.so.*
diff --git a/src/3rdparty/libconninet/debian/rules b/src/3rdparty/libconninet/debian/rules
new file mode 100755
index 0000000000..2a3d395be6
--- /dev/null
+++ b/src/3rdparty/libconninet/debian/rules
@@ -0,0 +1,123 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+ CFLAGS += -O0
+else
+ CFLAGS += -O2
+endif
+
+# shared library versions, option 1
+#version=2.0.5
+#major=2
+# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
+version=`ls src/.libs/lib*.so.* | \
+ awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
+major=`ls src/.libs/lib*.so.* | \
+ awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
+
+configure: configure.ac debian/changelog
+ -./autogen.sh
+
+config.status: configure
+ dh_testdir
+ # Add here commands to configure the package.
+ CFLAGS="$(CFLAGS)" ./configure \
+ --host=$(DEB_HOST_GNU_TYPE) \
+ --build=$(DEB_BUILD_GNU_TYPE) \
+ --prefix=/usr \
+ --mandir=\$${prefix}/share/man \
+ --infodir=\$${prefix}/share/info
+
+
+build: build-stamp
+build-stamp: config.status
+ dh_testdir
+
+ # Add here commands to compile the package.
+ $(MAKE)
+
+ touch build-stamp
+
+clean:
+ dh_testdir
+ dh_testroot
+ rm -f build-stamp
+
+ # Add here commands to clean up after the build process.
+ -$(MAKE) distclean
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+ cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+ cp -f /usr/share/misc/config.guess config.guess
+endif
+
+
+ dh_clean
+
+install: build
+ dh_testdir
+ dh_testroot
+ dh_clean -k
+ dh_installdirs
+
+ # Add here commands to install the package into debian/tmp
+ $(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+ dh_testdir
+ dh_testroot
+ dh_movefiles
+ dh_installchangelogs ChangeLog
+ dh_installdocs
+ dh_installexamples
+# dh_install
+# dh_installmenu
+# dh_installdebconf
+# dh_installlogrotate
+# dh_installemacsen
+# dh_installpam
+# dh_installmime
+# dh_installinit
+# dh_installcron
+# dh_installinfo
+ dh_installman
+ dh_link
+ dh_strip --dbg-package=libconninet0
+ dh_compress
+ dh_fixperms
+# dh_perl
+# dh_python
+ dh_makeshlibs
+ dh_installdeb
+ dh_shlibdeps
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install
diff --git a/src/3rdparty/libconninet/doxygen.cfg.in b/src/3rdparty/libconninet/doxygen.cfg.in
new file mode 100644
index 0000000000..80a4c8dcea
--- /dev/null
+++ b/src/3rdparty/libconninet/doxygen.cfg.in
@@ -0,0 +1,1147 @@
+# Doxyfile 1.3.7
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = "Internet Connectivity Support Library"
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER = @VERSION@
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY = doc
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 2 levels of 10 sub-directories under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of source
+# files, where putting all generated files in the same directory would otherwise
+# cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, Dutch,
+# Finnish, French, German, Greek, Hungarian, Italian, Japanese, Japanese-en
+# (Japanese with English messages), Korean, Korean-en, Norwegian, Polish, Portuguese,
+# Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# This tag can be used to specify the encoding used in the generated output.
+# The encoding is not always determined by the language that is chosen,
+# but also whether or not the output is meant for Windows or non-Windows users.
+# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES
+# forces the Windows encoding (this is the default for the Windows binary),
+# whereas setting the tag to NO uses a Unix-style encoding (the default for
+# all platforms other than Windows).
+
+USE_WINDOWS_ENCODING = NO
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is used
+# as the annotated text. Otherwise, the brief description is used as-is. If left
+# blank, the following values are used ("$name" is automatically replaced with the
+# name of the entity): "The $name class" "The $name widget" "The $name file"
+# "is" "provides" "specifies" "contains" "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited
+# members of a class in the documentation of that class as if those members were
+# ordinary class members. Constructors, destructors and assignment operators of
+# the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like the Qt-style comments (thus requiring an
+# explicit @brief command for a brief description.
+
+JAVADOC_AUTOBRIEF = YES
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
+DETAILS_AT_TOP = YES
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
+# only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources
+# only. Doxygen will then generate output that is more tailored for Java.
+# For instance, namespaces will be presented as packages, qualified scopes
+# will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = YES
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text.
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = conic/conic.h \
+ conic/conicconnection.h \
+ conic/conicconnectionevent.h \
+ conic/conicevent.h \
+ conic/coniciap.h \
+ conic/conicstatisticsevent.h
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp
+# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories
+# that are symbolic links (a Unix filesystem feature) are excluded from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories.
+
+EXCLUDE_PATTERNS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+
+INPUT_FILTER =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = YES
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = YES
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compressed HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_PREDEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse the
+# parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or
+# super classes. Setting the tag to NO turns the diagrams off. Note that this
+# option is superseded by the HAVE_DOT option below. This is only a fallback. It is
+# recommended to install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will
+# generate a call dependency graph for every global function or class method.
+# Note that enabling this option will significantly increase the time of a run.
+# So in most cases it will be better to enable call graphs for selected
+# functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found on the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_WIDTH = 1024
+
+# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height
+# (in pixels) of the graphs generated by dot. If a graph becomes larger than
+# this value, doxygen will try to truncate the graph, so that it fits within
+# the specified constraint. Beware that most browsers cannot cope with very
+# large images.
+
+MAX_DOT_GRAPH_HEIGHT = 1024
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes that
+# lay further from the root node will be omitted. Note that setting this option to
+# 1 or 2 may greatly reduce the computation time needed for large code bases. Also
+# note that a graph may be further truncated if the graph's image dimensions are
+# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT).
+# If 0 is used for the depth value (the default), the graph is not depth-constrained.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
diff --git a/src/3rdparty/libconninet/src/Makefile.am b/src/3rdparty/libconninet/src/Makefile.am
new file mode 100644
index 0000000000..be7a1e52d8
--- /dev/null
+++ b/src/3rdparty/libconninet/src/Makefile.am
@@ -0,0 +1,36 @@
+DEFS = -DDBUS_API_SUBJECT_TO_CHANGE -DGCONF_DISABLE_DEPRECATED
+INCLUDES = @GLIB_CFLAGS@ @DBUS_CFLAGS@ @GCONF_CFLAGS@ @OSSO_IC_CFLAGS@ @ICD_DEV_CFLAGS@ @QTCORE_CFLAGS@ @QTNETWORK_CFLAGS@ @QTDBUS_CFLAGS@ @QGCONF_CFLAGS@ @CONNSETTINGS_CFLAGS@
+LIBS = @GLIB_LIBS@ @DBUS_LIBS@ @GCONF_LIBS@ @OSSO_IC_LIBS@ @ICD_DEV_LIBS@ @QTCORE_LIBS@ @QTDBUS_LIBS@ @QTNETWORK_CFLAGS@ @QGCONF_LIBS@ @CONNSETTINGS_LIBS@
+
+AM_CFLAGS = $(CONCFLAGS)
+
+lib_LTLIBRARIES = libconninet.la
+libconninet_la_SOURCES = \
+ maemo_icd.cpp \
+ dbusdispatcher.cpp \
+ iapconf.cpp \
+ iapmonitor.cpp \
+ proxyconf.cpp
+
+#libconninet_la_LDFLAGS = -version-info 0:0:0
+
+conninetincludedir = $(includedir)/conninet
+conninetinclude_HEADERS = \
+ maemo_icd.h \
+ dbusdispatcher.h \
+ iapconf.h \
+ iapmonitor.h \
+ proxyconf.h
+
+nodist_libconninet_la_SOURCES = \
+ moc_maemo_icd.cpp \
+ moc_dbusdispatcher.cpp
+
+MAINTAINERCLEANFILES = Makefile.in
+
+# This rule lets GNU make create any moc_*.cpp from the equivalent *.h
+moc_%.cpp: %.h
+ moc $< -o $@
+
+# This line ensures that generated moc files are deleted when we make clean.
+CLEANFILES = *_moc.cpp *.loT
diff --git a/src/3rdparty/libconninet/src/dbusdispatcher.cpp b/src/3rdparty/libconninet/src/dbusdispatcher.cpp
new file mode 100644
index 0000000000..758198255a
--- /dev/null
+++ b/src/3rdparty/libconninet/src/dbusdispatcher.cpp
@@ -0,0 +1,611 @@
+/* * This file is part of conninet *
+ *
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * Contact: Aapo Makela <aapo.makela@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#include <QDebug>
+#include <QtCore>
+#include <poll.h>
+#include <dbus/dbus.h>
+#include <dbus/dbus-glib-lowlevel.h>
+#include <glib.h>
+#include "dbusdispatcher.h"
+
+namespace Maemo {
+
+/*!
+ \class DBusDispatcher
+
+ \brief DBusDispatcher is a class, which is able to send DBUS method call
+ messages and receive unicast signals from DBUS object.
+*/
+
+class DBusDispatcherPrivate
+{
+public:
+ DBusDispatcherPrivate(const QString& service,
+ const QString& path,
+ const QString& interface,
+ const QString& signalPath)
+ : service(service), path(path), interface(interface),
+ signalPath(signalPath), connection(0)
+ {
+ memset(&signal_vtable, 0, sizeof(signal_vtable));
+ }
+
+ ~DBusDispatcherPrivate()
+ {
+ foreach(DBusPendingCall *call, pending_calls) {
+ dbus_pending_call_cancel(call);
+ dbus_pending_call_unref(call);
+ }
+ }
+
+ QString service;
+ QString path;
+ QString interface;
+ QString signalPath;
+ struct DBusConnection *connection;
+ QList<DBusPendingCall *> pending_calls;
+ struct DBusObjectPathVTable signal_vtable;
+};
+
+static bool constantVariantList(const QVariantList& variantList) {
+ // Special case, empty list == empty struct
+ if (variantList.isEmpty()) {
+ return false;
+ } else {
+ QVariant::Type type = variantList[0].type();
+ // Iterate items in the list and check if they are same type
+ foreach(QVariant variant, variantList) {
+ if (variant.type() != type) {
+ return false;
+ }
+ }
+ }
+ return true;
+}
+
+static QString variantToSignature(const QVariant& argument,
+ bool constantList = true) {
+ switch (argument.type()) {
+ case QVariant::Bool:
+ return "b";
+ case QVariant::ByteArray:
+ return "ay";
+ case QVariant::Char:
+ return "y";
+ case QVariant::Int:
+ return "i";
+ case QVariant::UInt:
+ return "u";
+ case QVariant::StringList:
+ return "as";
+ case QVariant::String:
+ return "s";
+ case QVariant::LongLong:
+ return "x";
+ case QVariant::ULongLong:
+ return "t";
+ case QVariant::List:
+ {
+ QString signature;
+ QVariantList variantList = argument.toList();
+ if (!constantList) {
+ signature += DBUS_STRUCT_BEGIN_CHAR_AS_STRING;
+ foreach(QVariant listItem, variantList) {
+ signature += variantToSignature(listItem);
+ }
+ signature += DBUS_STRUCT_END_CHAR_AS_STRING;
+ } else {
+ if (variantList.isEmpty())
+ return "";
+ signature = "a" + variantToSignature(variantList[0]);
+ }
+
+ return signature;
+ }
+ default:
+ qDebug() << "Unsupported variant type: " << argument.type();
+ break;
+ }
+
+ return "";
+}
+
+static bool appendVariantToDBusMessage(const QVariant& argument,
+ DBusMessageIter *dbus_iter) {
+ int idx = 0;
+ DBusMessageIter array_iter;
+ QStringList str_list;
+ dbus_bool_t bool_data;
+ dbus_int32_t int32_data;
+ dbus_uint32_t uint32_data;
+ dbus_int64_t int64_data;
+ dbus_uint64_t uint64_data;
+ char *str_data;
+ char char_data;
+
+ switch (argument.type()) {
+
+ case QVariant::Bool:
+ bool_data = argument.toBool();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BOOLEAN,
+ &bool_data);
+ break;
+
+ case QVariant::ByteArray:
+ str_data = argument.toByteArray().data();
+ dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY,
+ DBUS_TYPE_BYTE_AS_STRING, &array_iter);
+ dbus_message_iter_append_fixed_array(&array_iter,
+ DBUS_TYPE_BYTE,
+ &str_data,
+ argument.toByteArray().size());
+ dbus_message_iter_close_container(dbus_iter, &array_iter);
+ break;
+
+ case QVariant::Char:
+ char_data = argument.toChar().toAscii();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_BYTE,
+ &char_data);
+ break;
+
+ case QVariant::Int:
+ int32_data = argument.toInt();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT32,
+ &int32_data);
+ break;
+
+ case QVariant::String:
+ str_data = argument.toString().toLatin1().data();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_STRING,
+ &str_data);
+ break;
+
+ case QVariant::StringList:
+ str_list = argument.toStringList();
+ dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY,
+ "s", &array_iter);
+ for (idx = 0; idx < str_list.size(); idx++) {
+ str_data = str_list.at(idx).toLatin1().data();
+ dbus_message_iter_append_basic(&array_iter,
+ DBUS_TYPE_STRING,
+ &str_data);
+ }
+ dbus_message_iter_close_container(dbus_iter, &array_iter);
+ break;
+
+ case QVariant::UInt:
+ uint32_data = argument.toUInt();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT32,
+ &uint32_data);
+ break;
+
+ case QVariant::ULongLong:
+ uint64_data = argument.toULongLong();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_UINT64,
+ &uint64_data);
+ break;
+
+ case QVariant::LongLong:
+ int64_data = argument.toLongLong();
+ dbus_message_iter_append_basic(dbus_iter, DBUS_TYPE_INT64,
+ &int64_data);
+ break;
+
+ case QVariant::List:
+ {
+ QVariantList variantList = argument.toList();
+ bool constantList = constantVariantList(variantList);
+ DBusMessageIter array_iter;
+
+ // List is mapped either as an DBUS array (all items same type)
+ // DBUS struct (variable types) depending on constantList
+ if (constantList) {
+ // Resolve the signature for the first item
+ QString signature = "";
+ if (!variantList.isEmpty()) {
+ signature = variantToSignature(
+ variantList[0],
+ constantVariantList(variantList[0].toList()));
+ }
+
+ // Mapped as DBUS array
+ dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_ARRAY,
+ signature.toAscii(),
+ &array_iter);
+
+ foreach(QVariant listItem, variantList) {
+ appendVariantToDBusMessage(listItem, &array_iter);
+ }
+
+ dbus_message_iter_close_container(dbus_iter, &array_iter);
+ } else {
+ // Mapped as DBUS struct
+ dbus_message_iter_open_container(dbus_iter, DBUS_TYPE_STRUCT,
+ NULL,
+ &array_iter);
+
+ foreach(QVariant listItem, variantList) {
+ appendVariantToDBusMessage(listItem, &array_iter);
+ }
+
+ dbus_message_iter_close_container(dbus_iter, &array_iter);
+ }
+
+ break;
+ }
+ default:
+ qDebug() << "Unsupported variant type: " << argument.type();
+ break;
+ }
+
+ return true;
+}
+
+static QVariant getVariantFromDBusMessage(DBusMessageIter *iter) {
+ dbus_bool_t bool_data;
+ dbus_int32_t int32_data;
+ dbus_uint32_t uint32_data;
+ dbus_int64_t int64_data;
+ dbus_uint64_t uint64_data;
+ char *str_data;
+ char char_data;
+ int argtype = dbus_message_iter_get_arg_type(iter);
+
+ switch (argtype) {
+
+ case DBUS_TYPE_BOOLEAN:
+ {
+ dbus_message_iter_get_basic(iter, &bool_data);
+ QVariant variant((bool)bool_data);
+ return variant;
+ }
+
+ case DBUS_TYPE_ARRAY:
+ {
+ // Handle all arrays here
+ int elem_type = dbus_message_iter_get_element_type(iter);
+ DBusMessageIter array_iter;
+
+ dbus_message_iter_recurse(iter, &array_iter);
+
+ if (elem_type == DBUS_TYPE_BYTE) {
+ QByteArray byte_array;
+ do {
+ dbus_message_iter_get_basic(&array_iter, &char_data);
+ byte_array.append(char_data);
+ } while (dbus_message_iter_next(&array_iter));
+ QVariant variant(byte_array);
+ return variant;
+ } else if (elem_type == DBUS_TYPE_STRING) {
+ QStringList str_list;
+ do {
+ dbus_message_iter_get_basic(&array_iter, &str_data);
+ str_list.append(str_data);
+ } while (dbus_message_iter_next(&array_iter));
+ QVariant variant(str_list);
+ return variant;
+ } else {
+ QVariantList variantList;
+ do {
+ variantList << getVariantFromDBusMessage(&array_iter);
+ } while (dbus_message_iter_next(&array_iter));
+ QVariant variant(variantList);
+ return variant;
+ }
+ break;
+ }
+
+ case DBUS_TYPE_BYTE:
+ {
+ dbus_message_iter_get_basic(iter, &char_data);
+ QChar ch(char_data);
+ QVariant variant(ch);
+ return variant;
+ }
+
+ case DBUS_TYPE_INT32:
+ {
+ dbus_message_iter_get_basic(iter, &int32_data);
+ QVariant variant((int)int32_data);
+ return variant;
+ }
+
+ case DBUS_TYPE_UINT32:
+ {
+ dbus_message_iter_get_basic(iter, &uint32_data);
+ QVariant variant((uint)uint32_data);
+ return variant;
+ }
+
+ case DBUS_TYPE_STRING:
+ {
+ dbus_message_iter_get_basic(iter, &str_data);
+ QString str(str_data);
+ QVariant variant(str);
+ return variant;
+ }
+
+ case DBUS_TYPE_INT64:
+ {
+ dbus_message_iter_get_basic(iter, &int64_data);
+ QVariant variant((qlonglong)int64_data);
+ return variant;
+ }
+
+ case DBUS_TYPE_UINT64:
+ {
+ dbus_message_iter_get_basic(iter, &uint64_data);
+ QVariant variant((qulonglong)uint64_data);
+ return variant;
+ }
+
+ case DBUS_TYPE_STRUCT:
+ {
+ // Handle all structs here
+ DBusMessageIter struct_iter;
+ dbus_message_iter_recurse(iter, &struct_iter);
+
+ QVariantList variantList;
+ do {
+ variantList << getVariantFromDBusMessage(&struct_iter);
+ } while (dbus_message_iter_next(&struct_iter));
+ QVariant variant(variantList);
+ return variant;
+ }
+
+ default:
+ qDebug() << "Unsupported DBUS type: " << argtype;
+ }
+
+ return QVariant();
+}
+
+static DBusHandlerResult signalHandler (DBusConnection *connection,
+ DBusMessage *message,
+ void *object_ref) {
+ (void)connection;
+ QString interface;
+ QString signal;
+ DBusDispatcher *dispatcher = (DBusDispatcher *)object_ref;
+
+ if (dbus_message_get_type(message) == DBUS_MESSAGE_TYPE_SIGNAL) {
+ interface = dbus_message_get_interface(message);
+ signal = dbus_message_get_member(message);
+
+ QList<QVariant> arglist;
+ DBusMessageIter dbus_iter;
+
+ if (dbus_message_iter_init(message, &dbus_iter)) {
+ // Read return arguments
+ while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) {
+ arglist << getVariantFromDBusMessage(&dbus_iter);
+ dbus_message_iter_next(&dbus_iter);
+ }
+ }
+
+ dispatcher->emitSignalReceived(interface, signal, arglist);
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+ (void)message;
+ return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+}
+
+DBusDispatcher::DBusDispatcher(const QString& service,
+ const QString& path,
+ const QString& interface,
+ QObject *parent)
+ : QObject(parent),
+ d_ptr(new DBusDispatcherPrivate(service, path, interface, path)) {
+ setupDBus();
+}
+
+DBusDispatcher::DBusDispatcher(const QString& service,
+ const QString& path,
+ const QString& interface,
+ const QString& signalPath,
+ QObject *parent)
+ : QObject(parent),
+ d_ptr(new DBusDispatcherPrivate(service, path, interface, signalPath)) {
+ setupDBus();
+}
+
+DBusDispatcher::~DBusDispatcher()
+{
+ if (d_ptr->connection) {
+ dbus_connection_close(d_ptr->connection);
+ dbus_connection_unref(d_ptr->connection);
+ }
+ delete d_ptr;
+}
+
+void DBusDispatcher::setupDBus()
+{
+ d_ptr->connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL);
+
+ if (d_ptr->connection == NULL)
+ qDebug() << "Unable to get DBUS connection!";
+ else {
+ d_ptr->signal_vtable.message_function = signalHandler;
+
+ dbus_connection_set_exit_on_disconnect(d_ptr->connection, FALSE);
+ dbus_connection_setup_with_g_main(d_ptr->connection, NULL);
+ dbus_connection_register_object_path(d_ptr->connection,
+ d_ptr->signalPath.toLatin1(),
+ &d_ptr->signal_vtable,
+ this);
+ }
+}
+
+static DBusMessage *prepareDBusCall(const QString& service,
+ const QString& path,
+ const QString& interface,
+ const QString& method,
+ const QVariant& arg1 = QVariant(),
+ const QVariant& arg2 = QVariant(),
+ const QVariant& arg3 = QVariant(),
+ const QVariant& arg4 = QVariant(),
+ const QVariant& arg5 = QVariant(),
+ const QVariant& arg6 = QVariant(),
+ const QVariant& arg7 = QVariant(),
+ const QVariant& arg8 = QVariant())
+{
+ DBusMessage *message = dbus_message_new_method_call(service.toLatin1(),
+ path.toLatin1(),
+ interface.toLatin1(),
+ method.toLatin1());
+ DBusMessageIter dbus_iter;
+
+ // Append variants to DBUS message
+ QList<QVariant> arglist;
+ if (arg1.isValid()) arglist << arg1;
+ if (arg2.isValid()) arglist << arg2;
+ if (arg3.isValid()) arglist << arg3;
+ if (arg4.isValid()) arglist << arg4;
+ if (arg5.isValid()) arglist << arg5;
+ if (arg6.isValid()) arglist << arg6;
+ if (arg7.isValid()) arglist << arg7;
+ if (arg8.isValid()) arglist << arg8;
+
+ dbus_message_iter_init_append (message, &dbus_iter);
+
+ while (!arglist.isEmpty()) {
+ QVariant argument = arglist.takeFirst();
+ appendVariantToDBusMessage(argument, &dbus_iter);
+ }
+
+ return message;
+}
+
+QList<QVariant> DBusDispatcher::call(const QString& method,
+ const QVariant& arg1,
+ const QVariant& arg2,
+ const QVariant& arg3,
+ const QVariant& arg4,
+ const QVariant& arg5,
+ const QVariant& arg6,
+ const QVariant& arg7,
+ const QVariant& arg8) {
+ DBusMessageIter dbus_iter;
+ DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path,
+ d_ptr->interface, method,
+ arg1, arg2, arg3, arg4, arg5,
+ arg6, arg7, arg8);
+ DBusMessage *reply = dbus_connection_send_with_reply_and_block(
+ d_ptr->connection,
+ message, -1, NULL);
+ dbus_message_unref(message);
+
+ QList<QVariant> replylist;
+ if (reply != NULL && dbus_message_iter_init(reply, &dbus_iter)) {
+ // Read return arguments
+ while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) {
+ replylist << getVariantFromDBusMessage(&dbus_iter);
+ dbus_message_iter_next(&dbus_iter);
+ }
+ }
+ if (reply != NULL) dbus_message_unref(reply);
+ return replylist;
+}
+
+class PendingCallInfo {
+public:
+ QString method;
+ DBusDispatcher *dispatcher;
+ DBusDispatcherPrivate *priv;
+};
+
+static void freePendingCallInfo(void *memory) {
+ PendingCallInfo *info = (PendingCallInfo *)memory;
+ delete info;
+}
+
+static void pendingCallFunction (DBusPendingCall *pending,
+ void *memory) {
+ PendingCallInfo *info = (PendingCallInfo *)memory;
+ QString errorStr;
+ QList<QVariant> replyList;
+ DBusMessage *reply = dbus_pending_call_steal_reply (pending);
+
+ Q_ASSERT(reply != NULL);
+
+ if (dbus_message_get_type(reply) == DBUS_MESSAGE_TYPE_ERROR) {
+ errorStr = dbus_message_get_error_name (reply);
+ } else {
+ DBusMessageIter dbus_iter;
+ dbus_message_iter_init(reply, &dbus_iter);
+ // Read return arguments
+ while (dbus_message_iter_get_arg_type (&dbus_iter) != DBUS_TYPE_INVALID) {
+ replyList << getVariantFromDBusMessage(&dbus_iter);
+ dbus_message_iter_next(&dbus_iter);
+ }
+ }
+
+ info->priv->pending_calls.removeOne(pending);
+ info->dispatcher->emitCallReply(info->method, replyList, errorStr);
+ dbus_message_unref(reply);
+ dbus_pending_call_unref(pending);
+}
+
+bool DBusDispatcher::callAsynchronous(const QString& method,
+ const QVariant& arg1,
+ const QVariant& arg2,
+ const QVariant& arg3,
+ const QVariant& arg4,
+ const QVariant& arg5,
+ const QVariant& arg6,
+ const QVariant& arg7,
+ const QVariant& arg8) {
+ DBusMessage *message = prepareDBusCall(d_ptr->service, d_ptr->path,
+ d_ptr->interface, method,
+ arg1, arg2, arg3, arg4, arg5,
+ arg6, arg7, arg8);
+ DBusPendingCall *call = NULL;
+ dbus_bool_t ret = dbus_connection_send_with_reply(d_ptr->connection,
+ message, &call, -1);
+ PendingCallInfo *info = new PendingCallInfo;
+ info->method = method;
+ info->dispatcher = this;
+ info->priv = d_ptr;
+
+ dbus_pending_call_set_notify(call, pendingCallFunction, info, freePendingCallInfo);
+ d_ptr->pending_calls.append(call);
+ return (bool)ret;
+}
+
+void DBusDispatcher::emitSignalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args) {
+ emit signalReceived(interface, signal, args); }
+
+void DBusDispatcher::emitCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error) {
+ emit callReply(method, args, error); }
+
+void DBusDispatcher::synchronousDispatch(int timeout_ms)
+{
+ dbus_connection_read_write_dispatch(d_ptr->connection, timeout_ms);
+}
+
+} // Maemo namespace
+
diff --git a/src/3rdparty/libconninet/src/dbusdispatcher.h b/src/3rdparty/libconninet/src/dbusdispatcher.h
new file mode 100644
index 0000000000..2f71b6f0dd
--- /dev/null
+++ b/src/3rdparty/libconninet/src/dbusdispatcher.h
@@ -0,0 +1,91 @@
+/* * This file is part of conn-dui-settings-inet *
+ *
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * Contact: Aapo Makela <aapo.makela@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+#ifndef DBUSDISPATCHER_H
+#define DBUSDISPATCHER_H
+
+#include <QObject>
+#include <QVariant>
+
+namespace Maemo {
+
+class DBusDispatcherPrivate;
+class DBusDispatcher : public QObject
+{
+ Q_OBJECT
+
+public:
+ DBusDispatcher(const QString& service,
+ const QString& path,
+ const QString& interface,
+ QObject *parent = 0);
+ DBusDispatcher(const QString& service,
+ const QString& path,
+ const QString& interface,
+ const QString& signalPath,
+ QObject *parent = 0);
+ ~DBusDispatcher();
+
+ QList<QVariant> call(const QString& method,
+ const QVariant& arg1 = QVariant(),
+ const QVariant& arg2 = QVariant(),
+ const QVariant& arg3 = QVariant(),
+ const QVariant& arg4 = QVariant(),
+ const QVariant& arg5 = QVariant(),
+ const QVariant& arg6 = QVariant(),
+ const QVariant& arg7 = QVariant(),
+ const QVariant& arg8 = QVariant());
+ bool callAsynchronous(const QString& method,
+ const QVariant& arg1 = QVariant(),
+ const QVariant& arg2 = QVariant(),
+ const QVariant& arg3 = QVariant(),
+ const QVariant& arg4 = QVariant(),
+ const QVariant& arg5 = QVariant(),
+ const QVariant& arg6 = QVariant(),
+ const QVariant& arg7 = QVariant(),
+ const QVariant& arg8 = QVariant());
+ void emitSignalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args);
+ void emitCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error = "");
+ void synchronousDispatch(int timeout_ms);
+
+Q_SIGNALS:
+ void signalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args);
+ void callReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error);
+
+protected:
+ void setupDBus();
+
+private:
+ DBusDispatcherPrivate *d_ptr;
+};
+
+} // Maemo namespace
+
+#endif
diff --git a/src/3rdparty/libconninet/src/iapconf.cpp b/src/3rdparty/libconninet/src/iapconf.cpp
new file mode 100644
index 0000000000..2e77fa568f
--- /dev/null
+++ b/src/3rdparty/libconninet/src/iapconf.cpp
@@ -0,0 +1,299 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009-2010 Nokia Corporation. All rights reserved.
+
+ Contact: Aapo Makela <aapo.makela@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#include <stdlib.h>
+#include <string.h>
+#include <conn_settings.h>
+
+#include "iapconf.h"
+
+#define QSTRING_TO_CONST_CSTR(str) \
+ str.toUtf8().constData()
+
+namespace Maemo {
+
+class IAPConfPrivate {
+public:
+ ConnSettings *settings;
+
+ ConnSettingsValue *variantToValue(const QVariant &variant);
+ QVariant valueToVariant(ConnSettingsValue *value);
+};
+
+ConnSettingsValue *IAPConfPrivate::variantToValue(const QVariant &variant)
+{
+ // Convert variant to ConnSettingsValue
+ ConnSettingsValue *value = conn_settings_value_new();
+ if (value == 0) {
+ qWarning("IAPConf: Unable to create new ConnSettingsValue");
+ return 0;
+ }
+
+ switch(variant.type()) {
+
+ case QVariant::Invalid:
+ value->type = CONN_SETTINGS_VALUE_INVALID;
+ break;
+
+ case QVariant::String: {
+ char *valueStr = strdup(QSTRING_TO_CONST_CSTR(variant.toString()));
+ value->type = CONN_SETTINGS_VALUE_STRING;
+ value->value.string_val = valueStr;
+ break;
+ }
+
+ case QVariant::Int:
+ value->type = CONN_SETTINGS_VALUE_INT;
+ value->value.int_val = variant.toInt();
+ break;
+
+ case QMetaType::Float:
+ case QVariant::Double:
+ value->type = CONN_SETTINGS_VALUE_DOUBLE;
+ value->value.double_val = variant.toDouble();
+ break;
+
+ case QVariant::Bool:
+ value->type = CONN_SETTINGS_VALUE_BOOL;
+ value->value.bool_val = variant.toBool() ? 1 : 0;
+ break;
+
+ case QVariant::ByteArray: {
+ QByteArray array = variant.toByteArray();
+ value->type = CONN_SETTINGS_VALUE_BYTE_ARRAY;
+ value->value.byte_array.len = array.size();
+ value->value.byte_array.val = (unsigned char *)malloc(array.size());
+ memcpy(value->value.byte_array.val, array.constData(), array.size());
+ break;
+ }
+
+ case QVariant::List: {
+ QVariantList list = variant.toList();
+ ConnSettingsValue **list_val = (ConnSettingsValue **)malloc(
+ (list.size() + 1) * sizeof(ConnSettingsValue *));
+
+ for (int idx = 0; idx < list.size(); idx++) {
+ list_val[idx] = variantToValue(list.at(idx));
+ }
+ list_val[list.size()] = 0;
+
+ value->type = CONN_SETTINGS_VALUE_LIST;
+ value->value.list_val = list_val;
+ break;
+ }
+
+ default:
+ qWarning("IAPConf: Can not handle QVariant of type %d",
+ variant.type());
+ conn_settings_value_destroy(value);
+ return 0;
+ }
+
+ return value;
+}
+
+QVariant IAPConfPrivate::valueToVariant(ConnSettingsValue *value)
+{
+ if (value == 0 || value->type == CONN_SETTINGS_VALUE_INVALID) {
+ return QVariant();
+ }
+
+ switch(value->type) {
+
+ case CONN_SETTINGS_VALUE_BOOL:
+ return QVariant(value->value.bool_val ? true : false);
+
+ case CONN_SETTINGS_VALUE_STRING:
+ return QVariant(QString(value->value.string_val));
+
+ case CONN_SETTINGS_VALUE_DOUBLE:
+ return QVariant(value->value.double_val);
+
+ case CONN_SETTINGS_VALUE_INT:
+ return QVariant(value->value.int_val);
+
+ case CONN_SETTINGS_VALUE_LIST: {
+ // At least with GConf backend connsettings returns byte array as list
+ // of ints, first check for that case
+ if (value->value.list_val && value->value.list_val[0]) {
+ bool canBeConvertedToByteArray = true;
+ for (int idx = 0; value->value.list_val[idx]; idx++) {
+ ConnSettingsValue *val = value->value.list_val[idx];
+ if (val->type != CONN_SETTINGS_VALUE_INT
+ || val->value.int_val > 255
+ || val->value.int_val < 0) {
+ canBeConvertedToByteArray = false;
+ break;
+ }
+ }
+
+ if (canBeConvertedToByteArray) {
+ QByteArray array;
+ for (int idx = 0; value->value.list_val[idx]; idx++) {
+ array.append(value->value.list_val[idx]->value.int_val);
+ }
+ return array;
+ }
+
+ // Create normal list
+ QVariantList list;
+ for (int idx = 0; value->value.list_val[idx]; idx++) {
+ list.append(valueToVariant(value->value.list_val[idx]));
+ }
+ return list;
+ }
+ }
+
+ case CONN_SETTINGS_VALUE_BYTE_ARRAY:
+ return QByteArray::fromRawData((char *)value->value.byte_array.val,
+ value->value.byte_array.len);
+
+ default:
+ return QVariant();
+ }
+}
+
+// Public class implementation
+
+IAPConf::IAPConf(const QString &iap_id)
+ : d_ptr(new IAPConfPrivate)
+{
+ d_ptr->settings = conn_settings_open(CONN_SETTINGS_CONNECTION,
+ QSTRING_TO_CONST_CSTR(iap_id));
+ if (d_ptr->settings == 0) {
+ qWarning("IAPConf: Unable to open ConnSettings for %s",
+ QSTRING_TO_CONST_CSTR(iap_id));
+ }
+}
+
+IAPConf::~IAPConf()
+{
+ conn_settings_close(d_ptr->settings);
+ delete d_ptr;
+}
+
+void IAPConf::setValue(const QString& key, const QVariant& value)
+{
+ // Invalid value means unsetting the given key
+ if (!value.isValid()) {
+ int err = conn_settings_unset(d_ptr->settings,
+ QSTRING_TO_CONST_CSTR(key));
+ if (err != CONN_SETTINGS_E_NO_ERROR) {
+ qWarning("IAPConf: unable to unset key %s: %s",
+ QSTRING_TO_CONST_CSTR(key),
+ conn_settings_error_text((ConnSettingsError)err));
+ }
+ return;
+ }
+
+ // Convert value to ConnSettingsValue
+ ConnSettingsValue *val = d_ptr->variantToValue(value);
+ if (val == 0) return;
+
+ // Set value and handle errors
+ int error = conn_settings_set(d_ptr->settings,
+ QSTRING_TO_CONST_CSTR(key),
+ val);
+ if (error != CONN_SETTINGS_E_NO_ERROR) {
+ qWarning("IAPConf: error in setting key %s: %s",
+ QSTRING_TO_CONST_CSTR(key),
+ conn_settings_error_text((ConnSettingsError)error));
+ }
+
+ // Destroy value
+ conn_settings_value_destroy(val);
+ return;
+}
+
+void IAPConf::set(const QString& key1, const QVariant& value1,
+ const QString& key2, const QVariant& value2,
+ const QString& key3, const QVariant& value3,
+ const QString& key4, const QVariant& value4,
+ const QString& key5, const QVariant& value5,
+ const QString& key6, const QVariant& value6,
+ const QString& key7, const QVariant& value7,
+ const QString& key8, const QVariant& value8,
+ const QString& key9, const QVariant& value9,
+ const QString& key10, const QVariant& value10)
+{
+ if (!key1.isEmpty()) setValue(key1, value1);
+ if (!key2.isEmpty()) setValue(key2, value2);
+ if (!key3.isEmpty()) setValue(key3, value3);
+ if (!key4.isEmpty()) setValue(key4, value4);
+ if (!key5.isEmpty()) setValue(key5, value5);
+ if (!key6.isEmpty()) setValue(key6, value6);
+ if (!key7.isEmpty()) setValue(key7, value7);
+ if (!key8.isEmpty()) setValue(key8, value8);
+ if (!key9.isEmpty()) setValue(key9, value9);
+ if (!key10.isEmpty()) setValue(key10, value10);
+}
+
+QVariant IAPConf::value(const QString& key) const
+{
+ ConnSettingsValue *val = conn_settings_get(d_ptr->settings,
+ QSTRING_TO_CONST_CSTR(key));
+
+ QVariant variant = d_ptr->valueToVariant(val);
+ conn_settings_value_destroy(val);
+ return variant;
+}
+
+void IAPConf::clear(const char *default_path)
+{
+ Q_UNUSED(default_path); // default path is unused
+
+ int error = conn_settings_remove(d_ptr->settings);
+ if (error != CONN_SETTINGS_E_NO_ERROR) {
+ qWarning("IAPConf: Error when removing IAP: %s",
+ conn_settings_error_text((ConnSettingsError)error));
+ }
+}
+
+void IAPConf::clearAll()
+{
+ ConnSettings *settings = conn_settings_open(CONN_SETTINGS_CONNECTION,
+ NULL);
+ conn_settings_remove(settings);
+ conn_settings_close(settings);
+}
+
+
+void IAPConf::getAll(QList<QString> &all_iaps, bool return_path)
+{
+ Q_UNUSED(return_path); // We don't use return path currently
+
+ // Go through all available connections and add them to the list
+ char **ids = conn_settings_list_ids(CONN_SETTINGS_CONNECTION);
+ if (ids == 0) {
+ // No ids found - nothing to do
+ return;
+ }
+
+ for (int idx = 0; ids[idx]; idx++) {
+ all_iaps.append(QString(ids[idx]));
+ free(ids[idx]);
+ }
+ free(ids);
+}
+
+
+} // namespace Maemo
diff --git a/src/3rdparty/libconninet/src/iapconf.h b/src/3rdparty/libconninet/src/iapconf.h
new file mode 100644
index 0000000000..57c08566c9
--- /dev/null
+++ b/src/3rdparty/libconninet/src/iapconf.h
@@ -0,0 +1,84 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009 Nokia Corporation. All rights reserved.
+
+ Contact: Aapo Makela <aapo.makela@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#ifndef IAPCONF_H
+#define IAPCONF_H
+
+#include <QString>
+#include <QVariant>
+
+namespace Maemo {
+
+class IAPConfPrivate;
+class IAPConf {
+public:
+ IAPConf(const QString &iap_id);
+ virtual ~IAPConf();
+
+ /**
+ Convenience method for setting multiple IAP values with one call.
+ */
+ void set(const QString& key1, const QVariant& value1,
+ const QString& key2 = "", const QVariant& value2 = QVariant(),
+ const QString& key3 = "", const QVariant& value3 = QVariant(),
+ const QString& key4 = "", const QVariant& value4 = QVariant(),
+ const QString& key5 = "", const QVariant& value5 = QVariant(),
+ const QString& key6 = "", const QVariant& value6 = QVariant(),
+ const QString& key7 = "", const QVariant& value7 = QVariant(),
+ const QString& key8 = "", const QVariant& value8 = QVariant(),
+ const QString& key9 = "", const QVariant& value9 = QVariant(),
+ const QString& key10 = "", const QVariant& value10 = QVariant());
+
+ /**
+ Set one IAP value.
+ */
+ void setValue(const QString& key, const QVariant& value);
+
+ /**
+ Get one IAP value.
+ */
+ QVariant value(const QString& key) const;
+
+ /**
+ Clear this IAP from GConf
+ */
+ void clear(const char *default_path=0);
+
+ /**
+ Clear all IAP specific information from GConf (including all IAPs).
+ DO NOT USE THIS FUNCTION IN ANYWHERE ELSE EXCEPT IN TEST CODE!
+ */
+ void clearAll();
+
+ /**
+ Return all the IAPs found in the system. If return_path is true,
+ then do not strip the IAP path away.
+ */
+ static void getAll(QList<QString> &all_iaps, bool return_path=false);
+
+private:
+ IAPConfPrivate *d_ptr;
+};
+
+} // namespace Maemo
+
+#endif
diff --git a/src/3rdparty/libconninet/src/iapmonitor.cpp b/src/3rdparty/libconninet/src/iapmonitor.cpp
new file mode 100644
index 0000000000..c44cbc8392
--- /dev/null
+++ b/src/3rdparty/libconninet/src/iapmonitor.cpp
@@ -0,0 +1,110 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009-2010 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#include <QStringList>
+
+#include <conn_settings.h>
+#include "iapmonitor.h"
+
+namespace Maemo {
+
+
+void conn_settings_notify_func (ConnSettingsType type,
+ const char *id,
+ const char *key,
+ ConnSettingsValue *value,
+ void *user_data);
+
+class IAPMonitorPrivate {
+private:
+ IAPMonitor *monitor;
+ ConnSettings *settings;
+
+public:
+
+ IAPMonitorPrivate(IAPMonitor *monitor)
+ : monitor(monitor)
+ {
+ settings = conn_settings_open(CONN_SETTINGS_CONNECTION, NULL);
+ conn_settings_add_notify(
+ settings,
+ (ConnSettingsNotifyFunc *)conn_settings_notify_func,
+ this);
+ }
+
+ ~IAPMonitorPrivate()
+ {
+ conn_settings_del_notify(settings);
+ conn_settings_close(settings);
+ }
+
+ void iapAdded(const QString &iap)
+ {
+ monitor->iapAdded(iap);
+ }
+
+ void iapRemoved(const QString &iap)
+ {
+ monitor->iapRemoved(iap);
+ }
+};
+
+void conn_settings_notify_func (ConnSettingsType type,
+ const char *id,
+ const char *key,
+ ConnSettingsValue *value,
+ void *user_data)
+{
+ if (type != CONN_SETTINGS_CONNECTION) return;
+ IAPMonitorPrivate *priv = (IAPMonitorPrivate *)user_data;
+
+ QString iapId(key);
+ iapId = iapId.split("/")[0];
+ if (value != 0) {
+ priv->iapAdded(iapId);
+ } else if (iapId == QString(key)) {
+ // IAP is removed only when the directory gets removed
+ priv->iapRemoved(iapId);
+ }
+}
+
+IAPMonitor::IAPMonitor()
+ : d_ptr(new IAPMonitorPrivate(this))
+{
+}
+
+IAPMonitor::~IAPMonitor()
+{
+ delete d_ptr;
+}
+
+void IAPMonitor::iapAdded(const QString &id)
+{
+ // By default do nothing
+}
+
+void IAPMonitor::iapRemoved(const QString &id)
+{
+ // By default do nothing
+}
+
+} // namespace Maemo
diff --git a/src/3rdparty/libconninet/src/iapmonitor.h b/src/3rdparty/libconninet/src/iapmonitor.h
new file mode 100644
index 0000000000..558f23e5c2
--- /dev/null
+++ b/src/3rdparty/libconninet/src/iapmonitor.h
@@ -0,0 +1,48 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009-2010 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#ifndef IAPMONITOR_H
+#define IAPMONITOR_H
+
+#include <QString>
+
+namespace Maemo {
+
+class IAPMonitorPrivate;
+class IAPMonitor {
+public:
+ IAPMonitor();
+ ~IAPMonitor();
+
+protected:
+ virtual void iapAdded(const QString &id);
+ virtual void iapRemoved(const QString &id);
+
+private:
+ IAPMonitorPrivate *d_ptr;
+ Q_DECLARE_PRIVATE(IAPMonitor);
+};
+
+} // namespace Maemo
+
+#endif // IAPMONITOR_H
+
diff --git a/src/3rdparty/libconninet/src/maemo_icd.cpp b/src/3rdparty/libconninet/src/maemo_icd.cpp
new file mode 100644
index 0000000000..bc84fbcd0d
--- /dev/null
+++ b/src/3rdparty/libconninet/src/maemo_icd.cpp
@@ -0,0 +1,1277 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#include <stdio.h>
+#include "maemo_icd.h"
+#include <QObject>
+#include <QTimer>
+#include <QCoreApplication>
+#include <QEventLoop>
+#include <QDebug>
+#include <dbus/dbus.h>
+#include <dbus/dbus-glib-lowlevel.h>
+
+
+namespace Maemo {
+
+/* Reference counting singleton class that creates a single connection
+ * to icd so that icd reference counting works as expected. This is
+ * needed because DBusDispatcher uses private dbus connections
+ * which come and go and icd cannot use that information to
+ * determine whether application quit or not. So we create one
+ * persistent connection that is only teared down when application
+ * quits or calls disconnect()
+ */
+class IcdRefCounting
+{
+public:
+ IcdRefCounting() : first_call(true) { }
+ void setup(enum icd_connection_flags flag);
+ void cleanup();
+
+private:
+ bool first_call;
+ struct DBusConnection *connection;
+};
+
+Q_GLOBAL_STATIC(IcdRefCounting, icdRefCounting);
+
+
+void IcdRefCounting::setup(enum icd_connection_flags flag)
+{
+ if (first_call) {
+ DBusMessage *msg = NULL;
+
+ connection = dbus_bus_get_private(DBUS_BUS_SYSTEM, NULL);
+ dbus_connection_set_exit_on_disconnect(connection, FALSE);
+ dbus_connection_setup_with_g_main(connection, NULL);
+
+ msg = dbus_message_new_method_call(ICD_DBUS_API_INTERFACE,
+ ICD_DBUS_API_PATH,
+ ICD_DBUS_API_INTERFACE,
+ ICD_DBUS_API_CONNECT_REQ);
+ if (msg == NULL)
+ goto out;
+
+ if (!dbus_message_append_args(msg,
+ DBUS_TYPE_UINT32, &flag,
+ DBUS_TYPE_INVALID))
+ goto out;
+
+ if (!dbus_connection_send_with_reply(connection, msg,
+ NULL, 60*1000))
+ goto out;
+
+ first_call = false;
+ return;
+
+ out:
+ dbus_connection_close(connection);
+ dbus_connection_unref(connection);
+ }
+}
+
+void IcdRefCounting::cleanup()
+{
+ if (!first_call) {
+ dbus_connection_close(connection);
+ dbus_connection_unref(connection);
+ first_call = true;
+ }
+}
+
+
+class IcdPrivate
+{
+public:
+ IcdPrivate(Icd *myfriend)
+ {
+ init(10000, IcdNewDbusInterface, myfriend);
+ }
+
+ IcdPrivate(unsigned int timeout, Icd *myfriend)
+ {
+ init(timeout, IcdNewDbusInterface, myfriend);
+ }
+
+ IcdPrivate(unsigned int timeout, IcdDbusInterfaceVer ver, Icd *myfriend)
+ {
+ /* Note that the old Icd interface is currently disabled and
+ * the new one is always used.
+ */
+ init(timeout, IcdNewDbusInterface, myfriend);
+ }
+
+ ~IcdPrivate()
+ {
+ QObject::disconnect(mDBus,
+ SIGNAL(signalReceived(const QString&,
+ const QString&,
+ const QList<QVariant>&)),
+ icd,
+ SLOT(icdSignalReceived(const QString&,
+ const QString&,
+ const QList<QVariant>&)));
+
+ QObject::disconnect(mDBus,
+ SIGNAL(callReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)),
+ icd,
+ SLOT(icdCallReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)));
+
+ delete mDBus;
+ mDBus = 0;
+ }
+
+ /* Icd2 dbus API functions */
+ QStringList scan(icd_scan_request_flags flags,
+ QStringList &network_types,
+ QList<IcdScanResult>& scan_results,
+ QString& error);
+ void scanCancel();
+ bool connect(icd_connection_flags flags, IcdConnectResult& result);
+ bool connect(icd_connection_flags flags, QList<ConnectParams>& params,
+ IcdConnectResult& result);
+ bool connect(icd_connection_flags flags, QString& iap, QString& result);
+ void select(uint flags);
+ void disconnect(uint connect_flags, QString& service_type,
+ uint service_attrs, QString& service_id,
+ QString& network_type, uint network_attrs,
+ QByteArray& network_id);
+ void disconnect(uint connect_flags);
+
+ uint state(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStateResult &state_result);
+ uint statistics(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStatisticsResult& stats_result);
+ uint addrinfo(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdAddressInfoResult& addr_result);
+
+ uint state(QList<IcdStateResult>& state_results);
+ uint state_non_blocking(QList<IcdStateResult>& state_results);
+ uint statistics(QList<IcdStatisticsResult>& stats_results);
+ uint addrinfo(QList<IcdAddressInfoResult>& addr_results);
+ uint addrinfo_non_blocking(QList<IcdAddressInfoResult>& addr_results);
+
+ void signalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args);
+ void callReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error);
+
+ QString error() { return mError; }
+
+public:
+ DBusDispatcher *mDBus;
+ QString mMethod;
+ QString mInterface;
+ QString mSignal;
+ QString mError;
+ QList<QVariant> mArgs;
+ QList<QVariant> receivedSignals;
+ unsigned int timeout;
+ IcdDbusInterfaceVer icd_dbus_version;
+ Icd *icd;
+
+ void init(unsigned int dbus_timeout, IcdDbusInterfaceVer ver,
+ Icd *myfriend)
+ {
+ if (ver == IcdNewDbusInterface) {
+ mDBus = new DBusDispatcher(ICD_DBUS_API_INTERFACE,
+ ICD_DBUS_API_PATH,
+ ICD_DBUS_API_INTERFACE);
+ } else {
+ mDBus = new DBusDispatcher(ICD_DBUS_SERVICE,
+ ICD_DBUS_PATH,
+ ICD_DBUS_INTERFACE);
+ }
+ icd_dbus_version = ver;
+
+ /* This connect has a side effect as it means that only one
+ * Icd object can exists in one time. This should be fixed!
+ */
+ QObject::connect(mDBus,
+ SIGNAL(signalReceived(const QString&,
+ const QString&,
+ const QList<QVariant>&)),
+ myfriend,
+ SLOT(icdSignalReceived(const QString&,
+ const QString&,
+ const QList<QVariant>&)));
+
+ QObject::connect(mDBus,
+ SIGNAL(callReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)),
+ myfriend,
+ SLOT(icdCallReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)));
+
+ icd = myfriend;
+ timeout = dbus_timeout;
+ }
+
+ void clearState()
+ {
+ mMethod.clear();
+ mInterface.clear();
+ mSignal.clear();
+ mError.clear();
+ mArgs.clear();
+ receivedSignals.clear();
+ }
+
+ bool doConnect(IcdConnectResult& result);
+ bool doConnect(QString& result);
+ bool doState();
+};
+
+
+void IcdPrivate::signalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args)
+{
+ // Signal handler, which simply records what has been signalled
+ mInterface = interface;
+ mSignal = signal;
+ mArgs = args;
+
+ //qDebug() << "signal" << signal << "received:" << args;
+ receivedSignals << QVariant(interface) << QVariant(signal) << QVariant(args);
+}
+
+
+void IcdPrivate::callReply(const QString& method,
+ const QList<QVariant>& /*args*/,
+ const QString& error)
+{
+ mMethod = method;
+ mError = error;
+}
+
+
+static void get_scan_result(QList<QVariant>& args,
+ IcdScanResult& ret)
+{
+ int i=0;
+
+ if (args.isEmpty())
+ return;
+
+ ret.status = args[i++].toUInt();
+ ret.timestamp = args[i++].toUInt();
+ ret.scan.service_type = args[i++].toString();
+ ret.service_name = args[i++].toString();
+ ret.scan.service_attrs = args[i++].toUInt();
+ ret.scan.service_id = args[i++].toString();
+ ret.service_priority = args[i++].toInt();
+ ret.scan.network_type = args[i++].toString();
+ ret.network_name = args[i++].toString();
+ ret.scan.network_attrs = args[i++].toUInt();
+ ret.scan.network_id = args[i++].toByteArray();
+ ret.network_priority = args[i++].toInt();
+ ret.signal_strength = args[i++].toInt();
+ ret.station_id = args[i++].toString();
+ ret.signal_dB = args[i++].toInt();
+}
+
+
+static void get_connect_result(QList<QVariant>& args,
+ IcdConnectResult& ret)
+{
+ int i=0;
+
+ if (args.isEmpty())
+ return;
+
+ ret.connect.service_type = args[i++].toString();
+ ret.connect.service_attrs = args[i++].toInt();
+ ret.connect.service_id = args[i++].toString();
+ ret.connect.network_type = args[i++].toString();
+ ret.connect.network_attrs = args[i++].toInt();
+ ret.connect.network_id = args[i++].toByteArray();
+ ret.status = args[i++].toInt();
+}
+
+
+QStringList IcdPrivate::scan(icd_scan_request_flags flags,
+ QStringList &network_types,
+ QList<IcdScanResult>& scan_results,
+ QString& error)
+{
+ QStringList scanned_types;
+ QTimer timer;
+ QVariant reply;
+ QVariantList vl;
+ bool last_result = false;
+ IcdScanResult result;
+ int all_waited;
+
+ clearState();
+ reply = mDBus->call(ICD_DBUS_API_SCAN_REQ, (uint)flags);
+ if (reply.type() != QVariant::List)
+ return scanned_types;
+ vl = reply.toList();
+ if (vl.isEmpty()) {
+ error = "Scan did not return anything.";
+ return scanned_types;
+ }
+ reply = vl.first();
+ scanned_types = reply.toStringList();
+ //qDebug() << "Scanning:" << scanned_types;
+ all_waited = scanned_types.size();
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+
+ scan_results.clear();
+ while (!last_result) {
+ while (timer.isActive() && mInterface.isEmpty() && mError.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ }
+
+ if (!timer.isActive()) {
+ //qDebug() << "Timeout happened";
+ break;
+ }
+
+ if (mSignal != ICD_DBUS_API_SCAN_SIG) {
+ //qDebug() << "Received" << mSignal << "while waiting" << ICD_DBUS_API_SCAN_SIG << ", ignoring";
+ mInterface.clear();
+ continue;
+ }
+
+ if (mError.isEmpty()) {
+ QString msgInterface = receivedSignals.takeFirst().toString();
+ QString msgSignal = receivedSignals.takeFirst().toString();
+ QList<QVariant> msgArgs = receivedSignals.takeFirst().toList();
+ //qDebug() << "Signal" << msgSignal << "received.";
+ //qDebug() << "Params:" << msgArgs;
+
+ while (!msgSignal.isEmpty()) {
+ get_scan_result(msgArgs, result);
+
+#if 0
+ qDebug() << "Received: " <<
+ "status =" << result.status <<
+ ", timestamp =" << result.timestamp <<
+ ", service_type =" << result.scan.service_type <<
+ ", service_name =" << result.service_name <<
+ ", service_attrs =" << result.scan.service_attrs <<
+ ", service_id =" << result.scan.service_id <<
+ ", service_priority =" << result.service_priority <<
+ ", network_type =" << result.scan.network_type <<
+ ", network_name =" << result.network_name <<
+ ", network_attrs =" << result.scan.network_attrs <<
+ ", network_id =" << "-" <<
+ ", network_priority =" << result.network_priority <<
+ ", signal_strength =" << result.signal_strength <<
+ ", station_id =" << result.station_id <<
+ ", signal_dB =" << result.signal_dB;
+#endif
+
+ if (result.status == ICD_SCAN_COMPLETE) {
+ //qDebug() << "waited =" << all_waited;
+ if (--all_waited == 0) {
+ last_result = true;
+ break;
+ }
+ } else
+ scan_results << result;
+
+ if (receivedSignals.isEmpty())
+ break;
+
+ msgInterface = receivedSignals.takeFirst().toString();
+ msgSignal = receivedSignals.takeFirst().toString();
+ msgArgs = receivedSignals.takeFirst().toList();
+ }
+ mInterface.clear();
+
+ } else {
+ qWarning() << "Error while scanning:" << mError;
+ break;
+ }
+ }
+ timer.stop();
+
+ error = mError;
+ return scanned_types;
+}
+
+
+void IcdPrivate::scanCancel()
+{
+ mDBus->call(ICD_DBUS_API_SCAN_CANCEL);
+}
+
+
+bool IcdPrivate::doConnect(IcdConnectResult& result)
+{
+ QTimer timer;
+ bool status = false;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+
+ //qDebug() << "Waiting" << ICD_DBUS_API_CONNECT_SIG << "signal";
+
+ while (timer.isActive() && mInterface.isEmpty() &&
+ mSignal != ICD_DBUS_API_CONNECT_SIG &&
+ mError.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ }
+
+ timer.stop();
+
+ if (mError.isEmpty()) {
+ if (!mArgs.isEmpty()) {
+ get_connect_result(mArgs, result);
+ status = true;
+ } else
+ status = false;
+ } else
+ status = false;
+
+ return status;
+}
+
+
+bool IcdPrivate::connect(icd_connection_flags flags, IcdConnectResult& result)
+{
+ clearState();
+ //mDBus->callAsynchronous(ICD_DBUS_API_CONNECT_REQ, (uint)flags);
+ mDBus->call(ICD_DBUS_API_CONNECT_REQ, (uint)flags);
+ icdRefCounting()->setup(flags);
+ return doConnect(result);
+}
+
+
+bool IcdPrivate::connect(icd_connection_flags flags, QList<ConnectParams>& params,
+ IcdConnectResult& result)
+{
+ QVariantList varlist;
+ QVariantList varlist2;
+
+ foreach (ConnectParams param, params) {
+ QVariantList items;
+
+ items.append(QVariant(param.connect.service_type));
+ items.append(QVariant(param.connect.service_attrs));
+ items.append(QVariant(param.connect.service_id));
+ items.append(QVariant(param.connect.network_type));
+ items.append(QVariant(param.connect.network_attrs));
+ items.append(QVariant(param.connect.network_id));
+
+ varlist.append(items);
+ }
+
+ varlist2.append(QVariant(varlist));
+
+ clearState();
+ //mDBus->callAsynchronous(ICD_DBUS_API_CONNECT_REQ, (uint)flags, varlist2);
+ mDBus->call(ICD_DBUS_API_CONNECT_REQ, (uint)flags, varlist2);
+ icdRefCounting()->setup(flags);
+ return doConnect(result);
+}
+
+
+bool IcdPrivate::doConnect(QString& ret)
+{
+ QTimer timer;
+ bool status = false;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+
+ while (timer.isActive() && mInterface.isEmpty() &&
+ mError.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ }
+
+ timer.stop();
+
+ if (mError.isEmpty()) {
+ if (!mArgs.isEmpty()) {
+ status = true;
+ //ret = mArgs[0]; // TODO correctly
+ } else
+ status = false;
+ } else
+ status = false;
+
+ return status;
+}
+
+
+bool IcdPrivate::connect(icd_connection_flags flags, QString& iap, QString& result)
+{
+ clearState();
+ //mDBus->callAsynchronous(ICD_CONNECT_REQ, iap, (uint)flags);
+ mDBus->call(ICD_CONNECT_REQ, iap, (uint)flags);
+ icdRefCounting()->setup(flags);
+ return doConnect(result);
+}
+
+
+void IcdPrivate::select(uint flags)
+{
+ mDBus->call(ICD_DBUS_API_SELECT_REQ, flags);
+}
+
+
+void IcdPrivate::disconnect(uint flags, QString& service_type,
+ uint service_attrs, QString& service_id,
+ QString& network_type, uint network_attrs,
+ QByteArray& network_id)
+{
+ clearState();
+ mDBus->call(ICD_DBUS_API_DISCONNECT_REQ, flags,
+ service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id);
+ icdRefCounting()->cleanup();
+}
+
+
+void IcdPrivate::disconnect(uint flags)
+{
+ clearState();
+ mDBus->call(ICD_DBUS_API_DISCONNECT_REQ, flags);
+ icdRefCounting()->cleanup();
+}
+
+
+static void get_state_all_result(QList<QVariant>& args,
+ IcdStateResult& ret)
+{
+ int i=0;
+
+ ret.params.service_type = args[i++].toString();
+ ret.params.service_attrs = args[i++].toUInt();
+ ret.params.service_id = args[i++].toString();
+ ret.params.network_type = args[i++].toString();
+ ret.params.network_attrs = args[i++].toUInt();
+ ret.params.network_id = args[i++].toByteArray();
+ ret.error = args[i++].toString();
+ ret.state = args[i++].toInt();
+}
+
+
+static void get_state_all_result2(QList<QVariant>& args,
+ IcdStateResult& ret)
+{
+ int i=0;
+
+ ret.params.network_type = args[i++].toString();
+ ret.state = args[i++].toInt();
+
+ // Initialize the other values so that the caller can
+ // notice we only returned partial status
+ ret.params.service_type = QString();
+ ret.params.service_attrs = 0;
+ ret.params.service_id = QString();
+ ret.params.network_attrs = 0;
+ ret.params.network_id = QByteArray();
+ ret.error = QString();
+}
+
+
+uint IcdPrivate::state(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStateResult& state_result)
+{
+ QTimer timer;
+ QVariant reply;
+ uint total_signals;
+ QVariantList vl;
+
+ clearState();
+
+ reply = mDBus->call(ICD_DBUS_API_STATE_REQ,
+ service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ total_signals = reply.toUInt();
+ if (!total_signals)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+
+ if (mSignal != ICD_DBUS_API_STATE_SIG) {
+ mInterface.clear();
+ continue;
+ }
+ }
+
+ timer.stop();
+
+ if (mError.isEmpty()) {
+ if (!mArgs.isEmpty()) {
+ if (mArgs.size()>2)
+ get_state_all_result(mArgs, state_result);
+ else {
+ // We are not connected as we did not get the status we asked
+ return 0;
+ }
+ }
+ } else {
+ qWarning() << "Error:" << mError;
+ }
+
+ // The returned value should be one because we asked for one state
+ return total_signals;
+}
+
+
+uint IcdPrivate::state_non_blocking(QList<IcdStateResult>& state_results)
+{
+ QTimer timer;
+ QVariant reply;
+ QVariantList vl;
+ uint signals_left, total_signals;
+ IcdStateResult result;
+
+ clearState();
+ reply = mDBus->call(ICD_DBUS_API_STATE_REQ);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ signals_left = total_signals = reply.toUInt();
+ if (!signals_left)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ state_results.clear();
+ mError.clear();
+ while (signals_left) {
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ }
+
+ if (!timer.isActive()) {
+ total_signals = 0;
+ break;
+ }
+
+ if (mSignal != ICD_DBUS_API_STATE_SIG) {
+ continue;
+ }
+
+ if (mError.isEmpty()) {
+ if (!mArgs.isEmpty()) {
+ if (mArgs.size()==2)
+ get_state_all_result2(mArgs, result);
+ else
+ get_state_all_result(mArgs, result);
+ state_results << result;
+ }
+ signals_left--;
+ } else {
+ qWarning() << "Error:" << mError;
+ break;
+ }
+ }
+ timer.stop();
+
+ return total_signals;
+}
+
+
+/* Special version of the state() call which does not call event loop.
+ * Needed in order to fix NB#175098 where Qt4.7 webkit crashes because event
+ * loop is run when webkit does not expect it. This function is called from
+ * bearer management API syncStateWithInterface() in QNetworkSession
+ * constructor.
+ */
+uint IcdPrivate::state(QList<IcdStateResult>& state_results)
+{
+ QTimer timer;
+ QVariant reply;
+ QVariantList vl;
+ uint signals_left, total_signals;
+ IcdStateResult result;
+
+ clearState();
+ reply = mDBus->call(ICD_DBUS_API_STATE_REQ);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ signals_left = total_signals = reply.toUInt();
+ if (!signals_left)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ state_results.clear();
+ mError.clear();
+ while (signals_left) {
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ mDBus->synchronousDispatch(1000);
+ }
+
+ if (!timer.isActive()) {
+ total_signals = 0;
+ break;
+ }
+
+ if (mSignal != ICD_DBUS_API_STATE_SIG) {
+ continue;
+ }
+
+ if (mError.isEmpty()) {
+ if (!mArgs.isEmpty()) {
+ if (mArgs.size()==2)
+ get_state_all_result2(mArgs, result);
+ else
+ get_state_all_result(mArgs, result);
+ state_results << result;
+ }
+ signals_left--;
+ } else {
+ qWarning() << "Error:" << mError;
+ break;
+ }
+ }
+ timer.stop();
+
+ return total_signals;
+}
+
+
+static void get_statistics_all_result(QList<QVariant>& args,
+ IcdStatisticsResult& ret)
+{
+ int i=0;
+
+ if (args.isEmpty())
+ return;
+
+ ret.params.service_type = args[i++].toString();
+ ret.params.service_attrs = args[i++].toUInt();
+ ret.params.service_id = args[i++].toString();
+ ret.params.network_type = args[i++].toString();
+ ret.params.network_attrs = args[i++].toUInt();
+ ret.params.network_id = args[i++].toByteArray();
+ ret.time_active = args[i++].toUInt();
+ ret.signal_strength = (enum icd_nw_levels)args[i++].toUInt();
+ ret.bytes_sent = args[i++].toUInt();
+ ret.bytes_received = args[i++].toUInt();
+}
+
+
+uint IcdPrivate::statistics(QList<IcdStatisticsResult>& stats_results)
+{
+ QTimer timer;
+ QVariant reply;
+ QVariantList vl;
+ uint signals_left, total_signals;
+ IcdStatisticsResult result;
+
+ clearState();
+ reply = mDBus->call(ICD_DBUS_API_STATISTICS_REQ);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ if (reply.type() != QVariant::UInt)
+ return 0;
+ signals_left = total_signals = reply.toUInt();
+
+ if (!signals_left)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ stats_results.clear();
+ while (signals_left) {
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ }
+
+ if (!timer.isActive()) {
+ total_signals = 0;
+ break;
+ }
+
+ if (mSignal != ICD_DBUS_API_STATISTICS_SIG) {
+ continue;
+ }
+
+ if (mError.isEmpty()) {
+ get_statistics_all_result(mArgs, result);
+ stats_results << result;
+ signals_left--;
+ } else {
+ qWarning() << "Error:" << mError;
+ break;
+ }
+ }
+ timer.stop();
+
+ return total_signals;
+}
+
+
+uint IcdPrivate::statistics(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStatisticsResult& stats_result)
+{
+ QTimer timer;
+ QVariant reply;
+ uint total_signals;
+ QVariantList vl;
+
+ clearState();
+
+ reply = mDBus->call(ICD_DBUS_API_STATISTICS_REQ,
+ service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ total_signals = reply.toUInt();
+ if (!total_signals)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+
+ if (mSignal != ICD_DBUS_API_STATISTICS_SIG) {
+ mInterface.clear();
+ continue;
+ }
+ }
+
+ timer.stop();
+
+ if (mError.isEmpty()) {
+ get_statistics_all_result(mArgs, stats_result);
+ } else {
+ qWarning() << "Error:" << mError;
+ }
+
+ // The returned value should be one because we asked for one statistics
+ return total_signals;
+}
+
+
+static void get_addrinfo_all_result(QList<QVariant>& args,
+ IcdAddressInfoResult& ret)
+{
+ int i=0;
+
+ if (args.isEmpty())
+ return;
+
+ ret.params.service_type = args[i++].toString();
+ ret.params.service_attrs = args[i++].toUInt();
+ ret.params.service_id = args[i++].toString();
+ ret.params.network_type = args[i++].toString();
+ ret.params.network_attrs = args[i++].toUInt();
+ ret.params.network_id = args[i++].toByteArray();
+
+ QVariantList vl = args[i].toList();
+ QVariant reply = vl.first();
+ QList<QVariant> lst = reply.toList();
+ for (int k=0; k<lst.size()/6; k=k+6) {
+ IcdIPInformation ip_info;
+ ip_info.address = lst[k].toString();
+ ip_info.netmask = lst[k++].toString();
+ ip_info.default_gateway = lst[k++].toString();
+ ip_info.dns1 = lst[k++].toString();
+ ip_info.dns2 = lst[k++].toString();
+ ip_info.dns3 = lst[k++].toString();
+
+ ret.ip_info << ip_info;
+ }
+}
+
+
+/* Special version of the addrinfo() call which does not call event loop.
+ * Needed in order to fix NB#175098 where Qt4.7 webkit crashes because event
+ * loop is run when webkit does not expect it. This function is called from
+ * bearer management API syncStateWithInterface() in QNetworkSession
+ * constructor.
+ */
+uint IcdPrivate::addrinfo(QList<IcdAddressInfoResult>& addr_results)
+{
+ QTimer timer;
+ QVariant reply;
+ QVariantList vl;
+ uint signals_left, total_signals;
+ IcdAddressInfoResult result;
+
+ clearState();
+ reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ if (reply.type() != QVariant::UInt)
+ return 0;
+ signals_left = total_signals = reply.toUInt();
+ if (!signals_left)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ addr_results.clear();
+ while (signals_left) {
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ mDBus->synchronousDispatch(1000);
+ }
+
+ if (!timer.isActive()) {
+ total_signals = 0;
+ break;
+ }
+
+ if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) {
+ continue;
+ }
+
+ if (mError.isEmpty()) {
+ get_addrinfo_all_result(mArgs, result);
+ addr_results << result;
+ signals_left--;
+ } else {
+ qWarning() << "Error:" << mError;
+ break;
+ }
+ }
+ timer.stop();
+ return total_signals;
+}
+
+uint IcdPrivate::addrinfo_non_blocking(QList<IcdAddressInfoResult>& addr_results)
+{
+ QTimer timer;
+ QVariant reply;
+ QVariantList vl;
+ uint signals_left, total_signals;
+ IcdAddressInfoResult result;
+
+ clearState();
+ reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ if (reply.type() != QVariant::UInt)
+ return 0;
+ signals_left = total_signals = reply.toUInt();
+ if (!signals_left)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+ addr_results.clear();
+ while (signals_left) {
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ }
+
+ if (!timer.isActive()) {
+ total_signals = 0;
+ break;
+ }
+
+ if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) {
+ continue;
+ }
+
+ if (mError.isEmpty()) {
+ get_addrinfo_all_result(mArgs, result);
+ addr_results << result;
+ signals_left--;
+ } else {
+ qWarning() << "Error:" << mError;
+ break;
+ }
+ }
+ timer.stop();
+ return total_signals;
+}
+
+
+uint IcdPrivate::addrinfo(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdAddressInfoResult& addr_result)
+{
+ QTimer timer;
+ QVariant reply;
+ uint total_signals;
+ QVariantList vl;
+
+ clearState();
+
+ reply = mDBus->call(ICD_DBUS_API_ADDRINFO_REQ,
+ service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id);
+ if (reply.type() != QVariant::List)
+ return 0;
+ vl = reply.toList();
+ if (vl.isEmpty())
+ return 0;
+ reply = vl.first();
+ total_signals = reply.toUInt();
+
+ if (!total_signals)
+ return 0;
+
+ timer.setSingleShot(true);
+ timer.start(timeout);
+
+ mInterface.clear();
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+
+ if (mSignal != ICD_DBUS_API_ADDRINFO_SIG) {
+ mInterface.clear();
+ continue;
+ }
+ }
+
+ timer.stop();
+
+ if (mError.isEmpty()) {
+ get_addrinfo_all_result(mArgs, addr_result);
+ } else {
+ qWarning() << "Error:" << mError;
+ }
+
+ // The returned value should be one because we asked for one addrinfo
+ return total_signals;
+}
+
+
+Icd::Icd(QObject *parent)
+ : QObject(parent), d(new IcdPrivate(this))
+{
+}
+
+Icd::Icd(unsigned int timeout, QObject *parent)
+ : QObject(parent), d(new IcdPrivate(timeout, this))
+{
+}
+
+Icd::Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent)
+ : QObject(parent), d(new IcdPrivate(timeout, ver, this))
+{
+}
+
+Icd::~Icd()
+{
+ delete d;
+}
+
+
+QStringList Icd::scan(icd_scan_request_flags flags,
+ QStringList &network_types,
+ QList<IcdScanResult>& scan_results,
+ QString& error)
+{
+ return d->scan(flags, network_types, scan_results, error);
+}
+
+
+void Icd::scanCancel()
+{
+ d->scanCancel();
+}
+
+
+bool Icd::connect(icd_connection_flags flags, IcdConnectResult& result)
+{
+ return d->connect(flags, result);
+}
+
+
+bool Icd::connect(icd_connection_flags flags, QList<ConnectParams>& params,
+ IcdConnectResult& result)
+{
+ return d->connect(flags, params, result);
+}
+
+
+bool Icd::connect(icd_connection_flags flags, QString& iap, QString& result)
+{
+ return d->connect(flags, iap, result);
+}
+
+
+void Icd::select(uint flags)
+{
+ d->select(flags);
+}
+
+
+void Icd::disconnect(uint connect_flags, QString& service_type,
+ uint service_attrs, QString& service_id,
+ QString& network_type, uint network_attrs,
+ QByteArray& network_id)
+{
+ d->disconnect(connect_flags, service_type,
+ service_attrs, service_id,
+ network_type, network_attrs,
+ network_id);
+}
+
+
+void Icd::disconnect(uint connect_flags)
+{
+ d->disconnect(connect_flags);
+}
+
+
+uint Icd::state(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStateResult &state_result)
+{
+ return d->state(service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id,
+ state_result);
+}
+
+
+uint Icd::statistics(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStatisticsResult& stats_result)
+{
+ return d->statistics(service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id,
+ stats_result);
+}
+
+
+uint Icd::addrinfo(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdAddressInfoResult& addr_result)
+{
+ return d->addrinfo(service_type, service_attrs, service_id,
+ network_type, network_attrs, network_id,
+ addr_result);
+}
+
+
+uint Icd::state(QList<IcdStateResult>& state_results)
+{
+ return d->state(state_results);
+}
+
+uint Icd::state_non_blocking(QList<IcdStateResult>& state_results)
+{
+ return d->state_non_blocking(state_results);
+}
+
+uint Icd::statistics(QList<IcdStatisticsResult>& stats_results)
+{
+ return d->statistics(stats_results);
+}
+
+
+uint Icd::addrinfo(QList<IcdAddressInfoResult>& addr_results)
+{
+ return d->addrinfo(addr_results);
+}
+
+uint Icd::addrinfo_non_blocking(QList<IcdAddressInfoResult>& addr_results)
+{
+ return d->addrinfo_non_blocking(addr_results);
+}
+
+void Icd::icdSignalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args)
+{
+ d->signalReceived(interface, signal, args);
+}
+
+
+void Icd::icdCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error)
+{
+ d->callReply(method, args, error);
+}
+
+
+QString Icd::error()
+{
+ return d->error();
+}
+
+} // Maemo namespace
+
+
diff --git a/src/3rdparty/libconninet/src/maemo_icd.h b/src/3rdparty/libconninet/src/maemo_icd.h
new file mode 100644
index 0000000000..d7a8d5bdb7
--- /dev/null
+++ b/src/3rdparty/libconninet/src/maemo_icd.h
@@ -0,0 +1,182 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#ifndef MAEMO_ICD_H
+#define MAEMO_ICD_H
+
+#include <QObject>
+#include <QStringList>
+#include <QByteArray>
+#include <QMetaType>
+#include <QtDBus>
+#include <QDBusArgument>
+
+#include <glib.h>
+#include <icd/dbus_api.h>
+#include <icd/osso-ic.h>
+#include <icd/osso-ic-dbus.h>
+
+#include "dbusdispatcher.h"
+#include <icd/network_api_defines.h>
+
+#define ICD_LONG_SCAN_TIMEOUT (30*1000) /* 30sec */
+#define ICD_SHORT_SCAN_TIMEOUT (10*1000) /* 10sec */
+#define ICD_SHORT_CONNECT_TIMEOUT (10*1000) /* 10sec */
+#define ICD_LONG_CONNECT_TIMEOUT (150*1000) /* 2.5min */
+
+namespace Maemo {
+
+struct CommonParams {
+ QString service_type;
+ uint service_attrs;
+ QString service_id;
+ QString network_type;
+ uint network_attrs;
+ QByteArray network_id;
+};
+
+struct ConnectParams {
+ struct CommonParams connect;
+};
+
+struct IcdScanResult {
+ uint status; // see #icd_scan_status
+ uint timestamp; // when last seen
+ QString service_name;
+ uint service_priority; // within a service type
+ QString network_name;
+ uint network_priority;
+ struct CommonParams scan;
+ uint signal_strength; // quality, 0 (none) - 10 (good)
+ QString station_id; // e.g. MAC address or similar id
+ uint signal_dB; // use signal strength above unless you know what you are doing
+
+ IcdScanResult() {
+ status = timestamp = scan.service_attrs = service_priority =
+ scan.network_attrs = network_priority = signal_strength =
+ signal_dB = 0;
+ }
+};
+
+struct IcdConnectResult {
+ struct CommonParams connect;
+ uint status;
+};
+
+struct IcdStateResult {
+ struct CommonParams params;
+ QString error;
+ uint state;
+};
+
+struct IcdStatisticsResult {
+ struct CommonParams params;
+ uint time_active; // in seconds
+ enum icd_nw_levels signal_strength; // see network_api_defines.h in icd2-dev package
+ uint bytes_sent;
+ uint bytes_received;
+};
+
+struct IcdIPInformation {
+ QString address;
+ QString netmask;
+ QString default_gateway;
+ QString dns1;
+ QString dns2;
+ QString dns3;
+};
+
+struct IcdAddressInfoResult {
+ struct CommonParams params;
+ QList<IcdIPInformation> ip_info;
+};
+
+enum IcdDbusInterfaceVer {
+ IcdOldDbusInterface = 0, // use the old OSSO-IC interface
+ IcdNewDbusInterface // use the new Icd2 interface (default)
+};
+
+
+class IcdPrivate;
+class Icd : public QObject
+{
+ Q_OBJECT
+
+public:
+ Icd(QObject *parent = 0);
+ Icd(unsigned int timeout, QObject *parent = 0);
+ Icd(unsigned int timeout, IcdDbusInterfaceVer ver, QObject *parent = 0);
+ ~Icd();
+ QString error(); // returns last error string
+
+ /* Icd2 dbus API functions */
+ QStringList scan(icd_scan_request_flags flags,
+ QStringList &network_types,
+ QList<IcdScanResult>& scan_results,
+ QString& error);
+ void scanCancel();
+ bool connect(icd_connection_flags flags, IcdConnectResult& result);
+ bool connect(icd_connection_flags flags, QList<ConnectParams>& params,
+ IcdConnectResult& result);
+ bool connect(icd_connection_flags flags, QString& iap, QString& result);
+ void select(uint flags);
+ void disconnect(uint connect_flags, QString& service_type,
+ uint service_attrs, QString& service_id,
+ QString& network_type, uint network_attrs,
+ QByteArray& network_id);
+ void disconnect(uint connect_flags);
+
+ uint state(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStateResult &state_result);
+ uint statistics(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdStatisticsResult& stats_result);
+ uint addrinfo(QString& service_type, uint service_attrs,
+ QString& service_id, QString& network_type,
+ uint network_attrs, QByteArray& network_id,
+ IcdAddressInfoResult& addr_result);
+
+ uint state(QList<IcdStateResult>& state_results);
+ uint state_non_blocking(QList<IcdStateResult>& state_results);
+ uint statistics(QList<IcdStatisticsResult>& stats_results);
+ uint addrinfo(QList<IcdAddressInfoResult>& addr_results);
+ uint addrinfo_non_blocking(QList<IcdAddressInfoResult>& addr_results);
+
+private Q_SLOTS:
+ void icdSignalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args);
+ void icdCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error);
+
+private:
+ IcdPrivate *d;
+ friend class IcdPrivate;
+};
+
+} // Maemo namespace
+
+#endif
diff --git a/src/3rdparty/libconninet/src/proxyconf.cpp b/src/3rdparty/libconninet/src/proxyconf.cpp
new file mode 100644
index 0000000000..5b2756563b
--- /dev/null
+++ b/src/3rdparty/libconninet/src/proxyconf.cpp
@@ -0,0 +1,315 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2010 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#include <QDebug>
+#include <QWriteLocker>
+#include <QNetworkProxyFactory>
+#include <QNetworkProxy>
+#include <GConfItem>
+#include <gconf/gconf-client.h>
+#include "proxyconf.h"
+
+#define CONF_PROXY "/system/proxy"
+#define HTTP_PROXY "/system/http_proxy"
+
+
+namespace Maemo {
+
+class NetworkProxyFactory : QNetworkProxyFactory {
+public:
+ NetworkProxyFactory() { }
+ QList<QNetworkProxy> queryProxy(const QNetworkProxyQuery &query = QNetworkProxyQuery());
+};
+
+
+QList<QNetworkProxy> NetworkProxyFactory::queryProxy(const QNetworkProxyQuery &query)
+{
+ ProxyConf proxy_conf;
+
+ QList<QNetworkProxy> result = proxy_conf.flush(query);
+ if (result.isEmpty())
+ result << QNetworkProxy::NoProxy;
+
+ return result;
+}
+
+
+class ProxyConfPrivate {
+private:
+ // proxy values from gconf
+ QString mode;
+ bool use_http_host;
+ QString autoconfig_url;
+ QString http_proxy;
+ quint16 http_port;
+ QList<QVariant> ignore_hosts;
+ QString secure_host;
+ quint16 secure_port;
+ QString ftp_host;
+ quint16 ftp_port;
+ QString socks_host;
+ quint16 socks_port;
+ QString rtsp_host;
+ quint16 rtsp_port;
+
+ QVariant getValue(QString& name);
+ QVariant getHttpValue(QString& name);
+ QVariant getValue(const char *name);
+ QVariant getHttpValue(const char *name);
+ bool isHostExcluded(const QString &host);
+
+public:
+ QString prefix;
+ QString http_prefix;
+
+ void readProxyData();
+ QList<QNetworkProxy> flush(const QNetworkProxyQuery &query);
+};
+
+
+QVariant ProxyConfPrivate::getValue(QString& name)
+{
+ GConfItem item(prefix + name);
+ return item.value();
+}
+
+QVariant ProxyConfPrivate::getHttpValue(QString& name)
+{
+ GConfItem item(http_prefix + name);
+ return item.value();
+}
+
+
+QVariant ProxyConfPrivate::getValue(const char *name)
+{
+ QString n = QString(name);
+ return getValue(n);
+}
+
+QVariant ProxyConfPrivate::getHttpValue(const char *name)
+{
+ QString n = QString(name);
+ return getHttpValue(n);
+}
+
+
+#define GET(var, type) \
+ do { \
+ var = getValue(#var).to##type (); \
+ /*qDebug()<<"var="<<var;*/ \
+ } while(0)
+
+#define GET2(var, name, type) \
+ do { \
+ var = getHttpValue(#name).to##type (); \
+ /*qDebug()<<"var="<<var;*/ \
+ } while(0)
+
+
+void ProxyConfPrivate::readProxyData()
+{
+ /* Read the proxy settings from /system/proxy* */
+ GET2(http_proxy, host, String);
+ GET2(http_port, port, Int);
+ GET2(ignore_hosts, ignore_hosts, List);
+
+ GET(mode, String);
+ GET(autoconfig_url, String);
+ GET(secure_host, String);
+ GET(secure_port, Int);
+ GET(ftp_host, String);
+ GET(ftp_port, Int);
+ GET(socks_host, String);
+ GET(socks_port, Int);
+ GET(rtsp_host, String);
+ GET(rtsp_port, Int);
+
+ if (http_proxy.isEmpty())
+ use_http_host = false;
+ else
+ use_http_host = true;
+}
+
+
+bool ProxyConfPrivate::isHostExcluded(const QString &host)
+{
+ if (host.isEmpty())
+ return true;
+
+ if (ignore_hosts.isEmpty())
+ return false;
+
+ QHostAddress ipAddress;
+ bool isIpAddress = ipAddress.setAddress(host);
+
+ foreach (QVariant h, ignore_hosts) {
+ QString entry = h.toString();
+ if (isIpAddress && ipAddress.isInSubnet(QHostAddress::parseSubnet(entry))) {
+ return true; // excluded
+ } else {
+ // do wildcard matching
+ QRegExp rx(entry, Qt::CaseInsensitive, QRegExp::Wildcard);
+ if (rx.exactMatch(host))
+ return true;
+ }
+ }
+
+ // host was not excluded
+ return false;
+}
+
+
+QList<QNetworkProxy> ProxyConfPrivate::flush(const QNetworkProxyQuery &query)
+{
+ QList<QNetworkProxy> result;
+
+#if 0
+ qDebug()<<"http_proxy" << http_proxy;
+ qDebug()<<"http_port" << http_port;
+ qDebug()<<"ignore_hosts" << ignore_hosts;
+ qDebug()<<"use_http_host" << use_http_host;
+ qDebug()<<"mode" << mode;
+ qDebug()<<"autoconfig_url" << autoconfig_url;
+ qDebug()<<"secure_host" << secure_host;
+ qDebug()<<"secure_port" << secure_port;
+ qDebug()<<"ftp_host" << ftp_host;
+ qDebug()<<"ftp_port" << ftp_port;
+ qDebug()<<"socks_host" << socks_host;
+ qDebug()<<"socks_port" << socks_port;
+ qDebug()<<"rtsp_host" << rtsp_host;
+ qDebug()<<"rtsp_port" << rtsp_port;
+#endif
+
+ if (isHostExcluded(query.peerHostName()))
+ return result; // no proxy for this host
+
+ if (mode == "auto") {
+ // TODO: pac currently not supported, fix me
+ return result;
+ }
+
+ if (mode == "manual") {
+ bool isHttps = false;
+ QString protocol = query.protocolTag().toLower();
+
+ // try the protocol-specific proxy
+ QNetworkProxy protocolSpecificProxy;
+
+ if (protocol == QLatin1String("ftp")) {
+ if (!ftp_host.isEmpty()) {
+ protocolSpecificProxy.setType(QNetworkProxy::FtpCachingProxy);
+ protocolSpecificProxy.setHostName(ftp_host);
+ protocolSpecificProxy.setPort(ftp_port);
+ }
+ } else if (protocol == QLatin1String("http")) {
+ if (!http_proxy.isEmpty()) {
+ protocolSpecificProxy.setType(QNetworkProxy::HttpProxy);
+ protocolSpecificProxy.setHostName(http_proxy);
+ protocolSpecificProxy.setPort(http_port);
+ }
+ } else if (protocol == QLatin1String("https")) {
+ isHttps = true;
+ if (!secure_host.isEmpty()) {
+ protocolSpecificProxy.setType(QNetworkProxy::HttpProxy);
+ protocolSpecificProxy.setHostName(secure_host);
+ protocolSpecificProxy.setPort(secure_port);
+ }
+ }
+
+ if (protocolSpecificProxy.type() != QNetworkProxy::DefaultProxy)
+ result << protocolSpecificProxy;
+
+
+ if (!socks_host.isEmpty()) {
+ QNetworkProxy proxy;
+ proxy.setType(QNetworkProxy::Socks5Proxy);
+ proxy.setHostName(socks_host);
+ proxy.setPort(socks_port);
+ result << proxy;
+ }
+
+
+ // Add the HTTPS proxy if present (and if we haven't added yet)
+ if (!isHttps) {
+ QNetworkProxy https;
+ if (!secure_host.isEmpty()) {
+ https.setType(QNetworkProxy::HttpProxy);
+ https.setHostName(secure_host);
+ https.setPort(secure_port);
+ }
+
+ if (https.type() != QNetworkProxy::DefaultProxy &&
+ https != protocolSpecificProxy)
+ result << https;
+ }
+ }
+
+ return result;
+}
+
+
+ProxyConf::ProxyConf()
+ : d_ptr(new ProxyConfPrivate)
+{
+ g_type_init();
+ d_ptr->prefix = CONF_PROXY "/";
+ d_ptr->http_prefix = HTTP_PROXY "/";
+}
+
+ProxyConf::~ProxyConf()
+{
+ delete d_ptr;
+}
+
+
+QList<QNetworkProxy> ProxyConf::flush(const QNetworkProxyQuery &query)
+{
+ d_ptr->readProxyData();
+ return d_ptr->flush(query);
+}
+
+
+static int refcount = 0;
+static QReadWriteLock lock;
+
+void ProxyConf::update()
+{
+ QWriteLocker locker(&lock);
+ NetworkProxyFactory *factory = new NetworkProxyFactory();
+ QNetworkProxyFactory::setApplicationProxyFactory((QNetworkProxyFactory*)factory);
+ refcount++;
+}
+
+
+void ProxyConf::clear(void)
+{
+ QWriteLocker locker(&lock);
+ refcount--;
+ if (refcount == 0)
+ QNetworkProxyFactory::setApplicationProxyFactory(NULL);
+
+ if (refcount<0)
+ refcount = 0;
+}
+
+
+} // namespace Maemo
diff --git a/src/3rdparty/libconninet/src/proxyconf.h b/src/3rdparty/libconninet/src/proxyconf.h
new file mode 100644
index 0000000000..7711c49e11
--- /dev/null
+++ b/src/3rdparty/libconninet/src/proxyconf.h
@@ -0,0 +1,53 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2010 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+#ifndef PROXYCONF_H
+#define PROXYCONF_H
+
+#include <QString>
+#include <QNetworkProxy>
+
+namespace Maemo {
+
+class ProxyConfPrivate;
+class ProxyConf {
+private:
+ ProxyConfPrivate *d_ptr;
+
+public:
+ ProxyConf();
+ virtual ~ProxyConf();
+
+ QList<QNetworkProxy> flush(const QNetworkProxyQuery &query = QNetworkProxyQuery()); // read the proxies from db
+
+ /* Note that for each update() call there should be corresponding
+ * clear() call because the ProxyConf class implements a reference
+ * counting mechanism. The factory is removed only when there is
+ * no one using the factory any more.
+ */
+ static void update(void); // this builds QNetworkProxy factory
+ static void clear(void); // this removes QNetworkProxy factory
+};
+
+} // namespace Maemo
+
+#endif
diff --git a/src/3rdparty/libconninet/tests/Makefile.am b/src/3rdparty/libconninet/tests/Makefile.am
new file mode 100644
index 0000000000..f6f41ea5d5
--- /dev/null
+++ b/src/3rdparty/libconninet/tests/Makefile.am
@@ -0,0 +1,39 @@
+DEFS = -DDBUS_API_SUBJECT_TO_CHANGE
+INCLUDES = @GLIB_CFLAGS@ @DBUS_CFLAGS@ @CONNSETTINGS_CFLAGS@ @OSSO_IC_CFLAGS@ @ICD_DEV_CFLAGS@ \
+ @QTCORE_CFLAGS@ @QTDBUS_CFLAGS@ @QTCORE_CFLAGS@ @QTNETWORK_CFLAGS@ @QTTEST_CFLAGS@ \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/src
+
+LIBS = @GLIB_LIBS@ @DBUS_LIBS@ @CONNSETTINGS_LIBS@ @OSSO_IC_LIBS@ @ICD_DEV_LIBS@ \
+ @QTCORE_LIBS@ @QTDBUS_LIBS@ @QTCORE_LIBS@ @QTNETWORK_LIBS@ @QTTEST_LIBS@ \
+ $(top_builddir)/src/libconninet.la
+
+AM_CFLAGS = $(CONCFLAGS)
+AM_LDFLAGS = -static
+
+bin_PROGRAMS = test_dbusdispatcher test_iapconf test_maemo_icd test_iapmonitor test_proxyconf
+
+test_dbusdispatcher_SOURCES = ut_dbusdispatcher.cpp
+ut_dbusdispatcher.o: ut_dbusdispatcher.moc
+
+test_iapconf_SOURCES = ut_iapconf.cpp
+ut_iapconf.o: ut_iapconf.moc
+
+test_maemo_icd_SOURCES = ut_maemo_icd.cpp
+ut_maemo_icd.o: ut_maemo_icd.moc
+
+test_iapmonitor_SOURCES = ut_iapmonitor.cpp
+ut_iapmonitor.o: ut_iapmonitor.moc
+
+test_proxyconf_SOURCES = ut_proxyconf.cpp
+ut_proxyconf.o: ut_proxyconf.moc
+
+
+MAINTAINERCLEANFILES = Makefile.in
+
+# This rule lets GNU make create any *.moc from the equivalent *.cpp
+%.moc: %.cpp
+ moc $< -o $@
+
+# This line ensures that generated moc files are deleted when we make clean.
+CLEANFILES = *.moc
diff --git a/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp b/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp
new file mode 100644
index 0000000000..70deb3f90f
--- /dev/null
+++ b/src/3rdparty/libconninet/tests/ut_dbusdispatcher.cpp
@@ -0,0 +1,191 @@
+/* * This file is part of conn-dui-settings-inet *
+ *
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * Contact: Aapo Makela <aapo.makela@nokia.com>
+ *
+ * This software, including documentation, is protected by copyright
+ * controlled by Nokia Corporation. All rights are reserved. Copying,
+ * including reproducing, storing, adapting or translating, any or all of
+ * this material requires the prior written consent of Nokia Corporation.
+ * This material also contains confidential information which may not be
+ * disclosed to others without the prior written consent of Nokia.
+ */
+
+#include <QtTest/QtTest>
+#include <QCoreApplication>
+#include <QEventLoop>
+#include <QDebug>
+#include <icd/dbus_api.h>
+
+#include <dbusdispatcher.h>
+
+class Ut_DBusDispatcher : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void init();
+ void cleanup();
+ void initTestCase();
+ void cleanupTestCase();
+
+ void simpleSignalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args);
+ void simpleCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error);
+ void simpleCall();
+
+ void complexCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error);
+ void complexCall();
+
+private:
+ Maemo::DBusDispatcher *mSubject;
+ QProcess *icd_stub;
+
+ QString mMethod;
+ QString mInterface;
+ QString mSignal;
+ QList<QVariant> mArgs;
+};
+
+void Ut_DBusDispatcher::init()
+{
+ mSubject = new Maemo::DBusDispatcher("com.nokia.icd2", "/com/nokia/icd2",
+ "com.nokia.icd2");
+
+ // Start icd2 stub
+ icd_stub = new QProcess(this);
+ icd_stub->start("/usr/bin/icd2_stub.py");
+ QTest::qWait(1000);
+}
+
+void Ut_DBusDispatcher::cleanup()
+{
+ // Terminate icd2 stub
+ icd_stub->terminate();
+ icd_stub->waitForFinished();
+
+ delete mSubject;
+ mSubject = 0;
+}
+
+void Ut_DBusDispatcher::initTestCase()
+{
+}
+
+void Ut_DBusDispatcher::cleanupTestCase()
+{
+}
+
+void Ut_DBusDispatcher::simpleSignalReceived(const QString& interface,
+ const QString& signal,
+ const QList<QVariant>& args)
+{
+ // Signal handler, which simply records what has been signalled
+ mInterface = interface;
+ mSignal = signal;
+ mArgs = args;
+}
+
+void Ut_DBusDispatcher::simpleCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error)
+{
+ mMethod = method;
+
+ // Check that method matches and at least WLAN_INFRA is returned
+ QVERIFY(error.isEmpty());
+ QVERIFY(args[0].toStringList().contains("WLAN_INFRA"));
+}
+
+void Ut_DBusDispatcher::simpleCall()
+{
+ uint flags = 0;
+ QList<QVariant> reply;
+ int idx = 0;
+ QTimer timer;
+
+ // Connect signals
+ connect(mSubject, SIGNAL(signalReceived(const QString&,
+ const QString&,
+ const QList<QVariant>&)),
+ this, SLOT(simpleSignalReceived(const QString&,
+ const QString&,
+ const QList<QVariant>&)));
+ connect(mSubject, SIGNAL(callReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)),
+ this, SLOT(simpleCallReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)));
+
+ // Request scan and verify the call starts succesfully
+ QVERIFY(mSubject->callAsynchronous("scan_req", flags));
+
+ // Wait 1st scan signal for 10 secs
+ timer.setSingleShot(true);
+ timer.start(10000);
+ while (timer.isActive() && mInterface.isEmpty()) {
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ idx++;
+ }
+ timer.stop();
+
+ // Sanity checks for the scan result
+ QVERIFY(mInterface == "com.nokia.icd2"); // interface is icd2
+ QVERIFY(mMethod == "scan_req"); // method is scan_req
+ QVERIFY(mSignal == "scan_result_sig"); // signal is scan result
+ QVERIFY(mArgs[0] == QVariant(0) ||
+ mArgs[0] == QVariant(4)); // First argument is status
+ // (0 == NEW, 4 == COMPLETED)
+ //QVERIFY(mArgs.contains(QVariant("WLAN_INFRA"))); // WLAN scan result
+}
+
+void Ut_DBusDispatcher::complexCallReply(const QString& method,
+ const QList<QVariant>& args,
+ const QString& error)
+{
+ mMethod = method;
+
+ // Check that method has not return arguments and error is not set
+ QVERIFY(error.isEmpty());
+ QVERIFY(args.isEmpty());
+}
+
+void Ut_DBusDispatcher::complexCall()
+{
+ uint flags = ICD_CONNECTION_FLAG_UI_EVENT;
+ QList<QVariant> reply;
+ QVariantList networks;
+ QVariantList network1;
+
+ network1 << "" << (uint)0 << "" << "WLAN_INFRA" << (uint)0x05000011 << QByteArray("osso@46@net");
+ networks << QVariant(network1);
+
+ // Connect signal
+ connect(mSubject, SIGNAL(callReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)),
+ this, SLOT(complexCallReply(const QString&,
+ const QList<QVariant>&,
+ const QString&)));
+
+ // Request connect and verify the call starts succesfully
+ QVERIFY(mSubject->callAsynchronous("connect_req", flags, networks));
+
+ QTest::qWait(1000);
+
+ // Sanity checks for the scan result
+ QVERIFY(mInterface == "com.nokia.icd2"); // interface is icd2
+ QVERIFY(mMethod == "connect_req"); // method connect_req
+}
+
+QTEST_MAIN(Ut_DBusDispatcher)
+
+#include "ut_dbusdispatcher.moc"
diff --git a/src/3rdparty/libconninet/tests/ut_iapconf.cpp b/src/3rdparty/libconninet/tests/ut_iapconf.cpp
new file mode 100644
index 0000000000..6a91d61a0d
--- /dev/null
+++ b/src/3rdparty/libconninet/tests/ut_iapconf.cpp
@@ -0,0 +1,186 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009 Nokia Corporation. All rights reserved.
+
+ Contact: Aapo Makela <aapo.makela@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+
+#include <QtTest/QtTest>
+#include <QDebug>
+
+#include <iapconf.h>
+
+class Ut_IAPConf : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void init();
+ void cleanup();
+ void initTestCase();
+ void cleanupTestCase();
+
+ void setupIAP();
+ void setupIAPContainingDot();
+ void unsetIAPValueIsNotValid();
+ void verifyAllIAPs();
+ void allForEmptyConfReturnsEmptyList();
+ void settingInvalidValueUnsetsKey();
+
+private:
+ Maemo::IAPConf *mSubject;
+};
+
+void Ut_IAPConf::init()
+{
+ mSubject = new Maemo::IAPConf("test_iap");
+}
+
+void Ut_IAPConf::cleanup()
+{
+ // Clear made settings
+ mSubject->clear();
+
+ delete mSubject;
+ mSubject = 0;
+}
+
+void Ut_IAPConf::initTestCase()
+{
+}
+
+void Ut_IAPConf::cleanupTestCase()
+{
+}
+
+void Ut_IAPConf::setupIAP()
+{
+ // Set bunch of values
+ mSubject->set("ipv4_type", "AUTO",
+ "wlan_wepkey1", "connt",
+ "wlan_wepdefkey", 1,
+ "wlan_ssid", QByteArray("CONNTEST-1"));
+
+ // Set one value
+ mSubject->setValue("type", "WLAN_INFRA");
+
+ // Check all values that they were set correctly
+ QVERIFY(mSubject->value("ipv4_type").toString() == "AUTO");
+ QVERIFY(mSubject->value("wlan_wepkey1").toString() == "connt");
+ QVERIFY(mSubject->value("wlan_wepdefkey").toInt() == 1);
+ QVERIFY(mSubject->value("wlan_ssid").toByteArray() == QByteArray("CONNTEST-1"));
+ QVERIFY(mSubject->value("type").toString() == "WLAN_INFRA");
+}
+
+void Ut_IAPConf::setupIAPContainingDot()
+{
+ delete mSubject;
+ mSubject = new Maemo::IAPConf("test.iap");
+
+ // Set and check one value
+ mSubject->setValue("type", "DUMMY");
+ QVERIFY(mSubject->value("type").toString() == "DUMMY");
+}
+
+void Ut_IAPConf::unsetIAPValueIsNotValid()
+{
+ QVariant invalidValue = mSubject->value("this_value_does_not_exist");
+ QVERIFY(invalidValue.isValid() == false);
+}
+
+void Ut_IAPConf::verifyAllIAPs()
+{
+ int count = 0, extras = 0;
+ QRegExp regexp("iap[1-3]");
+ Maemo::IAPConf iap1("iap1");
+ Maemo::IAPConf iap2("iap2");
+ Maemo::IAPConf iap3("iap3");
+
+ iap1.clear();
+ iap2.clear();
+ iap3.clear();
+
+ iap1.setValue("name", "iap1");
+ iap2.setValue("name", "iap2");
+ iap3.setValue("name", "iap3");
+
+ count = extras = 0;
+ QList<QString> iaps;
+ Maemo::IAPConf::getAll(iaps, true);
+ foreach (QString iap_path, iaps) {
+ QString iap_id = iap_path.section('/', 5); /* This is the IAP id */
+ if (!iap_id.contains(regexp)) {
+ extras++;
+ continue;
+ }
+ Maemo::IAPConf iap(iap_id);
+ QString name = iap.value("name").toString();
+ QVERIFY(name == iap_id);
+ count++;
+ }
+ QCOMPARE(count, iaps.size()-extras);
+
+ iap1.clear();
+ iap2.clear();
+ iap3.clear();
+
+ iap1.setValue("name", "iap1");
+ iap2.setValue("name", "iap2");
+ iap3.setValue("name", "iap3");
+
+ count = extras = 0;
+ Maemo::IAPConf::getAll(iaps);
+ foreach (QString iap_id, iaps) {
+ if (!iap_id.contains(regexp)) {
+ extras++;
+ continue;
+ }
+ Maemo::IAPConf iap(iap_id);
+ QString name = iap.value("name").toString();
+ QVERIFY(name == iap_id);
+ count++;
+ }
+ QCOMPARE(count, iaps.size()-extras);
+}
+
+void Ut_IAPConf::allForEmptyConfReturnsEmptyList()
+{
+ // Clear everything in configuration
+ mSubject->clearAll();
+
+ // Get all for a list and check that it is empty
+ QStringList iaps;
+ mSubject->getAll(iaps);
+ QVERIFY(iaps.isEmpty());
+}
+
+void Ut_IAPConf::settingInvalidValueUnsetsKey()
+{
+ // Setup some IAP
+ setupIAP();
+
+ // Set invalid value to unset "wlan_wepdefkey" key and verify that the
+ // value is unset
+ mSubject->setValue("wlan_wepdefkey", QVariant());
+ QVERIFY(!mSubject->value("wlan_wepdefkey").isValid());
+}
+
+QTEST_MAIN(Ut_IAPConf)
+
+#include "ut_iapconf.moc"
diff --git a/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp b/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp
new file mode 100644
index 0000000000..f14f623c4b
--- /dev/null
+++ b/src/3rdparty/libconninet/tests/ut_iapmonitor.cpp
@@ -0,0 +1,118 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2009-2010 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+
+#include <QtTest/QtTest>
+#include <QDebug>
+
+#include <iapmonitor.h>
+#include <iapconf.h>
+
+static const char *iap_id = "test_monitor_1";
+
+class TestIAPMonitor : public Maemo::IAPMonitor
+{
+public:
+ QString addedIap;
+ QString removedIap;
+
+protected:
+ virtual void iapAdded(const QString &id)
+ {
+ addedIap = id;
+ }
+
+ virtual void iapRemoved(const QString &id)
+ {
+ removedIap = id;
+ }
+};
+
+class Ut_IAPMonitor : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void init();
+ void cleanup();
+ void initTestCase();
+ void cleanupTestCase();
+
+ void check();
+
+private:
+ TestIAPMonitor *mon;
+ Maemo::IAPConf *iap;
+};
+
+void Ut_IAPMonitor::init()
+{
+ mon = new TestIAPMonitor;
+}
+
+void Ut_IAPMonitor::cleanup()
+{
+ delete mon;
+ mon = 0;
+}
+
+void Ut_IAPMonitor::initTestCase()
+{
+}
+
+void Ut_IAPMonitor::cleanupTestCase()
+{
+}
+
+void Ut_IAPMonitor::check()
+{
+ QVERIFY(mon->addedIap.isEmpty());
+
+ iap = new Maemo::IAPConf(iap_id);
+ iap->set("ipv4_type", "AUTO",
+ "wlan_wepkey1", "connt",
+ "wlan_wepdefkey", 1,
+ "wlan_ssid", QByteArray(iap_id));
+
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ QVERIFY(mon->addedIap == iap_id);
+ mon->addedIap.clear();
+
+ QVERIFY(mon->removedIap.isEmpty());
+
+ // Unset only one value and verify that IAP is not removed
+ iap->set("ipv4_type", QVariant());
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+ QVERIFY(mon->removedIap.isEmpty());
+
+ // Clear the whole IAP and check that it is removed
+ iap->clear();
+ delete iap;
+
+ QCoreApplication::processEvents(QEventLoop::AllEvents, 1000);
+
+ QVERIFY(mon->removedIap == iap_id);
+}
+
+QTEST_MAIN(Ut_IAPMonitor)
+
+#include "ut_iapmonitor.moc"
diff --git a/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp b/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp
new file mode 100644
index 0000000000..494829d327
--- /dev/null
+++ b/src/3rdparty/libconninet/tests/ut_maemo_icd.cpp
@@ -0,0 +1,274 @@
+/*
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ */
+
+
+// !!!!
+// !!!! NOTE: THESE TEST DO NOT REALLY WORK YET BECAUSE OF MISSING
+// !!!! FUNCTIONALITY IN ICD2 STUB. YOU HAVE BEEN WARNED.
+// !!!!
+
+
+#include <QtTest/QtTest>
+#include <QCoreApplication>
+#include <QEventLoop>
+#include <QDebug>
+#include <icd/dbus_api.h>
+
+#include "maemo_icd.h"
+
+class Ut_MaemoIcd : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void init();
+ void cleanup();
+ void initTestCase();
+ void cleanupTestCase();
+
+ void scan_req();
+ void scan_cancel_req();
+ void connect_req_default();
+ void state_req_all();
+ void state_req();
+ void statistics_req_all();
+ void statistics_req();
+ void addrinfo_req_all();
+ void addrinfo_req();
+
+private:
+ void disconnect_req_default(); // this is currently not run
+ void connect_req_specific(); // this is currently not run
+ QProcess *icd_stub;
+ bool connect_iap(Maemo::IcdConnectResult &connect_result,
+ QString &result,
+ QString &error,
+ QString iap=QString());
+};
+
+
+QString create_error_str(Maemo::Icd &icd)
+{
+ return icd.error();
+}
+
+
+void Ut_MaemoIcd::init()
+{
+ icd_stub = new QProcess(this);
+ icd_stub->setStandardOutputFile("/tmp/ut_maemo_icd.log");
+ icd_stub->start("/usr/bin/icd2_stub.py");
+ QTest::qWait(1000);
+
+ // Set the statistics
+ QProcess dbus_send;
+ dbus_send.start("dbus-send --type=method_call --system "
+ "--dest=com.nokia.icd2 /com/nokia/icd2 "
+ "com.nokia.icd2.testing.set_statistics "
+ "uint32:1024 uint32:256");
+ dbus_send.waitForFinished();
+
+}
+
+void Ut_MaemoIcd::cleanup()
+{
+ icd_stub->terminate();
+ icd_stub->waitForFinished();
+}
+
+void Ut_MaemoIcd::initTestCase()
+{
+}
+
+void Ut_MaemoIcd::cleanupTestCase()
+{
+}
+
+void Ut_MaemoIcd::scan_req()
+{
+ QList<Maemo::IcdScanResult> scanned;
+ QStringList scannedNetworkTypes;
+ QStringList networkTypesToScan;
+ QString error;
+ Maemo::Icd icd(ICD_SHORT_SCAN_TIMEOUT);
+
+ scannedNetworkTypes = icd.scan(ICD_SCAN_REQUEST_ACTIVE,
+ networkTypesToScan,
+ scanned,
+ error);
+ QVERIFY(error.isEmpty());
+ QCOMPARE(scanned.size(), 3);
+ QVERIFY(scannedNetworkTypes[0] == "WLAN_INFRA");
+ QVERIFY(scannedNetworkTypes[1] == "DUN_GSM_PS");
+}
+
+void Ut_MaemoIcd::scan_cancel_req()
+{
+ Maemo::Icd icd;
+ icd.scanCancel();
+ // Not much to verify here
+}
+
+bool Ut_MaemoIcd::connect_iap(Maemo::IcdConnectResult &connect_result,
+ QString &result,
+ QString &error,
+ QString iap)
+{
+ icd_connection_flags flags = ICD_CONNECTION_FLAG_USER_EVENT;
+ bool st;
+ Maemo::Icd icd(ICD_SHORT_CONNECT_TIMEOUT);
+
+ if (iap.isEmpty()) {
+ qDebug() << "connecting to default IAP";
+ st = icd.connect(flags, connect_result);
+ } else {
+ qDebug() << "connecting to" << iap;
+ st = icd.connect(flags, iap, result);
+ }
+
+ error = create_error_str(icd);
+ return st;
+}
+
+void Ut_MaemoIcd::connect_req_default()
+{
+ Maemo::IcdConnectResult connect_result;
+ QString result, error;
+ bool st;
+ st = connect_iap(connect_result, result, error);
+ QVERIFY2(st, error.toAscii().data());
+ result = connect_result.connect.network_id.data();
+ qDebug() << result;
+}
+
+
+void Ut_MaemoIcd::disconnect_req_default()
+{
+ icd_connection_flags flags = ICD_CONNECTION_FLAG_USER_EVENT;
+ bool st;
+ Maemo::Icd icd(ICD_SHORT_CONNECT_TIMEOUT);
+ icd.disconnect(flags);
+}
+
+
+void Ut_MaemoIcd::connect_req_specific()
+{
+ Maemo::IcdConnectResult connect_result;
+ QString result;
+ QString error;
+ bool st;
+ st = connect_iap(connect_result, result, error, "wpa2gx2.osso.net");
+ QVERIFY2(st, error.toAscii().data());
+ qDebug() << result;
+}
+
+
+void Ut_MaemoIcd::state_req_all()
+{
+ QList<Maemo::IcdStateResult> state_results;
+ Maemo::Icd icd;
+ int sig;
+ sig = icd.state(state_results);
+ QVERIFY2(sig==1, create_error_str(icd).toAscii().data());
+}
+
+
+void Ut_MaemoIcd::state_req()
+{
+ Maemo::IcdStateResult state_result;
+ Maemo::Icd icd;
+ int sig;
+ QString service_type, service_id;
+ QString network_type("WLAN_INFRA");
+ QByteArray network_id("wpa2gx2.osso.net");
+ sig = icd.state(service_type, 0, service_id,
+ network_type, (uint)0x17a1, network_id,
+ state_result);
+ QVERIFY2(sig==1, create_error_str(icd).toAscii().data());
+}
+
+
+void Ut_MaemoIcd::statistics_req_all()
+{
+ QList<Maemo::IcdStatisticsResult> stats_results;
+ Maemo::Icd icd;
+ int sig;
+ QString err;
+ sig = icd.statistics(stats_results);
+ err = create_error_str(icd);
+ if (!err.isEmpty())
+ QVERIFY2(sig==1, err.toAscii().data());
+ else
+ QCOMPARE(sig, 1);
+
+ for(int i=0; i<sig; i++) {
+ QVERIFY(stats_results[i].bytes_received == 1024);
+ QVERIFY(stats_results[i].bytes_sent == 256);
+ }
+}
+
+
+// Can be uncommented when needed function is enabled in Icd class
+void Ut_MaemoIcd::statistics_req()
+{
+ Maemo::IcdStatisticsResult stats_result;
+ Maemo::Icd icd;
+ int sig;
+ QString service_type, service_id;
+ QString network_type("WLAN_INFRA");
+ QByteArray network_id("wpa2gx2.osso.net");
+ sig = icd.statistics(service_type, 0, service_id,
+ network_type, (uint)0x17a1, network_id,
+ stats_result);
+ QVERIFY2(sig==1, create_error_str(icd).toAscii().data());
+ QVERIFY(stats_result.bytes_received == 1024);
+ QVERIFY(stats_result.bytes_sent == 256);
+}
+
+
+void Ut_MaemoIcd::addrinfo_req_all()
+{
+ QList<Maemo::IcdAddressInfoResult> addr_results;
+ Maemo::Icd icd;
+ int sig;
+ sig = icd.addrinfo(addr_results);
+ QVERIFY2(sig==1, create_error_str(icd).toAscii().data());
+}
+
+
+void Ut_MaemoIcd::addrinfo_req()
+{
+ Maemo::IcdAddressInfoResult addr_result;
+ Maemo::Icd icd;
+ int sig;
+ QString service_type, service_id;
+ QString network_type("WLAN_INFRA");
+ QByteArray network_id("wpa2gx2.osso.net");
+ sig = icd.addrinfo(service_type, 0, service_id,
+ network_type, (uint)0x17a1, network_id,
+ addr_result);
+ QVERIFY2(sig==1, create_error_str(icd).toAscii().data());
+}
+
+
+QTEST_MAIN(Ut_MaemoIcd)
+
+#include "ut_maemo_icd.moc"
diff --git a/src/3rdparty/libconninet/tests/ut_proxyconf.cpp b/src/3rdparty/libconninet/tests/ut_proxyconf.cpp
new file mode 100644
index 0000000000..1f407f0ee2
--- /dev/null
+++ b/src/3rdparty/libconninet/tests/ut_proxyconf.cpp
@@ -0,0 +1,400 @@
+/*
+ libconninet - Internet Connectivity support library
+
+ Copyright (C) 2010 Nokia Corporation. All rights reserved.
+
+ Contact: Jukka Rissanen <jukka.rissanen@nokia.com>
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public License
+ version 2.1 as published by the Free Software Foundation.
+
+ This library is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA
+*/
+
+
+#include <QtTest/QtTest>
+#include <QDebug>
+#include <QNetworkProxy>
+#include <conn_settings.h>
+
+#include "../src/proxyconf.h"
+
+class Ut_ProxyConf : public QObject
+{
+ Q_OBJECT
+
+private Q_SLOTS:
+ void init();
+ void cleanup();
+ void initTestCase();
+ void cleanupTestCase();
+
+ // tests without the factory
+ void proxy_ftp_no_factory_ok_auto();
+ void proxy_ftp_no_factory_ok_manual();
+ void proxy_http_no_factory_ok_manual();
+ void proxy_https_no_factory_ok_manual();
+ void proxy_socks_no_factory_ok_manual();
+ void proxy_default_no_factory_ok_manual();
+
+ // tests using the factory
+ void proxy_ftp_factory_ok_auto();
+ void proxy_ftp_factory_ok_manual();
+ void proxy_http_factory_ok_manual();
+ void proxy_https_factory_ok_manual();
+ void proxy_socks_factory_ok_manual();
+ void proxy_http_factory_ok_manual_clear();
+ void proxy_default_factory_ok_manual();
+ void proxy_http_factory_ok_manual_ignore_list();
+ void proxy_default_factory_ok_manual_system();
+
+private:
+ Maemo::ProxyConf *pc;
+};
+
+
+void put(QString var, QString type, QString value)
+{
+ QProcess gconf;
+ if (value.isEmpty())
+ gconf.start(QString("gconftool-2 -u /system/proxy/"+var));
+ else
+ gconf.start(QString("gconftool-2 -s /system/proxy/"+var+" -t "+type+" "+value));
+ gconf.waitForFinished();
+}
+
+void put_http(QString var, QString type, QString value)
+{
+ QProcess gconf;
+ if (value.isEmpty())
+ gconf.start(QString("gconftool-2 -u /system/http_proxy/"+var));
+ else
+ gconf.start(QString("gconftool-2 -s /system/http_proxy/"+var+" -t "+type+" "+value));
+ gconf.waitForFinished();
+}
+
+void put_list(QString var, QString type, QList<QString> value)
+{
+ QProcess gconf;
+ QString values = "[";
+ foreach (QString str, value)
+ values = values + str + ",";
+ values.chop(1);
+ values = values + "]";
+
+ gconf.start(QString("gconftool-2 -s /system/http_proxy/"+var+" -t list --list-type="+type+" "+values));
+ gconf.waitForFinished();
+}
+
+
+void Ut_ProxyConf::init()
+{
+ put_http("host", "string", "my.proxy.com");
+ put_http("port", "int", "8080");
+
+ QList<QString> list;
+ list.append("foo.bar.com");
+ list.append("192.168.19.69");
+ list.append("192.168.20.0/24");
+ list.append("bar.foo.com");
+ put_list("ignore_hosts", "string", list);
+ put_http("use_http_host", "boolean", "true");
+
+ put("mode", "string", "auto");
+ put("autoconfig_url", "string", "http://foo.bar.com/autoconf");
+ put("secure_host", "string", "secure_host.com");
+ put("secure_port", "int", "112");
+
+ put("ftp_host", "string", "ftp.nuukia.com");
+ put("ftp_port", "int", "2000");
+ put("socks_host", "string", "socks.host.com");
+ put("socks_port", "int", "10080");
+ put("rtsp_host", "string", "rtsp.voice.com");
+ put("rtsp_port", "int", "1554");
+
+ pc = new Maemo::ProxyConf();
+}
+
+void Ut_ProxyConf::cleanup()
+{
+ delete pc;
+ pc = 0;
+}
+
+void Ut_ProxyConf::initTestCase()
+{
+}
+
+void Ut_ProxyConf::cleanupTestCase()
+{
+}
+
+
+void Ut_ProxyConf::proxy_ftp_no_factory_ok_auto()
+{
+ QList<QNetworkProxy> nplist;
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/"));
+
+ nplist = pc->flush(query);
+ QVERIFY(nplist.length()==0);
+}
+
+
+void Ut_ProxyConf::proxy_ftp_no_factory_ok_manual()
+{
+ QList<QNetworkProxy> nplist;
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/"));
+
+ put("mode", "string", "manual");
+
+ nplist = pc->flush(query);
+ foreach (QNetworkProxy proxy, nplist) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(nplist.length()==3);
+ QVERIFY(nplist.first().type() == QNetworkProxy::FtpCachingProxy);
+}
+
+
+void Ut_ProxyConf::proxy_http_no_factory_ok_manual()
+{
+ QList<QNetworkProxy> nplist;
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/"));
+
+ put("mode", "string", "manual");
+
+ nplist = pc->flush(query);
+ foreach (QNetworkProxy proxy, nplist) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(nplist.length()==3);
+ QVERIFY(nplist.first().type() == QNetworkProxy::HttpProxy);
+}
+
+
+void Ut_ProxyConf::proxy_https_no_factory_ok_manual()
+{
+ QList<QNetworkProxy> nplist;
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("https://maps.google.com/"));
+
+ put("mode", "string", "manual");
+
+ nplist = pc->flush(query);
+ foreach (QNetworkProxy proxy, nplist) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(nplist.length()==2);
+ QVERIFY(nplist.first().type() == QNetworkProxy::HttpProxy);
+}
+
+
+void Ut_ProxyConf::proxy_socks_no_factory_ok_manual()
+{
+ QList<QNetworkProxy> nplist;
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/"));
+
+ put("mode", "string", "manual");
+ put_http("host", "string", "");
+
+ nplist = pc->flush(query);
+ foreach (QNetworkProxy proxy, nplist) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(nplist.length()==2);
+ QVERIFY(nplist.first().type() == QNetworkProxy::Socks5Proxy);
+}
+
+
+void Ut_ProxyConf::proxy_default_no_factory_ok_manual()
+{
+ QList<QNetworkProxy> nplist;
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("foobar://maps.google.com/"));
+
+ put("mode", "string", "manual");
+ put("socks_host", "string", "");
+ put("secure_host", "string", "");
+
+ nplist = pc->flush(query);
+ foreach (QNetworkProxy proxy, nplist) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(nplist.length()==0);
+}
+
+
+void Ut_ProxyConf::proxy_ftp_factory_ok_auto()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/"));
+ Maemo::ProxyConf::update();
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+ QVERIFY(listOfProxies.length()==1);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_ftp_factory_ok_manual()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("ftp://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ foreach (QNetworkProxy proxy, listOfProxies) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(listOfProxies.length()==3);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::FtpCachingProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_http_factory_ok_manual()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ foreach (QNetworkProxy proxy, listOfProxies) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(listOfProxies.length()==3);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_https_factory_ok_manual()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("https://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ foreach (QNetworkProxy proxy, listOfProxies) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(listOfProxies.length()==2);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_socks_factory_ok_manual()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+ put_http("host", "string", "");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ foreach (QNetworkProxy proxy, listOfProxies) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(listOfProxies.length()==2);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::Socks5Proxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_http_factory_ok_manual_clear()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+ put_http("host", "string", "192.168.1.1");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ foreach (QNetworkProxy proxy, listOfProxies) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(listOfProxies.length()==3);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy);
+
+ Maemo::ProxyConf::clear();
+ listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+ QVERIFY(listOfProxies.length()==1);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy);
+}
+
+
+void Ut_ProxyConf::proxy_default_factory_ok_manual()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("foobar://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+ put("socks_host", "string", "");
+ put("secure_host", "string", "");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ QVERIFY(listOfProxies.length()==1);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_http_factory_ok_manual_ignore_list()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://192.168.19.70/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+
+ foreach (QNetworkProxy proxy, listOfProxies) {
+ qDebug() << "proxy: " << proxy.hostName() << "port" << proxy.port();
+ }
+ QVERIFY(listOfProxies.length()==3);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::HttpProxy);
+
+ query = QNetworkProxyQuery(QUrl("http://192.168.20.10/"));
+ listOfProxies = QNetworkProxyFactory::proxyForQuery(query);
+ QVERIFY(listOfProxies.length()==1);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+void Ut_ProxyConf::proxy_default_factory_ok_manual_system()
+{
+ QNetworkProxyQuery query = QNetworkProxyQuery(QUrl("http://maps.google.com/"));
+ Maemo::ProxyConf::update();
+
+ put("mode", "string", "manual");
+
+ QList<QNetworkProxy> listOfProxies = QNetworkProxyFactory::systemProxyForQuery(query);
+
+ QVERIFY(listOfProxies.length()==1);
+ QVERIFY(listOfProxies.first().type() == QNetworkProxy::NoProxy);
+ Maemo::ProxyConf::clear();
+}
+
+
+
+
+QTEST_MAIN(Ut_ProxyConf)
+
+#include "ut_proxyconf.moc"
diff --git a/src/3rdparty/libgq.pri b/src/3rdparty/libgq.pri
new file mode 100644
index 0000000000..a89706a1e7
--- /dev/null
+++ b/src/3rdparty/libgq.pri
@@ -0,0 +1,9 @@
+INCLUDEPATH += $$PWD/libgq/gconf
+
+HEADERS += \
+ $$PWD/libgq/gconf/gconfitem.h \
+ $$PWD/libgq/gconf/GConfItem
+
+SOURCES += \
+ $$PWD/libgq/gconf/gconfitem.cpp
+
diff --git a/src/3rdparty/libgq/.gitignore b/src/3rdparty/libgq/.gitignore
new file mode 100644
index 0000000000..70a4735f37
--- /dev/null
+++ b/src/3rdparty/libgq/.gitignore
@@ -0,0 +1,37 @@
+/Makefile.in
+/aclocal.m4
+/autom4te.cache/
+/config.guess
+/config.sub
+/configure
+/depcomp
+/gconf/Makefile.in
+/install-sh
+/ltmain.sh
+/missing
+/Makefile
+/config.log
+/config.status
+/gconf/.deps/
+/gconf/Makefile
+/libtool
+/confdefs.h
+/gconf/.libs/
+/gconf/libgq-gconf.la
+/gconf/gq-gconf.pc
+/gconf/moc_gconfitem_h.cpp
+/gconf/mocs.cpp
+/gconf/test-gconf
+/gconf/gconfitem_moc.cpp
+/gconf/test-gconf_moc.cpp
+/libgq-*.tar.gz
+/debian/libgq-gconf-dev/
+/debian/libgq-gconf0/
+/debian/tmp/
+/debian/libgq-gconf0-dbg/
+/debian/libgq-gconf-doc/
+/debian/*.debhelper.log
+/debian/*.substvars
+/debian/files
+/debian/*.debhelper
+/gconf/html/
diff --git a/src/3rdparty/libgq/Makefile.am b/src/3rdparty/libgq/Makefile.am
new file mode 100644
index 0000000000..42b3ece04b
--- /dev/null
+++ b/src/3rdparty/libgq/Makefile.am
@@ -0,0 +1,4 @@
+SUBDIRS = gconf
+
+dist-hook:
+ rm -rf `find $(distdir) -name '*_moc.cpp'`
diff --git a/src/3rdparty/libgq/README b/src/3rdparty/libgq/README
new file mode 100644
index 0000000000..c37abba8ae
--- /dev/null
+++ b/src/3rdparty/libgq/README
@@ -0,0 +1,6 @@
+This is libgq, a set of small libraries with Q wrappers for G things.
+
+* GConf
+
+The libgq-gconf library contains the GConfItem class for accessing
+GConf.
diff --git a/src/3rdparty/libgq/autogen.sh b/src/3rdparty/libgq/autogen.sh
new file mode 100755
index 0000000000..0a4a0343ab
--- /dev/null
+++ b/src/3rdparty/libgq/autogen.sh
@@ -0,0 +1,2 @@
+#! /bin/sh
+autoreconf --install --force -v
diff --git a/src/3rdparty/libgq/configure.ac b/src/3rdparty/libgq/configure.ac
new file mode 100644
index 0000000000..f4fc2be604
--- /dev/null
+++ b/src/3rdparty/libgq/configure.ac
@@ -0,0 +1,23 @@
+AC_INIT([libgq],[0.2],[marius.vollmer@nokia.com],[libgq])
+AC_CONFIG_SRCDIR([Makefile.am])
+AM_INIT_AUTOMAKE([-Wall -Werror tar-ustar foreign])
+
+AC_PROG_CXX
+AC_PROG_LIBTOOL
+
+PKG_CHECK_MODULES([QT], [QtCore])
+PKG_CHECK_MODULES([QTEST], [QtTest])
+PKG_CHECK_MODULES([GLIB], [glib-2.0])
+PKG_CHECK_MODULES([GCONF], [gconf-2.0])
+
+MOC=`pkg-config QtCore --variable=moc_location`
+RCC=`pkg-config QtCore --variable=exec_prefix`/bin/rcc
+
+AC_SUBST([MOC])
+AC_SUBST([RCC])
+
+AC_CONFIG_FILES([Makefile
+ gconf/Makefile
+ gconf/gq-gconf.pc])
+
+AC_OUTPUT
diff --git a/src/3rdparty/libgq/debian/README.scratchbox b/src/3rdparty/libgq/debian/README.scratchbox
new file mode 100644
index 0000000000..23ba7935ce
--- /dev/null
+++ b/src/3rdparty/libgq/debian/README.scratchbox
@@ -0,0 +1,28 @@
+This packages behaves a bit wierdly inside Scratchbox 1, by design.
+
+When building it with dpkg-buildpackage or equivalent, it will disable
+all devkits and adjust PATH. This means that almost all build
+dependencies will come from your installed packages, and not from
+Scratchbox or the configured devkits.
+
+Since some of our packages do not work with Scratchboxes fakeroot
+(because the latter is too old), you should use the targets fakeroot
+instead.
+
+You can disable this behavior by setting SBOX_DONT_SANITIZE in the
+environment.
+
+When this package is build in a certain buildbot, it will go further
+and permantly change the Scratchbox target. This should not happen to
+anyone but the buildbot, but there is a chance it will happen to you
+by accident.
+
+The buildbot is recognized via the $USER environment variable. If it
+matches "bifh[0-9]", the permanent changes will be done.
+
+The permanent changes mostly consist of running apt-get dist-upgrade
+and making sure that the targets fakeroot is used.
+
+This weirdness is brought to you by:
+
+ http://maemo.gitorious.org/maemo-af/maemoify-tools
diff --git a/src/3rdparty/libgq/debian/changelog b/src/3rdparty/libgq/debian/changelog
new file mode 100644
index 0000000000..f6242540bf
--- /dev/null
+++ b/src/3rdparty/libgq/debian/changelog
@@ -0,0 +1,31 @@
+libgq (0.4+0m6) unstable; urgency=low
+
+ * This entry has been added by BIFH queue processor
+ version has been changed to 0.4+0m6
+
+ -- Marius Vollmer <marius.vollmer@nokia.com> Fri, 04 Jun 2010 18:28:43 +0300
+
+libgq (0.4) unstable; urgency=low
+
+ * Never release the GConf client, to avoid having to recreate it
+ immediately. Might fix NB#164690.
+
+ -- Marius Vollmer <marius.vollmer@nokia.com> Fri, 04 Jun 2010 18:10:50 +0300
+
+libgq (0.3) unstable; urgency=low
+
+ * Added autotools to Build-Depends.
+
+ -- Marius Vollmer <marius.vollmer@nokia.com> Tue, 23 Feb 2010 12:04:45 +0200
+
+libgq (0.2) unstable; urgency=low
+
+ * Build fixes.
+
+ -- Marius Vollmer <marius.vollmer@nokia.com> Wed, 16 Dec 2009 15:56:05 +0200
+
+libgq (0.1) unstable; urgency=low
+
+ * Initial release.
+
+ -- Marius Vollmer <marius.vollmer@nokia.com> Wed, 16 Dec 2009 15:54:46 +0200
diff --git a/src/3rdparty/libgq/debian/compat b/src/3rdparty/libgq/debian/compat
new file mode 100644
index 0000000000..7f8f011eb7
--- /dev/null
+++ b/src/3rdparty/libgq/debian/compat
@@ -0,0 +1 @@
+7
diff --git a/src/3rdparty/libgq/debian/control b/src/3rdparty/libgq/debian/control
new file mode 100644
index 0000000000..3feaa466ea
--- /dev/null
+++ b/src/3rdparty/libgq/debian/control
@@ -0,0 +1,43 @@
+Source: libgq
+Section: libs
+Priority: extra
+Maintainer: Marius Vollmer <marius.vollmer@nokia.com>
+Origin: maemo
+Build-Depends: debhelper (>= 7), libqt4-dev, doxygen, libgconf2-dev, libglib2.0-dev, autoconf, automake, libtool
+Vcs-Browser: http://gitorious.org/maemo-af/libgq
+Vcs-Git: git@gitorious.org:maemo-af/libgq.git
+
+Package: libgq-gconf0
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: a Qt wrapper for GConf
+ This library contains the GConfItem class, for easy
+ access to GConf from Qt programs.
+ .
+ This package contains the shared run-time library.
+
+Package: libgq-gconf0-dbg
+Architecture: any
+Depends: libgq-gconf0 (= ${source:Version})
+Description: a Qt wrapper for GConf
+ This library contains the GConfItem class, for easy
+ access to GConf from Qt programs.
+ .
+ This package contains the debugging symbols.
+
+Package: libgq-gconf-dev
+Architecture: any
+Depends: libgq-gconf0 (= ${source:Version}), libqt4-dev, libgconf2-dev
+Description: a Qt wrapper for GConf
+ This library contains the GConfItem class, for easy
+ access to GConf from Qt programs.
+ .
+ This package contains the development files.
+
+Package: libgq-gconf-doc
+Architecture: all
+Description: a Qt wrapper for GConf
+ This library contains the GConfItem class, for easy
+ access to GConf from Qt programs.
+ .
+ This package contains the documentation.
diff --git a/src/3rdparty/libgq/debian/copyright b/src/3rdparty/libgq/debian/copyright
new file mode 100644
index 0000000000..45b04e6929
--- /dev/null
+++ b/src/3rdparty/libgq/debian/copyright
@@ -0,0 +1,8 @@
+Copyright (c) 2009 Nokia Corporation.
+
+This program, is free software; you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License version
+2.1 as published by the Free Software Foundation.
+
+The full text of the LGPL 2.1 can be found in
+/usr/share/common-licenses.
diff --git a/src/3rdparty/libgq/debian/fixup-scratchbox b/src/3rdparty/libgq/debian/fixup-scratchbox
new file mode 100755
index 0000000000..b39ad5fc28
--- /dev/null
+++ b/src/3rdparty/libgq/debian/fixup-scratchbox
@@ -0,0 +1,79 @@
+#! /bin/sh
+
+# XXX - this needs to run under fakeroot...
+
+exec 3>&1 1>&2
+
+real_dpkg_checkbuilddeps () {
+ SBOX_REDIRECT_IGNORE=/usr/bin/perl /usr/bin/perl /usr/bin/dpkg-checkbuilddeps "$@"
+}
+
+finish () {
+ if ! real_dpkg_checkbuilddeps; then
+ echo "This package does not use any devkits."
+ echo "Please install all build dependencies as real packages."
+ echo >&3 FAIL
+ fi
+ exit 0
+}
+
+# The stamp file can not be in the source tree because then it would
+# end up in the source package, which is not what we want. We put it
+# into /var/tmp so that it gets deleted when a new rootstrap is
+# extracted.
+
+STAMP=/var/tmp/SANITIZED.$(head debian/changelog | md5sum | cut -d' ' -f1)
+
+if [ -e $STAMP ]; then
+ exit 0;
+fi
+
+# Only do permanent changes if this is BIFH
+
+echo "$USER" | grep -q 'bifh[0-9]' || finish
+
+# prevent bash from killing the system
+rm -f /var/lib/bash/provide-sh
+
+# clean ~/.texmf-var to avoid trouble with stale things hiding there.
+rm -rf ~/.texmf-var/
+
+pfx="dpkg-checkbuilddeps: Unmet build dependencies:"
+deps=`real_dpkg_checkbuilddeps 2>&1 | grep "^$pfx" | \
+ sed -e "s/$pfx//" -e s'/([^)]*)//g' -e 's/|//'`
+deps="$deps build-essential automake autoconf libtool ed gawk diff dpkg-dev"
+for d in $deps; do
+ echo apt-get "$@" install $d
+ apt-get -o DPkg::Options::=--force-confold -q --force-yes --yes install $d
+done
+apt-get -o DPkg::Options::=--force-confold -q --force-yes --yes dist-upgrade
+
+# Make sure we get a fresh fakeroot installation
+
+# We can't seem to control the value of LD_PRELOAD well enough, so we
+# just copy the good version of libfakeroot over the bad one that
+# Scratchbox uses. This will result in a good version of libfakeroot
+# talking to a bad version of faked, but that seems to work well
+# enough. The protocol between the two is really simple and unlikely
+# to change even when new syscalls are wrapped. And this is a
+# desperate hack anyway, so it's OK if there is blood all over the
+# floor from time to time.
+#
+# After we have overwritten libfakeroot, it no longer works with any
+# host binaries, such as the ones in /scratchbox/compilers/bin or
+# /scratchbox/tools/bin. Thus, we must avoid running those when
+# fakerooted.
+#
+# We use "cp -l" here to avoid overwriting a library that is in use.
+#
+if [ "$(fakeroot -v)" = "fakeroot version 1.4.2" ]; then
+ apt-get -q --force-yes --yes --reinstall install fakeroot
+ cp -fl /usr/lib/libfakeroot/libfakeroot-sysv.so /usr/lib/libfakeroot-sysv/libfakeroot.so.0
+ cp -fl /usr/lib/libfakeroot/libfakeroot-tcp.so /usr/lib/libfakeroot-tcp/libfakeroot.so.0
+else
+ echo "We have $(fakeroot -v), hurray!"
+fi
+
+touch $STAMP
+
+finish
diff --git a/src/3rdparty/libgq/debian/libgq-gconf-dev.install b/src/3rdparty/libgq/debian/libgq-gconf-dev.install
new file mode 100644
index 0000000000..b3d949f416
--- /dev/null
+++ b/src/3rdparty/libgq/debian/libgq-gconf-dev.install
@@ -0,0 +1,5 @@
+usr/include/gq/GConfItem
+usr/include/gq/gconfitem.h
+usr/lib/libgq-gconf.so
+usr/lib/libgq-gconf.a
+usr/lib/pkgconfig/gq-gconf.pc
diff --git a/src/3rdparty/libgq/debian/libgq-gconf-doc.install b/src/3rdparty/libgq/debian/libgq-gconf-doc.install
new file mode 100644
index 0000000000..9007055b25
--- /dev/null
+++ b/src/3rdparty/libgq/debian/libgq-gconf-doc.install
@@ -0,0 +1 @@
+gconf/html usr/share/doc/libgq-gconf-doc/
diff --git a/src/3rdparty/libgq/debian/libgq-gconf0.install b/src/3rdparty/libgq/debian/libgq-gconf0.install
new file mode 100644
index 0000000000..4ca628315b
--- /dev/null
+++ b/src/3rdparty/libgq/debian/libgq-gconf0.install
@@ -0,0 +1 @@
+usr/lib/libgq-gconf.so.*
diff --git a/src/3rdparty/libgq/debian/maemo-sanitize b/src/3rdparty/libgq/debian/maemo-sanitize
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/src/3rdparty/libgq/debian/maemo-sanitize
diff --git a/src/3rdparty/libgq/debian/rules b/src/3rdparty/libgq/debian/rules
new file mode 100755
index 0000000000..1f293b3348
--- /dev/null
+++ b/src/3rdparty/libgq/debian/rules
@@ -0,0 +1,32 @@
+#! /usr/bin/make -f
+
+# Sanitize build environment when running inside Scratchbox 1
+ifneq (,$(wildcard /targets))
+ ifeq (,$(SBOX_DONT_SANITIZE))
+ export PATH:=/bin:/usr/bin
+ export MAKE:=make
+ ifeq (,$(FAKEROOTKEY))
+ export SBOX_REDIRECT_TO_DIRS:=/scratchbox/compilers/bin
+ else
+ export SBOX_REDIRECT_TO_DIRS:=
+ endif
+ ifneq (,$(shell debian/fixup-scratchbox))
+ $(error Error)
+ endif
+ endif
+endif
+
+override_dh_auto_configure:
+ ./autogen.sh
+ dh_auto_configure
+
+override_dh_auto_build:
+ dh_auto_build
+ cd gconf && doxygen
+
+override_dh_strip:
+ dh_strip -plibgq-gconf0 --dbg-package=libgq-gconf0-dbg
+ dh_strip
+
+%:
+ dh $@
diff --git a/src/3rdparty/libgq/gconf/Doxyfile b/src/3rdparty/libgq/gconf/Doxyfile
new file mode 100644
index 0000000000..7f5c11a3d5
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/Doxyfile
@@ -0,0 +1,1514 @@
+# Doxyfile 1.6.1
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME = gq-gconf
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German,
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian,
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak,
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it parses.
+# With this tag you can assign which parser to use for a given extension.
+# Doxygen has a built-in mapping, but you can override or extend it using this tag.
+# The format is ext=language, where ext is a file extension, and language is one of
+# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP,
+# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat
+# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran),
+# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING =
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter
+# and setter methods for a property. Setting this option to YES (the default)
+# will make doxygen to replace the get and set methods by a property in the
+# documentation. This will only work if the methods are indeed getting or
+# setting a simple type. If this is not the case, or you want to show the
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to
+# determine which symbols to keep in memory and which to flush to disk.
+# When the cache is full, less often used symbols will be written to disk.
+# For small to medium size projects (<1000 input files) the default value is
+# probably good enough. For larger projects a too small cache size can cause
+# doxygen to be busy swapping symbols to and from disk most of the time
+# causing a significant performance penality.
+# If the system has enough physical memory increasing the cache will improve the
+# performance by keeping more symbols in memory. Note that the value works on
+# a logarithmic scale so increasing the size by one will rougly double the
+# memory usage. The cache size is given by this formula:
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
+# corresponding to a cache size of 2^16 = 65536 symbols
+
+SYMBOL_CACHE_SIZE = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = NO
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = NO
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page.
+# This will remove the Files entry from the Quick Index and from the
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the
+# Namespaces page.
+# This will remove the Namespaces entry from the Quick Index
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by
+# doxygen. The layout file controls the global structure of the generated output files
+# in an output format independent way. The create the layout file that represents
+# doxygen's defaults, run doxygen with the -l option. You can optionally specify a
+# file name after the option, if omitted DoxygenLayout.xml will be used as the name
+# of the layout file.
+
+LAYOUT_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = gconfitem.h gconfitem.cpp
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = NO
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE =
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output.
+# If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis.
+# Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match.
+# The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code.
+# Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information.
+
+GENERATE_DOCSET = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file
+# content.
+
+CHM_INDEX_ENCODING =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER
+# are set, an additional index file will be generated that can be used as input for
+# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated
+# HTML documentation.
+
+GENERATE_QHP = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can
+# be used to specify the file name of the resulting .qch file.
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE =
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE =
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating
+# Qt Help Project output. For more information please see
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add.
+# For more information please see
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME =
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS =
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's
+# filter section matches.
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS =
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can
+# be used to specify the location of Qt's qhelpgenerator.
+# If non-empty doxygen will try to run qhelpgenerator on the generated
+# .qhp file.
+
+QHG_LOCATION =
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index
+# structure should be generated to display hierarchical information.
+# If the tag value is set to YES, a side panel will be generated
+# containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser).
+# Windows users are probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories,
+# and Class Hierarchy pages using a tree view instead of an ordered list.
+
+USE_INLINE_TREES = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+# Use this tag to change the font size of Latex formulas included
+# as images in the HTML documentation. The default is 10. Note that
+# when you change the font size after a successful doxygen run you need
+# to manually remove any form_*.png images from the HTML output directory
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE = 10
+
+# When the SEARCHENGINE tag is enable doxygen will generate a search box for the HTML output. The underlying search engine uses javascript
+# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP) or Qt help (GENERATE_QHP)
+# there is already a search function so this one should typically
+# be disabled.
+
+SEARCHENGINE = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = NO
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader.
+# This is useful
+# if you want to understand what is going on.
+# On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED =
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+#
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+#
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = NO
+
+# By default doxygen will write a font called FreeSans.ttf to the output
+# directory and reference it in all dot files that doxygen generates. This
+# font does not include all possible unicode characters however, so when you need
+# these (or just want a differently looking font) you can specify the font name
+# using DOT_FONTNAME. You need need to make sure dot is able to find the font,
+# which can be done by putting it in a standard location or by setting the
+# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory
+# containing the font.
+
+DOT_FONTNAME = FreeSans
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs.
+# The default size is 10pt.
+
+DOT_FONTSIZE = 10
+
+# By default doxygen will tell dot to use the output directory to look for the
+# FreeSans.ttf font (which doxygen will put there itself). If you specify a
+# different font using DOT_FONTNAME you can set the path where dot
+# can find it using this tag.
+
+DOT_FONTPATH =
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH = NO
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH = NO
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is disabled by default, because dot on Windows does not
+# seem to support this out of the box. Warning: Depending on the platform used,
+# enabling this option may lead to badly anti-aliased labels on the edges of
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = YES
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
diff --git a/src/3rdparty/libgq/gconf/GConfItem b/src/3rdparty/libgq/gconf/GConfItem
new file mode 100644
index 0000000000..0a5867141d
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/GConfItem
@@ -0,0 +1 @@
+#include "gconfitem.h"
diff --git a/src/3rdparty/libgq/gconf/Makefile.am b/src/3rdparty/libgq/gconf/Makefile.am
new file mode 100644
index 0000000000..353970d452
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/Makefile.am
@@ -0,0 +1,37 @@
+AM_CXXFLAGS = $(QT_CFLAGS) $(GLIB_CFLAGS) $(GCONF_CFLAGS)
+LIBS += $(QT_LIBS) $(GLIB_LIBS) $(GCONF_LIBS)
+
+lib_LTLIBRARIES = libgq-gconf.la
+
+libgq_gconf_la_SOURCES = GConfItem \
+ gconfitem.h \
+ gconfitem.cpp \
+ gconfitem_moc.cpp
+
+gqincludedir=$(includedir)/gq
+gqinclude_HEADERS = gconfitem.h GConfItem
+
+pkgconfigdir = $(libdir)/pkgconfig
+pkgconfig_DATA = gq-gconf.pc
+
+# Tests
+
+check_PROGRAMS = test-gconf
+
+test_gconf_SOURCES = test-gconf.h test-gconf.cpp test-gconf_moc.cpp
+test_gconf_CFLAGS = $(QTEST_CFLAGS)
+test_gconf_LDADD = libgq-gconf.la $(QTEST_LIBS)
+
+TESTS = run-test-gconf
+
+EXTRA_DIST = run-test-gconf
+
+# Moccing
+
+%_moc.cpp: %.h
+ $(MOC) -o "$@" "$<"
+
+clean-moc:
+ rm -f *_moc.cpp *_moc.lo
+
+clean-local: clean-moc
diff --git a/src/3rdparty/libgq/gconf/gconfitem.cpp b/src/3rdparty/libgq/gconf/gconfitem.cpp
new file mode 100644
index 0000000000..d8c565a7c9
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/gconfitem.cpp
@@ -0,0 +1,376 @@
+/* * This file is part of libgq *
+ *
+ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ *
+ * Contact: Marius Vollmer <marius.vollmer@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#include <QString>
+#include <QStringList>
+#include <QByteArray>
+#include <QVariant>
+#include <QtDebug>
+
+#include "gconfitem.h"
+
+#include <glib.h>
+#include <gconf/gconf-value.h>
+#include <gconf/gconf-client.h>
+
+struct GConfItemPrivate {
+ QString key;
+ QVariant value;
+ guint notify_id;
+
+ static void notify_trampoline(GConfClient*, guint, GConfEntry *, gpointer);
+};
+
+/* We get the default client and never release it, on purpose, to
+ avoid disconnecting from the GConf daemon when a program happens to
+ not have any GConfItems for short periods of time.
+ */
+static GConfClient *
+get_gconf_client ()
+{
+ static bool initialized = false;
+ static GConfClient *client;
+
+ if (initialized)
+ return client;
+
+ g_type_init ();
+ client = gconf_client_get_default();
+ initialized = true;
+
+ return client;
+}
+
+/* Sometimes I like being too clever...
+ */
+#define withClient(c) for (GConfClient *c = get_gconf_client (); c; c = NULL)
+
+static QByteArray convertKey (QString key)
+{
+ if (key.startsWith('/'))
+ return key.toUtf8();
+ else
+ {
+ qWarning() << "Using dot-separated key names with GConfItem is deprecated.";
+ qWarning() << "Please use" << '/' + key.replace('.', '/') << "instead of" << key;
+ return '/' + key.replace('.', '/').toUtf8();
+ }
+}
+
+static QString convertKey(const char *key)
+{
+ return QString::fromUtf8(key);
+}
+
+static QVariant convertValue(GConfValue *src)
+{
+ if (!src) {
+ return QVariant();
+ } else {
+ switch (src->type) {
+ case GCONF_VALUE_INVALID:
+ return QVariant(QVariant::Invalid);
+ case GCONF_VALUE_BOOL:
+ return QVariant((bool)gconf_value_get_bool(src));
+ case GCONF_VALUE_INT:
+ return QVariant(gconf_value_get_int(src));
+ case GCONF_VALUE_FLOAT:
+ return QVariant(gconf_value_get_float(src));
+ case GCONF_VALUE_STRING:
+ return QVariant(QString::fromUtf8(gconf_value_get_string(src)));
+ case GCONF_VALUE_LIST:
+ switch (gconf_value_get_list_type(src)) {
+ case GCONF_VALUE_STRING:
+ {
+ QStringList result;
+ for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next)
+ result.append(QString::fromUtf8(gconf_value_get_string((GConfValue *)elts->data)));
+ return QVariant(result);
+ }
+ default:
+ {
+ QList<QVariant> result;
+ for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next)
+ result.append(convertValue((GConfValue *)elts->data));
+ return QVariant(result);
+ }
+ }
+ case GCONF_VALUE_SCHEMA:
+ default:
+ return QVariant();
+ }
+ }
+}
+
+static GConfValue *convertString(const QString &str)
+{
+ GConfValue *v = gconf_value_new (GCONF_VALUE_STRING);
+ gconf_value_set_string (v, str.toUtf8().data());
+ return v;
+}
+
+static GConfValueType primitiveType (const QVariant &elt)
+{
+ switch(elt.type()) {
+ case QVariant::String:
+ return GCONF_VALUE_STRING;
+ case QVariant::Int:
+ return GCONF_VALUE_INT;
+ case QVariant::Double:
+ return GCONF_VALUE_FLOAT;
+ case QVariant::Bool:
+ return GCONF_VALUE_BOOL;
+ default:
+ return GCONF_VALUE_INVALID;
+ }
+}
+
+static GConfValueType uniformType(const QList<QVariant> &list)
+{
+ GConfValueType result = GCONF_VALUE_INVALID;
+
+ foreach (const QVariant &elt, list) {
+ GConfValueType elt_type = primitiveType (elt);
+
+ if (elt_type == GCONF_VALUE_INVALID)
+ return GCONF_VALUE_INVALID;
+
+ if (result == GCONF_VALUE_INVALID)
+ result = elt_type;
+ else if (result != elt_type)
+ return GCONF_VALUE_INVALID;
+ }
+
+ if (result == GCONF_VALUE_INVALID)
+ return GCONF_VALUE_STRING; // empty list.
+ else
+ return result;
+}
+
+static int convertValue(const QVariant &src, GConfValue **valp)
+{
+ GConfValue *v;
+
+ switch(src.type()) {
+ case QVariant::Invalid:
+ v = NULL;
+ break;
+ case QVariant::Bool:
+ v = gconf_value_new (GCONF_VALUE_BOOL);
+ gconf_value_set_bool (v, src.toBool());
+ break;
+ case QVariant::Int:
+ v = gconf_value_new (GCONF_VALUE_INT);
+ gconf_value_set_int (v, src.toInt());
+ break;
+ case QVariant::Double:
+ v = gconf_value_new (GCONF_VALUE_FLOAT);
+ gconf_value_set_float (v, src.toDouble());
+ break;
+ case QVariant::String:
+ v = convertString(src.toString());
+ break;
+ case QVariant::StringList:
+ {
+ GSList *elts = NULL;
+ v = gconf_value_new(GCONF_VALUE_LIST);
+ gconf_value_set_list_type(v, GCONF_VALUE_STRING);
+ foreach (const QString &str, src.toStringList())
+ elts = g_slist_prepend(elts, convertString(str));
+ gconf_value_set_list_nocopy(v, g_slist_reverse(elts));
+ break;
+ }
+ case QVariant::List:
+ {
+ GConfValueType elt_type = uniformType(src.toList());
+ if (elt_type == GCONF_VALUE_INVALID)
+ v = NULL;
+ else
+ {
+ GSList *elts = NULL;
+ v = gconf_value_new(GCONF_VALUE_LIST);
+ gconf_value_set_list_type(v, elt_type);
+ foreach (const QVariant &elt, src.toList())
+ {
+ GConfValue *val = NULL;
+ convertValue(elt, &val); // guaranteed to succeed.
+ elts = g_slist_prepend(elts, val);
+ }
+ gconf_value_set_list_nocopy(v, g_slist_reverse(elts));
+ }
+ break;
+ }
+ default:
+ return 0;
+ }
+
+ *valp = v;
+ return 1;
+}
+
+void GConfItemPrivate::notify_trampoline (GConfClient*,
+ guint,
+ GConfEntry *,
+ gpointer data)
+{
+ GConfItem *item = (GConfItem *)data;
+ item->update_value (true);
+}
+
+void GConfItem::update_value (bool emit_signal)
+{
+ QVariant new_value;
+
+ withClient(client) {
+ GError *error = NULL;
+ QByteArray k = convertKey(priv->key);
+ GConfValue *v = gconf_client_get(client, k.data(), &error);
+
+ if (error) {
+ qWarning() << error->message;
+ g_error_free (error);
+ new_value = priv->value;
+ } else {
+ new_value = convertValue(v);
+ if (v)
+ gconf_value_free(v);
+ }
+ }
+
+ if (new_value != priv->value) {
+ priv->value = new_value;
+ if (emit_signal)
+ emit valueChanged();
+ }
+}
+
+QString GConfItem::key() const
+{
+ return priv->key;
+}
+
+QVariant GConfItem::value() const
+{
+ return priv->value;
+}
+
+QVariant GConfItem::value(const QVariant &def) const
+{
+ if (priv->value.isNull())
+ return def;
+ else
+ return priv->value;
+}
+
+void GConfItem::set(const QVariant &val)
+{
+ withClient(client) {
+ QByteArray k = convertKey(priv->key);
+ GConfValue *v;
+ if (convertValue(val, &v)) {
+ GError *error = NULL;
+
+ if (v) {
+ gconf_client_set(client, k.data(), v, &error);
+ gconf_value_free(v);
+ } else {
+ gconf_client_unset(client, k.data(), &error);
+ }
+
+ if (error) {
+ qWarning() << error->message;
+ g_error_free(error);
+ } else if (priv->value != val) {
+ priv->value = val;
+ emit valueChanged();
+ }
+
+ } else
+ qWarning() << "Can't store a" << val.typeName();
+ }
+}
+
+void GConfItem::unset() {
+ set(QVariant());
+}
+
+QList<QString> GConfItem::listDirs() const
+{
+ QList<QString> children;
+
+ withClient(client) {
+ QByteArray k = convertKey(priv->key);
+ GSList *dirs = gconf_client_all_dirs(client, k.data(), NULL);
+ for (GSList *d = dirs; d; d = d->next) {
+ children.append(convertKey((char *)d->data));
+ g_free (d->data);
+ }
+ g_slist_free (dirs);
+ }
+
+ return children;
+}
+
+QList<QString> GConfItem::listEntries() const
+{
+ QList<QString> children;
+
+ withClient(client) {
+ QByteArray k = convertKey(priv->key);
+ GSList *entries = gconf_client_all_entries(client, k.data(), NULL);
+ for (GSList *e = entries; e; e = e->next) {
+ children.append(convertKey(((GConfEntry *)e->data)->key));
+ gconf_entry_free ((GConfEntry *)e->data);
+ }
+ g_slist_free (entries);
+ }
+
+ return children;
+}
+
+GConfItem::GConfItem(const QString &key, QObject *parent)
+ : QObject (parent)
+{
+ priv = new GConfItemPrivate;
+ priv->key = key;
+ priv->notify_id = 0;
+ withClient(client) {
+ update_value (false);
+ QByteArray k = convertKey(priv->key);
+ gconf_client_add_dir (client, k.data(), GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
+ priv->notify_id = gconf_client_notify_add (client, k.data(),
+ GConfItemPrivate::notify_trampoline, this,
+ NULL, NULL);
+ }
+}
+
+GConfItem::~GConfItem()
+{
+ withClient(client) {
+ QByteArray k = convertKey(priv->key);
+ if (priv->notify_id)
+ gconf_client_notify_remove (client, priv->notify_id);
+ gconf_client_remove_dir (client, k.data(), NULL);
+ }
+ delete priv;
+}
diff --git a/src/3rdparty/libgq/gconf/gconfitem.h b/src/3rdparty/libgq/gconf/gconfitem.h
new file mode 100644
index 0000000000..17ca04e74a
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/gconfitem.h
@@ -0,0 +1,147 @@
+/* * This file is part of libgq *
+ *
+ * Copyright (C) 2009 Nokia Corporation.
+ *
+ * Contact: Marius Vollmer <marius.vollmer@nokia.com>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA
+ *
+ */
+
+#ifndef GCONFITEM_H
+#define GCONFITEM_H
+
+#include <QVariant>
+#include <QStringList>
+#include <QObject>
+
+/*!
+
+ \brief GConfItem is a simple C++ wrapper for GConf.
+
+ Creating a GConfItem instance gives you access to a single GConf
+ key. You can get and set its value, and connect to its
+ valueChanged() signal to be notified about changes.
+
+ The value of a GConf key is returned to you as a QVariant, and you
+ pass in a QVariant when setting the value. GConfItem converts
+ between a QVariant and GConf values as needed, and according to the
+ following rules:
+
+ - A QVariant of type QVariant::Invalid denotes an unset GConf key.
+
+ - QVariant::Int, QVariant::Double, QVariant::Bool are converted to
+ and from the obvious equivalents.
+
+ - QVariant::String is converted to/from a GConf string and always
+ uses the UTF-8 encoding. No other encoding is supported.
+
+ - QVariant::StringList is converted to a list of UTF-8 strings.
+
+ - QVariant::List (which denotes a QList<QVariant>) is converted
+ to/from a GConf list. All elements of such a list must have the
+ same type, and that type must be one of QVariant::Int,
+ QVariant::Double, QVariant::Bool, or QVariant::String. (A list of
+ strings is returned as a QVariant::StringList, however, when you
+ get it back.)
+
+ - Any other QVariant or GConf value is essentially ignored.
+
+ \warning GConfItem is as thread-safe as GConf.
+
+*/
+
+class GConfItem : public QObject
+{
+ Q_OBJECT
+
+ public:
+ /*! Initializes a GConfItem to access the GConf key denoted by
+ \a key. Key names should follow the normal GConf conventions
+ like "/myapp/settings/first".
+
+ \param key The name of the key.
+ \param parent Parent object
+ */
+ explicit GConfItem(const QString &key, QObject *parent = 0);
+
+ /*! Finalizes a GConfItem.
+ */
+ virtual ~GConfItem();
+
+ /*! Returns the key of this item, as given to the constructor.
+ */
+ QString key() const;
+
+ /*! Returns the current value of this item, as a QVariant.
+ */
+ QVariant value() const;
+
+ /*! Returns the current value of this item, as a QVariant. If
+ * there is no value for this item, return \a def instead.
+ */
+ QVariant value(const QVariant &def) const;
+
+ /*! Set the value of this item to \a val. If \a val can not be
+ represented in GConf or GConf refuses to accept it for other
+ reasons, the current value is not changed and nothing happens.
+
+ When the new value is different from the old value, the
+ changedValue() signal is emitted on this GConfItem as part
+ of calling set(), but other GConfItem:s for the same key do
+ only receive a notification once the main loop runs.
+
+ \param val The new value.
+ */
+ void set(const QVariant &val);
+
+ /*! Unset this item. This is equivalent to
+
+ \code
+ item.set(QVariant(QVariant::Invalid));
+ \endcode
+ */
+ void unset();
+
+ /*! Return a list of the directories below this item. The
+ returned strings are absolute key names like
+ "/myapp/settings".
+
+ A directory is a key that has children. The same key might
+ also have a value, but that is confusing and best avoided.
+ */
+ QList<QString> listDirs() const;
+
+ /*! Return a list of entries below this item. The returned
+ strings are absolute key names like "/myapp/settings/first".
+
+ A entry is a key that has a value. The same key might also
+ have children, but that is confusing and is best avoided.
+ */
+ QList<QString> listEntries() const;
+
+ signals:
+ /*! Emitted when the value of this item has changed.
+ */
+ void valueChanged();
+
+ private:
+ friend struct GConfItemPrivate;
+ struct GConfItemPrivate *priv;
+
+ void update_value(bool emit_signal);
+};
+
+#endif // GCONFITEM_H
diff --git a/src/3rdparty/libgq/gconf/gq-gconf.pc.in b/src/3rdparty/libgq/gconf/gq-gconf.pc.in
new file mode 100644
index 0000000000..bd76d65423
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/gq-gconf.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: gq-gconf
+Description: Qt/GConf wrapper
+Version: @VERSION@
+Requires: QtCore
+Libs: -L${libdir} -lgq-gconf
+Cflags: -I${includedir}/gq
diff --git a/src/3rdparty/libgq/gconf/run-test-gconf b/src/3rdparty/libgq/gconf/run-test-gconf
new file mode 100755
index 0000000000..67f90907c0
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/run-test-gconf
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+# please make sure that the en_US.UTF-8 locale is available!
+# - apt-get install locales
+# - make sure /etc/locale.gen contains the line "en_US.UTF-8 UTF-8"
+# - run /usr/sbin/locale-gen
+LC_ALL=en_US.UTF-8
+export LC_ALL
+
+gconftool-2 -s -t bool /Test/Bool true
+VALUE=$(gconftool-2 -g /Test/Bool)
+if [ "$VALUE" != "true" ]; then
+ echo "GConf is not running, skipping all tests"
+ exit 77
+fi
+
+# Setup values expected by the external_values() test.
+
+gconftool-2 -s -t int /Test/Int 123
+gconftool-2 -s -t string /Test/String "Hello GConf"
+gconftool-2 -s -t float /Test/Double 3.5
+gconftool-2 -s -t list --list-type string /Test/StringList "[Hello,GConf,ÄÖÜ]"
+gconftool-2 -s -t list --list-type int /Test/IntList "[1,2,3,4]"
+gconftool-2 -s -t list --list-type float /Test/DoubleList "[3.5,3.5,3.5]"
+gconftool-2 -s -t list --list-type bool /Test/BoolList "[false,true,true,false]"
+gconftool-2 -u /Test/UnsetBefore
+gconftool-2 -s -t int /Test/UnsetAfter 100
+gconftool-2 -s -t int /Test/Dir/Entry 200
+
+./test-gconf $* || exit 1
+
+# Check what set_external() has left behind.
+
+compare() {
+ if [ "$1" != "$2" ]; then
+ echo "FAIL: '$1' != '$2'"
+ exit 1
+ fi
+}
+
+compare "`gconftool-2 -g /Test/Bool`" false
+compare "`gconftool-2 -g /Test/Int`" 54321
+compare "`gconftool-2 -g /Test/String`" "Good bye GConf"
+compare "`gconftool-2 -g /Test/Double`" -2.5
+compare "`gconftool-2 -g /Test/StringList`" "[Good,bye,GConf,äöü]"
+compare "`gconftool-2 -g /Test/IntList`" "[5,4,3,2,1]"
+compare "`gconftool-2 -g /Test/DoubleList`" "[-2.5,-2.5]"
+compare "`gconftool-2 -g /Test/BoolList`" "[false,false,true,true]"
+compare "`gconftool-2 -g /Test/UnsetAfter 2>&1`" 'No value set for `/Test/UnsetAfter'"'"
diff --git a/src/3rdparty/libgq/gconf/test-gconf.cpp b/src/3rdparty/libgq/gconf/test-gconf.cpp
new file mode 100644
index 0000000000..52eb28171a
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/test-gconf.cpp
@@ -0,0 +1,299 @@
+#include "test-gconf.h"
+
+#define MYLOGLEVEL 2
+void myMessageOutput(QtMsgType type, const char *msg)
+{
+ switch (type) {
+ case QtDebugMsg:
+ if (MYLOGLEVEL <= 0)
+ fprintf(stderr, "Debug: %s\n", msg);
+ break;
+ case QtWarningMsg:
+ if (MYLOGLEVEL <= 1)
+ fprintf(stderr, "Warning: %s\n", msg);
+ break;
+ case QtCriticalMsg:
+ if (MYLOGLEVEL <= 2)
+ fprintf(stderr, "Critical: %s\n", msg);
+ break;
+ case QtFatalMsg:
+ if (MYLOGLEVEL <= 3)
+ fprintf(stderr, "Fatal: %s\n", msg);
+ abort();
+ }
+}
+
+//
+// Definition of testcases: Normal tests
+//
+
+void GConfItemTests::timeout()
+{
+ timed_out = true;
+ timer.stop();
+}
+
+// Before all tests
+void GConfItemTests::initTestCase()
+{
+ connect(&timer, SIGNAL(timeout()),
+ this, SLOT(timeout()));
+}
+
+// After all tests
+void GConfItemTests::cleanupTestCase()
+{
+}
+
+// Before each test
+void GConfItemTests::init()
+{
+ boolItem = new GConfItem("/Test/Bool");
+ intItem = new GConfItem("/Test/Int");
+ stringItem = new GConfItem("/Test/String");
+ doubleItem = new GConfItem("/Test/Double");
+ stringListItem = new GConfItem("/Test/StringList");
+ intListItem = new GConfItem("/Test/IntList");
+ doubleListItem = new GConfItem("/Test/DoubleList");
+ boolListItem = new GConfItem("/Test/BoolList");
+ unsetBeforeItem = new GConfItem("/Test/UnsetBefore");
+ unsetAfterItem = new GConfItem("/Test/UnsetAfter");
+ signalSpy = new SignalListener();
+ QObject::connect(boolItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(intItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(stringItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(doubleItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(stringListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(intListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(doubleListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::connect(boolListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+}
+
+// After each test
+void GConfItemTests::cleanup()
+{
+ QObject::disconnect(boolItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(intItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(stringItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(doubleItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(stringListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(intListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(doubleListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ QObject::disconnect(boolListItem, SIGNAL(valueChanged()), signalSpy, SLOT(valueChanged()));
+ delete signalSpy;
+ delete boolItem;
+ delete intItem;
+ delete stringItem;
+ delete doubleItem;
+ delete stringListItem;
+ delete intListItem;
+ delete doubleListItem;
+ delete boolListItem;
+ delete unsetBeforeItem;
+ delete unsetAfterItem;
+
+ timer.stop();
+}
+
+void GConfItemTests::path()
+{
+ QCOMPARE(boolItem->key(), QString("/Test/Bool"));
+ QCOMPARE(intItem->key(), QString("/Test/Int"));
+ QCOMPARE(stringItem->key(), QString("/Test/String"));
+ QCOMPARE(doubleItem->key(), QString("/Test/Double"));
+ QCOMPARE(stringListItem->key(), QString("/Test/StringList"));
+ QCOMPARE(intListItem->key(), QString("/Test/IntList"));
+ QCOMPARE(doubleListItem->key(), QString("/Test/DoubleList"));
+ QCOMPARE(boolListItem->key(), QString("/Test/BoolList"));
+ QCOMPARE(unsetBeforeItem->key(), QString("/Test/UnsetBefore"));
+ QCOMPARE(unsetAfterItem->key(), QString("/Test/UnsetAfter"));
+}
+
+void GConfItemTests::external_values()
+{
+ // These values are set before this program starts.
+ QCOMPARE(boolItem->value().toBool(), true);
+ QCOMPARE(intItem->value().toInt(), 123);
+ QCOMPARE(stringItem->value().toString(), QString("Hello GConf"));
+ QCOMPARE(doubleItem->value().toDouble(), 3.5);
+ QCOMPARE(stringListItem->value().toStringList(), QStringList() << "Hello" << "GConf" << QString::fromUtf8("ÄÖÜ"));
+ QCOMPARE(intListItem->value().toList(), QList<QVariant>() << 1 << 2 << 3 << 4);
+ QCOMPARE(doubleListItem->value().toList(), QList<QVariant>() << 3.5 << 3.5 << 3.5);
+ QCOMPARE(boolListItem->value().toList(), QList<QVariant>() << false << true << true << false);
+ QCOMPARE(unsetBeforeItem->value().isValid(), false);
+ QCOMPARE(unsetAfterItem->value().isValid(), true);
+}
+
+void GConfItemTests::set_bool()
+{
+ signalSpy->numberOfCalls = 0;
+
+ boolItem->set(false);
+ QCOMPARE(boolItem->value().toBool(), false);
+ boolItem->set(true);
+ QCOMPARE(boolItem->value().toBool(), true);
+
+ QCOMPARE(signalSpy->numberOfCalls, 2);
+}
+
+void GConfItemTests::set_int()
+{
+ signalSpy->numberOfCalls = 0;
+
+ intItem->set(12);
+ QCOMPARE(intItem->value().toInt(), 12);
+ intItem->set(-5);
+ QCOMPARE(intItem->value().toInt(), -5);
+
+ QCOMPARE(signalSpy->numberOfCalls, 2);
+}
+
+void GConfItemTests::set_string()
+{
+ signalSpy->numberOfCalls = 0;
+
+ stringItem->set("Hi");
+ QCOMPARE(stringItem->value().toString(), QString("Hi"));
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::set_unicode_string()
+{
+ signalSpy->numberOfCalls = 0;
+
+ stringItem->set(QString::fromUtf8("Höäü"));
+ QCOMPARE(stringItem->value().toString(), QString::fromUtf8("Höäü"));
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::set_double()
+{
+ signalSpy->numberOfCalls = 0;
+
+ doubleItem->set(1.2345);
+ QCOMPARE(doubleItem->value().toDouble(), 1.2345);
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::set_string_list()
+{
+ signalSpy->numberOfCalls = 0;
+
+ stringListItem->set(QStringList() << "one" << "two" << "three");
+ QCOMPARE(stringListItem->value().toStringList(), QStringList() << "one" << "two" << "three");
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::set_int_list()
+{
+ signalSpy->numberOfCalls = 0;
+
+ intListItem->set(QList<QVariant>() << 10 << 11 << 12);
+ QCOMPARE(intListItem->value().toList(), QList<QVariant>() << 10 << 11 << 12);
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::set_double_list()
+{
+ signalSpy->numberOfCalls = 0;
+
+ doubleListItem->set(QList<QVariant>() << 1.1 << 2.2 << 3.3);
+ QCOMPARE(doubleListItem->value().toList(), QList<QVariant>() << 1.1 << 2.2 << 3.3);
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::set_bool_list()
+{
+ signalSpy->numberOfCalls = 0;
+
+ boolListItem->set(QList<QVariant>() << true << true << false);
+ QCOMPARE(boolListItem->value().toList(), QList<QVariant>() << true << true << false);
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::unset ()
+{
+ signalSpy->numberOfCalls = 0;
+
+ boolItem->unset();
+ QCOMPARE(boolItem->value().isValid(), false);
+
+ QCOMPARE(signalSpy->numberOfCalls, 1);
+}
+
+void GConfItemTests::list_dirs ()
+{
+ GConfItem test("/Test");
+ QStringList dirs = test.listDirs();
+
+ QVERIFY (!dirs.contains("/Test/Bool"));
+ QVERIFY (!dirs.contains("/Test/Int"));
+ QVERIFY (!dirs.contains("/Test/String"));
+ QVERIFY (!dirs.contains("/Test/Double"));
+ QVERIFY (!dirs.contains("/Test/StringList"));
+ QVERIFY (!dirs.contains("/Test/IntList"));
+ QVERIFY (!dirs.contains("/Test/DoubleList"));
+ QVERIFY (!dirs.contains("/Test/BoolList"));
+ QVERIFY (!dirs.contains("/Test/UnsetBefore"));
+ QVERIFY (!dirs.contains("/Test/UnsetAfter"));
+ QVERIFY (dirs.contains("/Test/Dir"));
+}
+
+void GConfItemTests::list_entries ()
+{
+ GConfItem test("/Test");
+ QStringList entries = test.listEntries();
+
+ QVERIFY (!entries.contains("/Test/Bool")); // has been unset above
+ QVERIFY (entries.contains("/Test/Int"));
+ QVERIFY (entries.contains("/Test/String"));
+ QVERIFY (entries.contains("/Test/Double"));
+ QVERIFY (entries.contains("/Test/StringList"));
+ QVERIFY (entries.contains("/Test/IntList"));
+ QVERIFY (entries.contains("/Test/DoubleList"));
+ QVERIFY (entries.contains("/Test/BoolList"));
+ QVERIFY (!entries.contains("/Test/UnsetBefore"));
+ QVERIFY (entries.contains("/Test/UnsetAfter"));
+ QVERIFY (!entries.contains("/Test/Dir"));
+}
+
+void GConfItemTests::get_default ()
+{
+ intItem->unset();
+ QCOMPARE(intItem->value(123).toInt(), 123);
+ intItem->set(234);
+ QCOMPARE(intItem->value(123).toInt(), 234);
+}
+
+void GConfItemTests::propagate ()
+{
+ GConfItem secondIntItem("/Test/Int");
+ secondIntItem.set(3000);
+ QVERIFY_TIMEOUT(2000, intItem->value() == secondIntItem.value());
+ QCOMPARE(signalSpy->numberOfCalls, 2);
+}
+
+void GConfItemTests::set_external()
+{
+ // This must be the last test case. The values that are set here
+ // are checked after this program exits.
+
+ boolItem->set(false);
+ intItem->set(54321);
+ stringItem->set("Good bye GConf");
+ doubleItem->set(-2.5);
+ stringListItem->set(QStringList() << "Good" << "bye" << "GConf" << QString::fromUtf8("äöü"));
+ intListItem->set(QList<QVariant>() << 5 << 4 << 3 << 2 << 1);
+ doubleListItem->set(QList<QVariant>() << -2.5 << -2.5);
+ boolListItem->set(QList<QVariant>() << false << false << true << true);
+ unsetAfterItem->set(QVariant());
+}
+
+QTEST_MAIN(GConfItemTests);
diff --git a/src/3rdparty/libgq/gconf/test-gconf.h b/src/3rdparty/libgq/gconf/test-gconf.h
new file mode 100644
index 0000000000..36eaeccca4
--- /dev/null
+++ b/src/3rdparty/libgq/gconf/test-gconf.h
@@ -0,0 +1,86 @@
+#include <QObject>
+#include <QtTest/QtTest>
+#include <QDebug>
+
+#include "GConfItem"
+
+// Helper class for listening to signals
+class SignalListener : public QObject
+{
+ Q_OBJECT
+public:
+ int numberOfCalls;
+ SignalListener() : numberOfCalls(0) {
+ }
+
+public slots:
+ void valueChanged()
+ {
+ numberOfCalls++;
+ }
+};
+
+// Tests for the public API
+class GConfItemTests : public QObject
+{
+ Q_OBJECT
+
+ // Stored pointers etc.
+private:
+ GConfItem *boolItem;
+ GConfItem *intItem;
+ GConfItem *stringItem;
+ GConfItem *doubleItem;
+ GConfItem *stringListItem;
+ GConfItem *intListItem;
+ GConfItem *doubleListItem;
+ GConfItem *boolListItem;
+ GConfItem *unsetBeforeItem;
+ GConfItem *unsetAfterItem;
+
+ SignalListener *signalSpy;
+
+ QTimer timer;
+ bool timed_out;
+
+ // Tests
+private slots:
+ // Init and cleanup helper functions
+ void initTestCase();
+ void cleanupTestCase();
+ void init();
+ void cleanup();
+ void timeout ();
+
+ // Public API
+ void path();
+ void external_values();
+ void set_bool();
+ void set_int();
+ void set_string();
+ void set_unicode_string();
+ void set_double();
+ void set_string_list();
+ void set_int_list();
+ void set_double_list();
+ void set_bool_list();
+ void unset();
+ void get_default();
+ void list_dirs();
+ void list_entries();
+ void propagate();
+ void set_external();
+};
+
+// Useful if you need to process some events until a condition becomes
+// true.
+
+#define QVERIFY_TIMEOUT(msecs, expr) \
+ do { \
+ timed_out = false; \
+ timer.start(msecs); \
+ while (!timed_out && !(expr)) { \
+ QCoreApplication::processEvents(QEventLoop::WaitForMoreEvents); \
+ } \
+ QVERIFY((expr)); \
+ } while(0)
diff --git a/src/3rdparty/libjpeg/ansi2knr.1 b/src/3rdparty/libjpeg/ansi2knr.1
deleted file mode 100644
index f9ee5a631c..0000000000
--- a/src/3rdparty/libjpeg/ansi2knr.1
+++ /dev/null
@@ -1,36 +0,0 @@
-.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
deleted file mode 100644
index e84c210b66..0000000000
--- a/src/3rdparty/libjpeg/ansi2knr.c
+++ /dev/null
@@ -1,739 +0,0 @@
-/* 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/phonon/mmf/abstractmediaplayer.cpp b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
index be2a5683e4..3702560c5f 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.cpp
@@ -16,6 +16,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <QResource>
#include <QUrl>
#include "abstractmediaplayer.h"
@@ -216,9 +217,10 @@ void MMF::AbstractMediaPlayer::doSetTickInterval(qint32 interval)
TRACE_EXIT_0();
}
-void MMF::AbstractMediaPlayer::open(const MediaSource &source, RFile& file)
+void MMF::AbstractMediaPlayer::open()
{
- TRACE_CONTEXT(AbstractMediaPlayer::setFileSource, EAudioApi);
+ TRACE_CONTEXT(AbstractMediaPlayer::open, EAudioApi);
+ const MediaSource source = m_parent->source();
TRACE_ENTRY("state %d source.type %d", privateState(), source.type());
close();
@@ -229,7 +231,9 @@ void MMF::AbstractMediaPlayer::open(const MediaSource &source, RFile& file)
switch (source.type()) {
case MediaSource::LocalFile: {
- symbianErr = openFile(file);
+ RFile *const file = m_parent->file();
+ Q_ASSERT(file);
+ symbianErr = openFile(*file);
if (KErrNone != symbianErr)
errorMessage = tr("Error opening file");
break;
@@ -237,9 +241,10 @@ void MMF::AbstractMediaPlayer::open(const MediaSource &source, RFile& file)
case MediaSource::Url: {
const QUrl url(source.url());
-
if (url.scheme() == QLatin1String("file")) {
- symbianErr = openFile(file);
+ RFile *const file = m_parent->file();
+ Q_ASSERT(file);
+ symbianErr = openFile(*file);
if (KErrNone != symbianErr)
errorMessage = tr("Error opening file");
} else {
@@ -251,6 +256,19 @@ void MMF::AbstractMediaPlayer::open(const MediaSource &source, RFile& file)
break;
}
+ case MediaSource::Stream: {
+ QResource *const resource = m_parent->resource();
+ if (resource) {
+ m_buffer.Set(resource->data(), resource->size());
+ symbianErr = openDescriptor(m_buffer);
+ if (KErrNone != symbianErr)
+ errorMessage = tr("Error opening resource");
+ } else {
+ errorMessage = tr("Error opening source: resource not opened");
+ }
+ break;
+ }
+
// Other source types are handled in MediaObject::createPlayer
// Protection against adding new media types and forgetting to update this switch
diff --git a/src/3rdparty/phonon/mmf/abstractmediaplayer.h b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
index 7d28cafee0..e795ecbf91 100644
--- a/src/3rdparty/phonon/mmf/abstractmediaplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractmediaplayer.h
@@ -47,7 +47,7 @@ protected:
AbstractMediaPlayer(MediaObject *parent, const AbstractPlayer *player);
public:
- virtual void open(const Phonon::MediaSource&, RFile&);
+ virtual void open();
// MediaObjectInterface
virtual void play();
@@ -70,6 +70,7 @@ protected:
virtual int setDeviceVolume(int mmfVolume) = 0;
virtual int openFile(RFile& file) = 0;
virtual int openUrl(const QString& url) = 0;
+ virtual int openDescriptor(const TDesC8 &des) = 0;
virtual int bufferStatus() const = 0;
void updateMetaData();
@@ -123,6 +124,9 @@ private:
bool m_prefinishMarkSent;
bool m_aboutToFinishSent;
+ // Used for playback of resource files
+ TPtrC8 m_buffer;
+
QMultiMap<QString, QString> m_metaData;
};
diff --git a/src/3rdparty/phonon/mmf/abstractplayer.h b/src/3rdparty/phonon/mmf/abstractplayer.h
index 30d524377d..dd98c7c53b 100644
--- a/src/3rdparty/phonon/mmf/abstractplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractplayer.h
@@ -26,8 +26,6 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "abstractvideooutput.h"
-class RFile;
-
QT_BEGIN_NAMESPACE
namespace Phonon
@@ -54,7 +52,7 @@ class AbstractPlayer : public QObject
public:
AbstractPlayer(const AbstractPlayer *player);
- virtual void open(const Phonon::MediaSource&, RFile&) = 0;
+ virtual void open() = 0;
virtual void close() = 0;
// MediaObjectInterface (implemented)
diff --git a/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp b/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
index 9ea4d18c44..fb20bea018 100644
--- a/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
+++ b/src/3rdparty/phonon/mmf/abstractvideoplayer.cpp
@@ -144,6 +144,12 @@ int MMF::AbstractVideoPlayer::openUrl(const QString &url)
return err;
}
+int MMF::AbstractVideoPlayer::openDescriptor(const TDesC8 &des)
+{
+ TRAPD(err, m_player->OpenDesL(des));
+ return err;
+}
+
int MMF::AbstractVideoPlayer::bufferStatus() const
{
int result = 0;
diff --git a/src/3rdparty/phonon/mmf/abstractvideoplayer.h b/src/3rdparty/phonon/mmf/abstractvideoplayer.h
index d854793902..3ff3c75d7d 100644
--- a/src/3rdparty/phonon/mmf/abstractvideoplayer.h
+++ b/src/3rdparty/phonon/mmf/abstractvideoplayer.h
@@ -66,6 +66,7 @@ public:
virtual int setDeviceVolume(int mmfVolume);
virtual int openFile(RFile &file);
virtual int openUrl(const QString &url);
+ virtual int openDescriptor(const TDesC8 &des);
virtual int bufferStatus() const;
virtual void close();
diff --git a/src/3rdparty/phonon/mmf/audioplayer.cpp b/src/3rdparty/phonon/mmf/audioplayer.cpp
index f49e898923..7c8b9bd04f 100644
--- a/src/3rdparty/phonon/mmf/audioplayer.cpp
+++ b/src/3rdparty/phonon/mmf/audioplayer.cpp
@@ -137,6 +137,12 @@ int MMF::AudioPlayer::openUrl(const QString& /*url*/)
return 0;
}
+int MMF::AudioPlayer::openDescriptor(const TDesC8 &des)
+{
+ TRAPD(err, m_player->OpenDesL(des));
+ return err;
+}
+
int MMF::AudioPlayer::bufferStatus() const
{
int result = 0;
diff --git a/src/3rdparty/phonon/mmf/audioplayer.h b/src/3rdparty/phonon/mmf/audioplayer.h
index 0eb8bb7f70..e43caddbf2 100644
--- a/src/3rdparty/phonon/mmf/audioplayer.h
+++ b/src/3rdparty/phonon/mmf/audioplayer.h
@@ -67,6 +67,7 @@ typedef CMdaAudioPlayerUtility NativePlayer;
virtual int setDeviceVolume(int mmfVolume);
virtual int openFile(RFile& file);
virtual int openUrl(const QString& url);
+ virtual int openDescriptor(const TDesC8 &des);
virtual int bufferStatus() const;
virtual void close();
diff --git a/src/3rdparty/phonon/mmf/dummyplayer.cpp b/src/3rdparty/phonon/mmf/dummyplayer.cpp
index d39ef76c75..ba75b02113 100644
--- a/src/3rdparty/phonon/mmf/dummyplayer.cpp
+++ b/src/3rdparty/phonon/mmf/dummyplayer.cpp
@@ -92,7 +92,7 @@ qint64 MMF::DummyPlayer::totalTime() const
return 0;
}
-void MMF::DummyPlayer::open(const Phonon::MediaSource &, RFile &)
+void MMF::DummyPlayer::open()
{
}
diff --git a/src/3rdparty/phonon/mmf/dummyplayer.h b/src/3rdparty/phonon/mmf/dummyplayer.h
index 9d45696910..5b004113ef 100644
--- a/src/3rdparty/phonon/mmf/dummyplayer.h
+++ b/src/3rdparty/phonon/mmf/dummyplayer.h
@@ -57,7 +57,7 @@ public:
virtual qint64 totalTime() const;
// AbstractPlayer
- virtual void open(const Phonon::MediaSource&, RFile&);
+ virtual void open();
virtual void close();
virtual void doSetTickInterval(qint32 interval);
};
diff --git a/src/3rdparty/phonon/mmf/mediaobject.cpp b/src/3rdparty/phonon/mmf/mediaobject.cpp
index d264377ded..98326b8d40 100644
--- a/src/3rdparty/phonon/mmf/mediaobject.cpp
+++ b/src/3rdparty/phonon/mmf/mediaobject.cpp
@@ -34,6 +34,7 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
#include "mediaobject.h"
#include <QDir>
+#include <QResource>
#include <QUrl>
QT_BEGIN_NAMESPACE
@@ -52,6 +53,8 @@ using namespace Phonon::MMF;
MMF::MediaObject::MediaObject(QObject *parent) : MMF::MediaNode::MediaNode(parent)
, m_recognizerOpened(false)
, m_nextSourceSet(false)
+ , m_file(0)
+ , m_resource(0)
{
m_player.reset(new DummyPlayer());
@@ -68,7 +71,12 @@ MMF::MediaObject::~MediaObject()
TRACE_CONTEXT(MediaObject::~MediaObject, EAudioApi);
TRACE_ENTRY_0();
- m_file.Close();
+ delete m_resource;
+
+ if (m_file)
+ m_file->Close();
+ delete m_file;
+
m_fileServer.Close();
m_recognizer.Close();
@@ -122,12 +130,13 @@ MMF::MediaType MMF::MediaObject::fileMediaType
const QHBufC fileNameSymbian(QDir::toNativeSeparators(fileName));
- m_file.Close();
- TInt err = m_file.Open(m_fileServer, *fileNameSymbian, EFileRead | EFileShareReadersOnly);
+ Q_ASSERT(!m_file);
+ m_file = new RFile;
+ TInt err = m_file->Open(m_fileServer, *fileNameSymbian, EFileRead | EFileShareReadersOnly);
if (KErrNone == err) {
TDataRecognitionResult recognizerResult;
- err = m_recognizer.RecognizeData(m_file, recognizerResult);
+ err = m_recognizer.RecognizeData(*m_file, recognizerResult);
if (KErrNone == err) {
const TPtrC mimeType = recognizerResult.iDataType.Des();
result = Utils::mimeTypeToMediaType(mimeType);
@@ -142,6 +151,23 @@ MMF::MediaType MMF::MediaObject::fileMediaType
return result;
}
+MMF::MediaType MMF::MediaObject::bufferMediaType(const uchar *data, qint64 size)
+{
+ TRACE_CONTEXT(MediaObject::bufferMediaType, EAudioInternal);
+ MediaType result = MediaTypeUnknown;
+ if (openRecognizer()) {
+ TDataRecognitionResult recognizerResult;
+ const TPtrC8 des(data, size);
+ const TInt err = m_recognizer.RecognizeData(KNullDesC, des, recognizerResult);
+ if (KErrNone == err) {
+ const TPtrC mimeType = recognizerResult.iDataType.Des();
+ result = Utils::mimeTypeToMediaType(mimeType);
+ } else {
+ TRACE("RApaLsSession::RecognizeData error %d", err);
+ }
+ }
+ return result;
+}
//-----------------------------------------------------------------------------
// MediaObjectInterface
@@ -228,9 +254,17 @@ void MMF::MediaObject::setSource(const MediaSource &source)
void MMF::MediaObject::switchToSource(const MediaSource &source)
{
+ if (m_file)
+ m_file->Close();
+ delete m_file;
+ m_file = 0;
+
+ delete m_resource;
+ m_resource = 0;
+
createPlayer(source);
m_source = source;
- m_player->open(m_source, m_file);
+ m_player->open();
emit currentSourceChanged(m_source);
}
@@ -272,10 +306,29 @@ void MMF::MediaObject::createPlayer(const MediaSource &source)
case MediaSource::Invalid:
case MediaSource::Disc:
- case MediaSource::Stream:
errorMessage = tr("Error opening source: type not supported");
break;
+ case MediaSource::Stream:
+ {
+ const QString fileName = source.url().toLocalFile();
+ if (fileName.startsWith(QLatin1String(":/")) || fileName.startsWith(QLatin1String("qrc://"))) {
+ Q_ASSERT(!m_resource);
+ m_resource = new QResource(fileName);
+ if (m_resource->isValid()) {
+ if (m_resource->isCompressed())
+ errorMessage = tr("Error opening source: resource is compressed");
+ else
+ mediaType = bufferMediaType(m_resource->data(), m_resource->size());
+ } else {
+ errorMessage = tr("Error opening source: resource not valid");
+ }
+ } else {
+ errorMessage = tr("Error opening source: type not supported");
+ }
+ }
+ break;
+
case MediaSource::Empty:
TRACE_0("Empty media source");
break;
@@ -374,6 +427,16 @@ void MMF::MediaObject::volumeChanged(qreal volume)
m_player->volumeChanged(volume);
}
+RFile* MMF::MediaObject::file() const
+{
+ return m_file;
+}
+
+QResource* MMF::MediaObject::resource() const
+{
+ return m_resource;
+}
+
//-----------------------------------------------------------------------------
// MediaNode
//-----------------------------------------------------------------------------
diff --git a/src/3rdparty/phonon/mmf/mediaobject.h b/src/3rdparty/phonon/mmf/mediaobject.h
index f15eb21131..5399e27216 100644
--- a/src/3rdparty/phonon/mmf/mediaobject.h
+++ b/src/3rdparty/phonon/mmf/mediaobject.h
@@ -33,6 +33,8 @@ along with this library. If not, see <http://www.gnu.org/licenses/>.
QT_BEGIN_NAMESPACE
+class QResource;
+
namespace Phonon
{
namespace MMF
@@ -87,6 +89,9 @@ public:
void setVideoOutput(AbstractVideoOutput* videoOutput);
+ RFile* file() const;
+ QResource* resource() const;
+
public Q_SLOTS:
void volumeChanged(qreal volume);
void switchToNextSource();
@@ -117,6 +122,7 @@ private:
// Audio / video media type recognition
MediaType fileMediaType(const QString& fileName);
+ MediaType bufferMediaType(const uchar *data, qint64 size);
// TODO: urlMediaType function
static qint64 toMilliSeconds(const TTimeIntervalMicroSeconds &);
@@ -132,9 +138,8 @@ private:
MediaSource m_nextSource;
bool m_nextSourceSet;
- // Storing the file handle here to work around KErrInUse error
- // from MMF player utility OpenFileL functions
- RFile m_file;
+ RFile* m_file;
+ QResource* m_resource;
QScopedPointer<AbstractPlayer> m_player;
diff --git a/src/3rdparty/phonon/phonon/mediasource.cpp b/src/3rdparty/phonon/phonon/mediasource.cpp
index be22dc3150..d70b38bdc8 100644
--- a/src/3rdparty/phonon/phonon/mediasource.cpp
+++ b/src/3rdparty/phonon/phonon/mediasource.cpp
@@ -50,7 +50,7 @@ MediaSource::MediaSource(const QString &filename)
const QFileInfo fileInfo(filename);
if (fileInfo.exists()) {
bool localFs = QAbstractFileEngine::LocalDiskFlag & QFSFileEngine(filename).fileFlags(QAbstractFileEngine::LocalDiskFlag);
- if (localFs) {
+ if (localFs && !filename.startsWith(QLatin1String(":/")) && !filename.startsWith(QLatin1String("qrc://"))) {
d->url = QUrl::fromLocalFile(fileInfo.absoluteFilePath());
} else {
#ifndef QT_NO_PHONON_ABSTRACTMEDIASTREAM
@@ -58,6 +58,7 @@ MediaSource::MediaSource(const QString &filename)
d->type = Stream;
d->ioDevice = new QFile(filename);
d->setStream(new IODeviceStream(d->ioDevice, d->ioDevice));
+ d->url = QUrl::fromLocalFile(fileInfo.absoluteFilePath());
#else
d->type = Invalid;
#endif //QT_NO_PHONON_ABSTRACTMEDIASTREAM
diff --git a/src/3rdparty/sqlite.pri b/src/3rdparty/sqlite.pri
new file mode 100644
index 0000000000..575412da09
--- /dev/null
+++ b/src/3rdparty/sqlite.pri
@@ -0,0 +1,4 @@
+CONFIG(release, debug|release):DEFINES *= NDEBUG
+DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
+INCLUDEPATH += $$PWD/sqlite
+SOURCES += $$PWD/sqlite/sqlite3.c
diff --git a/src/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag
index 1d1c8ed15d..0b414abe29 100644
--- a/src/3rdparty/webkit/.tag
+++ b/src/3rdparty/webkit/.tag
@@ -1 +1 @@
-ad96ca2f9b57271da4ea7432022ac686ee0981c2
+e6e692bb056670e2781dd0bc473a60757ae53992
diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
index 8fa3a72b94..c09ad79117 100644
--- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog
+++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog
@@ -1,3 +1,90 @@
+2010-07-02 Peter Varga <pvarga@inf.u-szeged.hu>
+
+ Reviewed by Oliver Hunt.
+
+ The alternativeFrameLocation value is wrong in the emitDisjunction function in
+ case of PatternTerm::TypeParentheticalAssertion. This value needs to be
+ computed from term.frameLocation instead of term.inputPosition. This mistake caused glibc
+ memory corruption in some cases.
+ Layout test added for checking of TypeParentheticalAssertion case.
+ https://bugs.webkit.org/show_bug.cgi?id=41458
+
+ * yarr/RegexInterpreter.cpp:
+ (JSC::Yarr::ByteCompiler::emitDisjunction):
+
+2010-07-03 Yong Li <yoli@rim.com>
+
+ Reviewed by Darin Adler.
+
+ Make Arguments::MaxArguments clamping work for numbers >= 0x80000000 in
+ the interpreter as well as the JIT.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41351
+ rdar://problem/8142141
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::privateExecute): Fix signed integer overflow problem
+ in op_load_varargs handling. 0xFFFFFFFF was read as -1.
+
+2010-07-04 Mark Rowe <mrowe@apple.com>
+
+ Build fix after r62456.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::privateExecute): Be slightly more consistent in using uint32_t to prevent
+ warnings about comparisons between signed and unsigned types, and attempts to call an overload
+ of std::min that doesn't exist.
+
+2010-07-02 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Clamp the number of arguments supported by function.apply
+ https://bugs.webkit.org/show_bug.cgi?id=41351
+ <rdar://problem/8142141>
+
+ Add clamping logic to function.apply similar to that
+ enforced by firefox. We have a smaller clamp than
+ firefox as our calling convention means that stack
+ usage is proportional to argument count -- the firefox
+ limit is larger than you could actually call.
+
+ * interpreter/Interpreter.cpp:
+ (JSC::Interpreter::privateExecute):
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ * runtime/Arguments.h:
+ (JSC::Arguments::):
+
+2010-07-01 Oliver Hunt <oliver@apple.com>
+
+ Reviewed by Geoff Garen.
+
+ Improve reentrancy logic in polymorphic cache stubs
+ <https://bugs.webkit.org/show_bug.cgi?id=41482>
+ <rdar://problem/8094380>
+
+ Make the polymorphic cache stubs handle reentrancy
+ better.
+
+ * jit/JITStubs.cpp:
+ (JSC::DEFINE_STUB_FUNCTION):
+ (JSC::getPolymorphicAccessStructureListSlot):
+
+2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
+
+ This ensures that long-running JavaScript (for example due to a modal alert() dialog),
+ will not trigger a deferred load after only 500ms (the default tokenizer delay) while
+ still giving a reasonable timeout (10 seconds) to prevent deadlock.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29381
+
+ * runtime/TimeoutChecker.h: Add getter for the timeout interval
+
2010-05-18 Anders Carlsson <andersca@apple.com>
Reviewed by Sam Weinig.
diff --git a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
index 2713fd4371..73efc0d8d8 100644
--- a/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/interpreter/Interpreter.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008, 2009 Apple Inc. All rights reserved.
+ * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
* Copyright (C) 2008 Cameron Zwarich <cwzwarich@uwaterloo.ca>
*
* Redistribution and use in source and binary forms, with or without
@@ -3454,9 +3454,10 @@ skip_id_custom_self:
int argsOffset = vPC[2].u.operand;
JSValue arguments = callFrame->r(argsOffset).jsValue();
- int32_t argCount = 0;
+ uint32_t argCount = 0;
if (!arguments) {
argCount = (uint32_t)(callFrame->argumentCount()) - 1;
+ argCount = min<uint32_t>(argCount, Arguments::MaxArguments);
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -3464,9 +3465,9 @@ skip_id_custom_self:
goto vm_throw;
}
ASSERT(!callFrame->callee()->isHostFunction());
- int32_t expectedParams = callFrame->callee()->jsExecutable()->parameterCount();
- int32_t inplaceArgs = min(argCount, expectedParams);
- int32_t i = 0;
+ uint32_t expectedParams = callFrame->callee()->jsExecutable()->parameterCount();
+ uint32_t inplaceArgs = min(argCount, expectedParams);
+ uint32_t i = 0;
Register* argStore = callFrame->registers() + argsOffset;
// First step is to copy the "expected" parameters from their normal location relative to the callframe
@@ -3483,6 +3484,7 @@ skip_id_custom_self:
if (asObject(arguments)->classInfo() == &Arguments::info) {
Arguments* args = asArguments(arguments);
argCount = args->numProvidedArguments(callFrame);
+ argCount = min<uint32_t>(argCount, Arguments::MaxArguments);
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -3493,6 +3495,7 @@ skip_id_custom_self:
} else if (isJSArray(&callFrame->globalData(), arguments)) {
JSArray* array = asArray(arguments);
argCount = array->length();
+ argCount = min<uint32_t>(argCount, Arguments::MaxArguments);
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -3503,6 +3506,7 @@ skip_id_custom_self:
} else if (asObject(arguments)->inherits(&JSArray::info)) {
JSObject* argObject = asObject(arguments);
argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame);
+ argCount = min<uint32_t>(argCount, Arguments::MaxArguments);
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -3510,7 +3514,7 @@ skip_id_custom_self:
goto vm_throw;
}
Register* argsBuffer = callFrame->registers() + argsOffset;
- for (int32_t i = 0; i < argCount; ++i) {
+ for (uint32_t i = 0; i < argCount; ++i) {
argsBuffer[i] = asObject(arguments)->get(callFrame, i);
CHECK_FOR_EXCEPTION();
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
index daa945cada..e5fcdc4e0f 100644
--- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp
@@ -1330,17 +1330,18 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_self_fail)
if (stubInfo->accessType == access_get_by_id_self) {
ASSERT(!stubInfo->stubRoutine);
polymorphicStructureList = new PolymorphicAccessStructureList(CodeLocationLabel(), stubInfo->u.getByIdSelf.baseObjectStructure);
- stubInfo->initGetByIdSelfList(polymorphicStructureList, 2);
+ stubInfo->initGetByIdSelfList(polymorphicStructureList, 1);
} else {
polymorphicStructureList = stubInfo->u.getByIdSelfList.structureList;
listIndex = stubInfo->u.getByIdSelfList.listSize;
- stubInfo->u.getByIdSelfList.listSize++;
}
+ if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE) {
+ stubInfo->u.getByIdSelfList.listSize++;
+ JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, asCell(baseValue)->structure(), ident, slot, slot.cachedOffset());
- JIT::compileGetByIdSelfList(callFrame->scopeChain()->globalData, codeBlock, stubInfo, polymorphicStructureList, listIndex, asCell(baseValue)->structure(), ident, slot, slot.cachedOffset());
-
- if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
- ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
+ if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
+ }
} else
ctiPatchCallByReturnAddress(callFrame->codeBlock(), STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_generic));
return JSValue::encode(result);
@@ -1365,13 +1366,14 @@ static PolymorphicAccessStructureList* getPolymorphicAccessStructureListSlot(Str
case access_get_by_id_proto_list:
prototypeStructureList = stubInfo->u.getByIdProtoList.structureList;
listIndex = stubInfo->u.getByIdProtoList.listSize;
- stubInfo->u.getByIdProtoList.listSize++;
+ if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE)
+ stubInfo->u.getByIdProtoList.listSize++;
break;
default:
ASSERT_NOT_REACHED();
}
- ASSERT(listIndex < POLYMORPHIC_LIST_CACHE_SIZE);
+ ASSERT(listIndex <= POLYMORPHIC_LIST_CACHE_SIZE);
return prototypeStructureList;
}
@@ -1446,21 +1448,24 @@ DEFINE_STUB_FUNCTION(EncodedJSValue, op_get_by_id_proto_list)
int listIndex;
PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(stubInfo, listIndex);
+ if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE) {
+ JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), propertyName, slot, offset);
- JIT::compileGetByIdProtoList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, slotBaseObject->structure(), propertyName, slot, offset);
-
- if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
- ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
+ if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
+ }
} else if (size_t count = normalizePrototypeChain(callFrame, baseValue, slot.slotBase(), propertyName, offset)) {
ASSERT(!asCell(baseValue)->structure()->isDictionary());
int listIndex;
PolymorphicAccessStructureList* prototypeStructureList = getPolymorphicAccessStructureListSlot(stubInfo, listIndex);
+
+ if (listIndex < POLYMORPHIC_LIST_CACHE_SIZE) {
+ StructureChain* protoChain = structure->prototypeChain(callFrame);
+ JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, propertyName, slot, offset);
- StructureChain* protoChain = structure->prototypeChain(callFrame);
- JIT::compileGetByIdChainList(callFrame->scopeChain()->globalData, callFrame, codeBlock, stubInfo, prototypeStructureList, listIndex, structure, protoChain, count, propertyName, slot, offset);
-
- if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
- ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
+ if (listIndex == (POLYMORPHIC_LIST_CACHE_SIZE - 1))
+ ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_list_full));
+ }
} else
ctiPatchCallByReturnAddress(codeBlock, STUB_RETURN_ADDRESS, FunctionPtr(cti_op_get_by_id_proto_fail));
@@ -2129,6 +2134,7 @@ DEFINE_STUB_FUNCTION(int, op_load_varargs)
if (!arguments) {
int providedParams = callFrame->registers()[RegisterFile::ArgumentCount].i() - 1;
argCount = providedParams;
+ argCount = min(argCount, static_cast<uint32_t>(Arguments::MaxArguments));
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -2164,6 +2170,7 @@ DEFINE_STUB_FUNCTION(int, op_load_varargs)
if (asObject(arguments)->classInfo() == &Arguments::info) {
Arguments* argsObject = asArguments(arguments);
argCount = argsObject->numProvidedArguments(callFrame);
+ argCount = min(argCount, static_cast<uint32_t>(Arguments::MaxArguments));
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -2174,6 +2181,7 @@ DEFINE_STUB_FUNCTION(int, op_load_varargs)
} else if (isJSArray(&callFrame->globalData(), arguments)) {
JSArray* array = asArray(arguments);
argCount = array->length();
+ argCount = min(argCount, static_cast<uint32_t>(Arguments::MaxArguments));
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
@@ -2184,6 +2192,7 @@ DEFINE_STUB_FUNCTION(int, op_load_varargs)
} else if (asObject(arguments)->inherits(&JSArray::info)) {
JSObject* argObject = asObject(arguments);
argCount = argObject->get(callFrame, callFrame->propertyNames().length).toUInt32(callFrame);
+ argCount = min(argCount, static_cast<uint32_t>(Arguments::MaxArguments));
int32_t sizeDelta = argsOffset + argCount + RegisterFile::CallFrameHeaderSize;
Register* newEnd = callFrame->registers() + sizeDelta;
if (!registerFile->grow(newEnd) || ((newEnd - callFrame->registers()) != sizeDelta)) {
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h b/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h
index 9797e086d8..cca3cf21d0 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/Arguments.h
@@ -55,6 +55,10 @@ namespace JSC {
class Arguments : public JSObject {
public:
+ // Use an enum because otherwise gcc insists on doing a memory
+ // read.
+ enum { MaxArguments = 0x10000 };
+
enum NoParametersType { NoParameters };
Arguments(CallFrame*);
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp b/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp
index d3ef44cb9e..ae9e038f74 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSArray.cpp
@@ -948,10 +948,10 @@ void JSArray::fillArgList(ExecState* exec, MarkedArgumentBuffer& args)
void JSArray::copyToRegisters(ExecState* exec, Register* buffer, uint32_t maxSize)
{
- ASSERT(m_storage->m_length == maxSize);
+ ASSERT(m_storage->m_length >= maxSize);
UNUSED_PARAM(maxSize);
JSValue* vector = m_storage->m_vector;
- unsigned vectorEnd = min(m_storage->m_length, m_vectorLength);
+ unsigned vectorEnd = min(maxSize, m_vectorLength);
unsigned i = 0;
for (; i < vectorEnd; ++i) {
JSValue& v = vector[i];
@@ -960,7 +960,7 @@ void JSArray::copyToRegisters(ExecState* exec, Register* buffer, uint32_t maxSiz
buffer[i] = v;
}
- for (; i < m_storage->m_length; ++i)
+ for (; i < maxSize; ++i)
buffer[i] = get(exec, i);
}
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h
index 7bfa6d0830..5925641f80 100644
--- a/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h
+++ b/src/3rdparty/webkit/JavaScriptCore/runtime/TimeoutChecker.h
@@ -40,6 +40,7 @@ namespace JSC {
TimeoutChecker();
void setTimeoutInterval(unsigned timeoutInterval) { m_timeoutInterval = timeoutInterval; }
+ unsigned timeoutInterval() const { return m_timeoutInterval; }
unsigned ticksUntilNextCheck() { return m_ticksUntilNextCheck; }
diff --git a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp
index c2cb1c28ab..647b20a865 100644
--- a/src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/yarr/RegexInterpreter.cpp
@@ -1554,7 +1554,7 @@ public:
}
case PatternTerm::TypeParentheticalAssertion: {
- unsigned alternativeFrameLocation = term.inputPosition + RegexStackSpaceForBackTrackInfoParentheticalAssertion;
+ unsigned alternativeFrameLocation = term.frameLocation + RegexStackSpaceForBackTrackInfoParentheticalAssertion;
atomParentheticalAssertionBegin(term.parentheses.subpatternId, term.invertOrCapture, term.frameLocation, alternativeFrameLocation);
emitDisjunction(term.parentheses.disjunction, currentCountAlreadyChecked, 0);
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 2e5ebd0e4e..f8403fb86e 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from
and has the sha1 checksum
- ad96ca2f9b57271da4ea7432022ac686ee0981c2
+ e6e692bb056670e2781dd0bc473a60757ae53992
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index a993a97635..5189eb53a9 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,249 @@
+2010-07-06 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ <use> on <font-face> causes crashes, if SVGUseElement gets detached
+ https://bugs.webkit.org/show_bug.cgi?id=41621
+
+ Do not call removeFromMappedElementSheet() from the SVGFontFaceElement destructor,
+ as that can potentially cause the element to be reattached while destructing.
+
+ In order to fix the crash in the testcase, the order of calling the base-class detach
+ method in SVGUseElement and the instance/shadow tree destruction has to be reversed,
+ matching the order in removedFromDocument().
+
+ Test: svg/custom/use-font-face-crash.svg
+
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::~SVGFontFaceElement): Remove removeFromMappedElementSheet() call.
+ * svg/SVGUseElement.cpp:
+ (WebCore::SVGUseElement::detach): Reverse order of calling base-class detach method and instance/shadow tree destruction.
+
+2010-07-06 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Darin Adler.
+
+ <use> on <font-face> causes crashes, if SVGUseElement gets detached
+ https://bugs.webkit.org/show_bug.cgi?id=41621
+
+ Do not call removeFromMappedElementSheet() from the destructor, as the call to document()->updateStyleSelector() that can potentially
+ cause the element to be reattached while destructing. It's not needed at all, because removedFromDocument() is called before destruction,
+ which already calls removeFromMappedElementSheet() - at this point it's still safe to update the style selector.
+
+ The crash is reproducable when using <use> on <font-face>.
+
+ Test: svg/custom/use-font-face-crash.svg
+
+ * svg/SVGFontFaceElement.cpp:
+ (WebCore::SVGFontFaceElement::~SVGFontFaceElement):
+
+2010-07-05 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Darin Adler.
+
+ Memory corruption with SVG <use> element
+ https://bugs.webkit.org/show_bug.cgi?id=40994
+
+ Fix race condition in svgAttributeChanged. Never call svgAttributeChanged() from attributeChanged()
+ when we're synchronizing SVG attributes. It leads to either unnecessary extra work being done or
+ crashes. Especially together with <polyline>/<polygon> which always synchronize the SVGAnimatedPoints
+ datastructure with the points attribute, no matter if there are changes are not. This should be
+ furhter optimized, but this fix is sane and fixes the root of the evil races.
+
+ Test: svg/custom/use-property-synchronization-crash.svg
+
+ * svg/SVGElement.cpp:
+ (WebCore::SVGElement::attributeChanged):
+
+2010-06-11 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by David Hyatt.
+
+ Don't process floats if parent node is not a RenderBlock.
+ https://bugs.webkit.org/show_bug.cgi?id=40033
+
+ Test: svg/text/clear-floats-crash.svg
+
+ * rendering/RenderBlock.cpp:
+ (WebCore::RenderBlock::clearFloats):
+
+2010-06-23 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ Reproducible crash in com.apple.WebCore 0x01ed3784 WebCore::RenderLineBoxList::appendLineBox(WebCore::InlineFlowBox*) + 36
+ https://bugs.webkit.org/show_bug.cgi?id=40953
+
+ REGRESSION (r58209-58231): Memory corruption with invalid SVG
+ https://bugs.webkit.org/show_bug.cgi?id=40173
+
+ Fix several crashes, all related to <foreignObject> and/or invalid SVG documents.
+ - Only allow <svg> nodes, as direct children of a <foreignObject>, not any other "partial" SVG content.
+ - Assure to create RenderSVGRoot objects for <svg> nodes in <foreignObject>, treat them as "outermost SVG elements".
+ - Never allow any partial SVG content to appear in any document. Only <svg> elements are allowed.
+
+ Tests: svg/custom/bug45331.svg
+ svg/foreignObject/disallowed-svg-nodes-as-direct-children.svg
+ svg/foreignObject/no-crash-with-svg-content-in-html-document.svg
+ svg/foreignObject/svg-document-as-direct-child.svg
+ svg/foreignObject/svg-document-in-html-document.svg
+ svg/foreignObject/text-tref-02-b.svg
+
+ * dom/Element.cpp: Added childShouldCreateRenderer, with ENABLE(SVG) guards.
+ (WebCore::Element::childShouldCreateRenderer): Only create a renderer for a SVG child, if we're a SVG element, or if the child is a <svg> element.
+ * dom/Element.h: Added childShouldCreateRenderer, with ENABLE(SVG) guards.
+ * svg/SVGForeignObjectElement.cpp:
+ (WebCore::SVGForeignObjectElement::childShouldCreateRenderer): Disallow arbitary SVG content, only <svg> elements are allowed as direct children of a <foreignObject>
+ * svg/SVGSVGElement.cpp:
+ (WebCore::SVGSVGElement::isOutermostSVG): Be sure to create RenderSVGRoot objects for <svg> elements inside <foreignObject>
+
+2010-06-10 Abhishek Arya <inferno@chromium.org>
+
+ Reviewed by Dave Hyatt.
+
+ Do not render CSS Styles :first-letter and :first-line in a SVG text element context.
+ https://bugs.webkit.org/show_bug.cgi?id=40031
+
+ Test: svg/text/text-style-invalid.svg
+
+ * rendering/RenderSVGText.cpp:
+ (WebCore::RenderSVGText::firstLineBlock):
+ (WebCore::RenderSVGText::updateFirstLetter):
+ * rendering/RenderSVGText.h:
+
+2010-07-01 Justin Schuh <jschuh@chromium.org>
+
+ Reviewed by Dan Bernstein.
+
+ Prevent crash on counter destruction
+ https://bugs.webkit.org/show_bug.cgi?id=40032
+
+ Added counter destruction to RenderWidget::destroy()
+
+ Test: fast/css/counters/destroy-counter-crash.html
+
+ * rendering/RenderWidget.cpp:
+ (WebCore::RenderWidget::destroy):
+
+2010-06-29 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Darin Adler.
+
+ <rdar://problem/7975842> Certain text is repeated after using splitText()
+
+ Tests: fast/text/setData-dirty-lines.html
+ fast/text/splitText-dirty-lines.html
+
+ * dom/CharacterData.cpp:
+ (WebCore::CharacterData::setData): Call RenderText::setTextWithOffset() rather than
+ setText(), because only the former correctly dirties line boxes.
+ * dom/Text.cpp:
+ (WebCore::Text::splitText): Ditto.
+
+2010-06-25 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ <rdar://problem/8000667> Certain text is repeated before and after a line break
+
+ Test: fast/text/bidi-explicit-embedding-past-end.html
+
+ * platform/text/BidiResolver.h:
+ (WebCore::::createBidiRunsForLine): Committing explicit embedding past the end of the range
+ creates BidiRuns up to the end of the range, so at that point, we can stop iterating.
+
+2010-06-10 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ crash when focus is changed while trying to focus next element
+ https://bugs.webkit.org/show_bug.cgi?id=40407
+
+ Test: fast/events/focus-change-crash.html
+
+ * dom/Element.cpp:
+ (WebCore::Element::focus):
+
+2010-07-01 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] Clamp color stops passed to QGradient to 1.0
+ [https://bugs.webkit.org/show_bug.cgi?id=41484
+
+ Fixes an issue where color stops would be silently dropped from radial gradients.
+
+ * platform/graphics/qt/GradientQt.cpp:
+ (WebCore::Gradient::platformGradient):
+
+2010-07-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Prevent assertion/duplicate loads for non-deferred subtitute-data loads
+
+ https://bugs.webkit.org/show_bug.cgi?id=30879
+
+ MainResourceLoader uses the member m_initialRequest to store requests for future
+ deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
+ have to clear this request so that subsequent entries into the loader will not
+ start yet another load.
+
+ This can happen as a result of a PageGroupLoadDeferrer going out of scope when
+ returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
+ but only in the case of using both substitute-data and non-deferred main resource
+ load together. That's why two new DRT functions were added:
+
+ * queueLoadHTMLString()
+ * setDeferMainResourceLoad()
+
+ The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
+ and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
+ added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
+
+ Test: fast/loader/non-deferred-substitute-load.html
+
+ * loader/MainResourceLoader.cpp:
+ (WebCore::MainResourceLoader::handleDataLoadNow):
+
+2010-07-16 Antonio Gomes <tonikitoo@webkit.org>
+
+ Reviewed by Simon Fraser.
+
+ Spatial navigation: do not consider outline for focusable element boundaries
+ https://bugs.webkit.org/show_bug.cgi?id=42474
+
+ Test: fast/events/spatial-navigation/snav-zero-margin-content.html
+
+ Currently in WebCore::renderRectRelativeToRootDocument function, we are calling
+ RenderObject::absoluteClippedOverflowRect to obtain the rect boundary of a given
+ renderer/element. This method deals with outline, which is out of elements boundary.
+ It makes spatial navigation to fail on common sites like google.gom: "Web, Images, Map, etc"
+ are inaccessible.
+
+ Patch replaces RenderObject::absoluteClippedOverflowRect by Node::getRect,
+ which returns only the absolute bounding box rect of the Element.
+
+ * page/SpatialNavigation.cpp:
+ (WebCore::renderRectRelativeToRootDocument):
+ (WebCore::checkNegativeCoordsForNode):
+
+2010-07-21 Kristian Amlie <kristian.amlie@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Added automatic sqlite extraction for Symbian to QtWebKit.
+
+ Also added sqlite detection in case sqlite is not present in the SDK.
+ This is possible if WebKit is compiled standalone.
+
+ The inclusion part is a consequence of commit c578c6c1d6d in the Qt
+ repository. It will not work on Qt versions < 4.7.1, but that is ok,
+ since the only build system it will affect is marked as experimental
+ in the whole 4.7 series.
+
+ * WebCore.pro:
+
2010-05-14 Abhishek Arya <inferno@chromium.org>
Reviewed by David Hyatt.
diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro
index aaa462336f..f892f9ec9c 100644
--- a/src/3rdparty/webkit/WebCore/WebCore.pro
+++ b/src/3rdparty/webkit/WebCore/WebCore.pro
@@ -118,8 +118,16 @@ win32-g++* {
QMAKE_LIBDIR_POST += $$split(TMPPATH,";")
}
-# Assume that symbian OS always comes with sqlite
-symbian:!CONFIG(QTDIR_build): CONFIG += system-sqlite
+symbian {
+ !CONFIG(QTDIR_build) {
+ # Test if symbian OS comes with sqlite
+ exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso):CONFIG *= system-sqlite
+ } else:!symbian-abld:!symbian-sbsv2 {
+ # When bundled with Qt, all Symbian build systems extract their own sqlite files if
+ # necessary, but on non-mmp based ones we need to specify this ourselves.
+ include($$QT_SOURCE_TREE/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri)
+ }
+}
diff --git a/src/3rdparty/webkit/WebCore/dom/CharacterData.cpp b/src/3rdparty/webkit/WebCore/dom/CharacterData.cpp
index 3c3dc375b4..cb12184181 100644
--- a/src/3rdparty/webkit/WebCore/dom/CharacterData.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/CharacterData.cpp
@@ -46,15 +46,15 @@ void CharacterData::setData(const String& data, ExceptionCode&)
int oldLength = length();
RefPtr<StringImpl> oldStr = m_data;
m_data = dataImpl;
-
+
if ((!renderer() || !rendererIsNeeded(renderer()->style())) && attached()) {
detach();
attach();
} else if (renderer())
- toRenderText(renderer())->setText(m_data);
-
+ toRenderText(renderer())->setTextWithOffset(m_data, 0, oldLength);
+
dispatchModifiedEvent(oldStr.get());
-
+
document()->textRemoved(this, 0, oldLength);
}
diff --git a/src/3rdparty/webkit/WebCore/dom/Element.cpp b/src/3rdparty/webkit/WebCore/dom/Element.cpp
index a02bb4cb36..4c93020ab6 100644
--- a/src/3rdparty/webkit/WebCore/dom/Element.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Element.cpp
@@ -1311,8 +1311,12 @@ void Element::focus(bool restorePreviousSelection)
return;
}
- if (Page* page = doc->page())
+ RefPtr<Node> protect;
+ if (Page* page = doc->page()) {
+ // Focus and change event handlers can cause us to lose our last ref.
+ protect = this;
page->focusController()->setFocusedNode(this, doc->frame());
+ }
// Setting the focused node above might have invalidated the layout due to scripts.
doc->updateLayoutIgnorePendingStylesheets();
@@ -1535,4 +1539,15 @@ const QualifiedName& Element::rareIDAttributeName() const
return rareData()->m_idAttributeName;
}
+#if ENABLE(SVG)
+bool Element::childShouldCreateRenderer(Node* child) const
+{
+ // Only create renderers for SVG elements whose parents are SVG elements, or for proper <svg xmlns="svgNS"> subdocuments.
+ if (child->isSVGElement())
+ return child->hasTagName(SVGNames::svgTag) || isSVGElement();
+
+ return Node::childShouldCreateRenderer(child);
+}
+#endif
+
} // namespace WebCore
diff --git a/src/3rdparty/webkit/WebCore/dom/Element.h b/src/3rdparty/webkit/WebCore/dom/Element.h
index 348ed1c30b..36c4f1bd44 100644
--- a/src/3rdparty/webkit/WebCore/dom/Element.h
+++ b/src/3rdparty/webkit/WebCore/dom/Element.h
@@ -270,6 +270,10 @@ public:
virtual void dispatchFormControlChangeEvent() { }
+#if ENABLE(SVG)
+ virtual bool childShouldCreateRenderer(Node*) const;
+#endif
+
protected:
Element(const QualifiedName&, Document*, ConstructionType);
diff --git a/src/3rdparty/webkit/WebCore/dom/Text.cpp b/src/3rdparty/webkit/WebCore/dom/Text.cpp
index 1ce074a553..229fa882ca 100644
--- a/src/3rdparty/webkit/WebCore/dom/Text.cpp
+++ b/src/3rdparty/webkit/WebCore/dom/Text.cpp
@@ -77,7 +77,7 @@ PassRefPtr<Text> Text::splitText(unsigned offset, ExceptionCode& ec)
document()->textNodeSplit(this);
if (renderer())
- toRenderText(renderer())->setText(dataImpl());
+ toRenderText(renderer())->setTextWithOffset(dataImpl(), 0, oldStr->length());
return newText.release();
}
diff --git a/src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp b/src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp
index 28587e29bb..54c5c34a6a 100644
--- a/src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp
+++ b/src/3rdparty/webkit/WebCore/loader/MainResourceLoader.cpp
@@ -464,6 +464,10 @@ void MainResourceLoader::handleDataLoadNow(MainResourceLoaderTimer*)
KURL url = m_substituteData.responseURL();
if (url.isEmpty())
url = m_initialRequest.url();
+
+ // Clear the initial request here so that subsequent entries into the
+ // loader will not think there's still a deferred load left to do.
+ m_initialRequest = ResourceRequest();
ResourceResponse response(url, m_substituteData.mimeType(), m_substituteData.content()->size(), m_substituteData.textEncoding(), "");
didReceiveResponse(response);
diff --git a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
index a80626f6b4..fdacebb424 100644
--- a/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
+++ b/src/3rdparty/webkit/WebCore/page/SpatialNavigation.cpp
@@ -102,14 +102,9 @@ void distanceDataForNode(FocusDirection direction, Node* start, FocusCandidate&
// FIXME: This function does not behave correctly with transformed frames.
static IntRect renderRectRelativeToRootDocument(RenderObject* render)
{
- ASSERT(render);
+ ASSERT(render && render->node());
- IntRect rect(render->absoluteClippedOverflowRect());
-
- if (rect.isEmpty()) {
- Element* e = static_cast<Element*>(render->node());
- rect = e->getRect();
- }
+ IntRect rect = render->node()->getRect();
// In cases when the |render|'s associated node is in a scrollable inner
// document, we only consider its scrollOffset if it is not offscreen.
@@ -516,7 +511,7 @@ static bool checkNegativeCoordsForNode(Node* node, const IntRect& curRect)
{
ASSERT(node || node->renderer());
- if (curRect.x() > 0 && curRect.y() > 0)
+ if (curRect.x() >= 0 && curRect.y() >= 0)
return true;
bool canBeScrolled = false;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp
index 8b9e2d7f85..1ec320345b 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GradientQt.cpp
@@ -65,7 +65,7 @@ QGradient* Gradient::platformGradient()
lastStop = stopIterator->stop;
if (m_radial && m_r0)
lastStop = m_r0 / m_r1 + lastStop * (1.0f - m_r0 / m_r1);
- m_gradient->setColorAt(lastStop, stopColor);
+ m_gradient->setColorAt(qMin(lastStop, qreal(1.0f)), stopColor);
// Keep the lastStop as orginal value, since the following stopColor depend it
lastStop = stopIterator->stop;
++stopIterator;
diff --git a/src/3rdparty/webkit/WebCore/platform/text/BidiResolver.h b/src/3rdparty/webkit/WebCore/platform/text/BidiResolver.h
index 286cdcd1a9..a99fd01056 100644
--- a/src/3rdparty/webkit/WebCore/platform/text/BidiResolver.h
+++ b/src/3rdparty/webkit/WebCore/platform/text/BidiResolver.h
@@ -806,35 +806,33 @@ void BidiResolver<Iterator, Run>::createBidiRunsForLine(const Iterator& end, boo
break;
}
- if (pastEnd) {
- if (eor == current) {
- if (!reachedEndOfLine) {
- eor = endOfLine;
- switch (m_status.eor) {
- case LeftToRight:
- case RightToLeft:
- case ArabicNumber:
- m_direction = m_status.eor;
- break;
- case EuropeanNumber:
- m_direction = m_status.lastStrong == LeftToRight ? LeftToRight : EuropeanNumber;
- break;
- default:
- ASSERT(false);
- }
- appendRun();
+ if (pastEnd && eor == current) {
+ if (!reachedEndOfLine) {
+ eor = endOfLine;
+ switch (m_status.eor) {
+ case LeftToRight:
+ case RightToLeft:
+ case ArabicNumber:
+ m_direction = m_status.eor;
+ break;
+ case EuropeanNumber:
+ m_direction = m_status.lastStrong == LeftToRight ? LeftToRight : EuropeanNumber;
+ break;
+ default:
+ ASSERT(false);
}
- current = end;
- m_status = stateAtEnd.m_status;
- sor = stateAtEnd.sor;
- eor = stateAtEnd.eor;
- last = stateAtEnd.last;
- reachedEndOfLine = stateAtEnd.reachedEndOfLine;
- lastBeforeET = stateAtEnd.lastBeforeET;
- emptyRun = stateAtEnd.emptyRun;
- m_direction = OtherNeutral;
- break;
+ appendRun();
}
+ current = end;
+ m_status = stateAtEnd.m_status;
+ sor = stateAtEnd.sor;
+ eor = stateAtEnd.eor;
+ last = stateAtEnd.last;
+ reachedEndOfLine = stateAtEnd.reachedEndOfLine;
+ lastBeforeET = stateAtEnd.lastBeforeET;
+ emptyRun = stateAtEnd.emptyRun;
+ m_direction = OtherNeutral;
+ break;
}
// set m_status.last as needed.
@@ -887,8 +885,21 @@ void BidiResolver<Iterator, Run>::createBidiRunsForLine(const Iterator& end, boo
}
increment();
- if (!m_currentExplicitEmbeddingSequence.isEmpty())
+ if (!m_currentExplicitEmbeddingSequence.isEmpty()) {
commitExplicitEmbedding();
+ if (pastEnd) {
+ current = end;
+ m_status = stateAtEnd.m_status;
+ sor = stateAtEnd.sor;
+ eor = stateAtEnd.eor;
+ last = stateAtEnd.last;
+ reachedEndOfLine = stateAtEnd.reachedEndOfLine;
+ lastBeforeET = stateAtEnd.lastBeforeET;
+ emptyRun = stateAtEnd.emptyRun;
+ m_direction = OtherNeutral;
+ break;
+ }
+ }
if (emptyRun && (dirCurrent == RightToLeftEmbedding
|| dirCurrent == LeftToRightEmbedding
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp
index 798663e0a5..e7fa753787 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderBlock.cpp
@@ -2981,6 +2981,12 @@ void RenderBlock::clearFloats()
m_floatingObjects->clear();
}
+ // We should not process floats if the parent node is not a RenderBlock. Otherwise, we will add
+ // floats in an invalid context. This will cause a crash arising from a bad cast on the parent.
+ // See <rdar://problem/8049753>, where float property is applied on a text node in a SVG.
+ if (!parent() || !parent()->isRenderBlock())
+ return;
+
// Attempt to locate a previous sibling with overhanging floats. We skip any elements that are
// out of flow (like floating/positioned elements), and we also skip over any objects that may have shifted
// to avoid floats.
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp
index 76b8b86a56..de902e08af 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.cpp
@@ -225,6 +225,19 @@ FloatRect RenderSVGText::repaintRectInLocalCoordinates() const
return repaintRect;
}
+// Fix for <rdar://problem/8048875>. We should not render :first-line CSS Style
+// in a SVG text element context.
+RenderBlock* RenderSVGText::firstLineBlock() const
+{
+ return 0;
+}
+
+// Fix for <rdar://problem/8048875>. We should not render :first-letter CSS Style
+// in a SVG text element context.
+void RenderSVGText::updateFirstLetter()
+{
+}
+
}
#endif // ENABLE(SVG)
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h b/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h
index ab4b09b5c8..f09e3964a7 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderSVGText.h
@@ -72,6 +72,9 @@ private:
virtual RootInlineBox* createRootInlineBox();
+ virtual RenderBlock* firstLineBlock() const;
+ virtual void updateFirstLetter();
+
AffineTransform m_localTransform;
};
diff --git a/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp b/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
index 561bead868..251a65ddb2 100644
--- a/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
+++ b/src/3rdparty/webkit/WebCore/rendering/RenderWidget.cpp
@@ -27,6 +27,7 @@
#include "AnimationController.h"
#include "GraphicsContext.h"
#include "HitTestResult.h"
+#include "RenderCounter.h"
#include "RenderView.h"
#include "RenderWidgetProtector.h"
@@ -114,6 +115,9 @@ void RenderWidget::destroy()
if (RenderView* v = view())
v->removeWidget(this);
+ if (m_hasCounterNodeMap)
+ RenderCounter::destroyCounterNodes(this);
+
if (AXObjectCache::accessibilityEnabled()) {
document()->axObjectCache()->childrenChanged(this->parent());
document()->axObjectCache()->remove(this);
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp
index 41bbba4e48..974bf2a70b 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGElement.cpp
@@ -304,6 +304,15 @@ void SVGElement::attributeChanged(Attribute* attr, bool preserveDecls)
return;
StyledElement::attributeChanged(attr, preserveDecls);
+
+ // When an animated SVG property changes through SVG DOM, svgAttributeChanged() is called, not attributeChanged().
+ // Next time someone tries to access the XML attributes, the synchronization code starts. During that synchronization
+ // SVGAnimatedPropertySynchronizer may call NamedNodeMap::removeAttribute(), which in turn calls attributeChanged().
+ // At this point we're not allowed to call svgAttributeChanged() again - it may lead to extra work being done, or crashes
+ // see bug https://bugs.webkit.org/show_bug.cgi?id=40994.
+ if (m_synchronizingSVGAttributes)
+ return;
+
svgAttributeChanged(attr->name());
}
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.cpp
index 25b3aea61d..de646c6987 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGFontFaceElement.cpp
@@ -59,7 +59,6 @@ SVGFontFaceElement::SVGFontFaceElement(const QualifiedName& tagName, Document* d
SVGFontFaceElement::~SVGFontFaceElement()
{
- removeFromMappedElementSheet();
}
static int cssPropertyIdForSVGAttributeName(const QualifiedName& attrName)
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.cpp
index d28e2a4363..e7b538923b 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGForeignObjectElement.cpp
@@ -125,6 +125,10 @@ RenderObject* SVGForeignObjectElement::createRenderer(RenderArena* arena, Render
bool SVGForeignObjectElement::childShouldCreateRenderer(Node* child) const
{
+ // Disallow arbitary SVG content. Only allow proper <svg xmlns="svgNS"> subdocuments.
+ if (child->isSVGElement())
+ return child->hasTagName(SVGNames::svgTag);
+
// Skip over SVG rules which disallow non-SVG kids
return StyledElement::childShouldCreateRenderer(child);
}
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp
index 4c060084f5..523771580c 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGSVGElement.cpp
@@ -538,6 +538,10 @@ bool SVGSVGElement::isOutermostSVG() const
if (!parentNode())
return true;
+ // We act like an outermost SVG element, if we're a direct child of a <foreignObject> element.
+ if (parentNode()->hasTagName(SVGNames::foreignObjectTag))
+ return true;
+
// This is true whenever this is the outermost SVG, even if there are HTML elements outside it
return !parentNode()->isSVGElement();
}
diff --git a/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp b/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp
index 45bab6a75f..57d56e184a 100644
--- a/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp
+++ b/src/3rdparty/webkit/WebCore/svg/SVGUseElement.cpp
@@ -572,8 +572,8 @@ void SVGUseElement::attach()
void SVGUseElement::detach()
{
- SVGStyledTransformableElement::detach();
m_targetElementInstance = 0;
+ SVGStyledTransformableElement::detach();
}
static bool isDirectReference(Node* n)
diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
index cc7b11cf9f..4fe784f69e 100644
--- a/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebframe.cpp
@@ -959,6 +959,10 @@ void QWebFrame::load(const QNetworkRequest &req,
The \a html is loaded immediately; external objects are loaded asynchronously.
+ If a script in the \a html runs longer than the default script timeout (currently 10 seconds),
+ for example due to being blocked by a modal JavaScript alert dialog, this method will return
+ as soon as possible after the timeout and any subsequent \a html will be loaded asynchronously.
+
When using this method WebKit assumes that external resources such as JavaScript programs or style
sheets are encoded in UTF-8 unless otherwise specified. For example, the encoding of an external
script can be specified through the charset attribute of the HTML script tag. It is also possible
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index 63d5568907..b2bff0cc80 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,83 @@
+2009-10-30 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Use the default timeout interval for JS as the HTML tokenizer delay for setHtml()
+
+ This ensures that long-running JavaScript (for example due to a modal alert() dialog),
+ will not trigger a deferred load after only 500ms (the default tokenizer delay) while
+ still giving a reasonable timeout (10 seconds) to prevent deadlock.
+
+ https://bugs.webkit.org/show_bug.cgi?id=29381
+
+ * Api/qwebframe.cpp: Document the behaviour
+ * WebCoreSupport/FrameLoaderClientQt.cpp: set the custom tokenizer delay for substitute loads
+ * tests/qwebframe/tst_qwebframe.cpp: Add test
+
+2010-07-07 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ Reviewed by Darin Adler.
+
+ Prevent assertion/duplicate loads for non-deferred subtitute-data loads
+
+ https://bugs.webkit.org/show_bug.cgi?id=30879
+
+ MainResourceLoader uses the member m_initialRequest to store requests for future
+ deferred loads. When doing the actual load in handleDataLoadNow(), we therefore
+ have to clear this request so that subsequent entries into the loader will not
+ start yet another load.
+
+ This can happen as a result of a PageGroupLoadDeferrer going out of scope when
+ returning from Chrome::runJavaScriptAlert(), which calls setDeferredLoading(false),
+ but only in the case of using both substitute-data and non-deferred main resource
+ load together. That's why two new DRT functions were added:
+
+ * queueLoadHTMLString()
+ * setDeferMainResourceLoad()
+
+ The change adds DRT hooks for Mac, Win and Qt for these two functions. For Mac
+ and Win the hook uses new SPI in WebDataSource. For Qt a new static member was
+ added to the FrameLoaderClientQt and accessed though DumpRenderTreeSupportQt.
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::setDeferMainResourceDataLoad):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createDocumentLoader):
+ * WebCoreSupport/FrameLoaderClientQt.h:
+
+2010-07-23 David Boddie <dboddie@trolltech.com>
+
+ Reviewed by Simon Hausmann.
+
+ Doc: Fixed incorrect QML property type.
+
+ * declarative/qdeclarativewebview.cpp:
+
+2010-07-23 Simon Hausmann <simon.hausmann@nokia.com>
+
+ [Qt] Build fix for Qt apps
+
+ Add webkit to QT_CONFIG. qconfig.pri will read qt_webkit_version.pri and
+ that's how it will pick up webkit in QT_CONFIG.
+
+ * qt_webkit_version.pri:
+
+2010-07-09 Kent Hansen <kent.hansen@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Skip test that never terminates on maemo5
+
+ Due to https://bugs.webkit.org/show_bug.cgi?id=38538
+ the tst_QWebPage::infiniteLoopJS() autotest never terminates.
+ Skip the test so that the test case may run to completion.
+
+ Patch by Dominik Holland <dominik.holland@nokia.com>
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::infiniteLoopJS):
+
2010-07-09 Simon Hausmann <simon.hausmann@nokia.com>
Unreviewed trivial Symbian build fix.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 686bfccb60..713fa3972d 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -38,6 +38,7 @@
#include "FrameTree.h"
#include "FrameView.h"
#include "DocumentLoader.h"
+#include "JSDOMWindowBase.h"
#include "MIMETypeRegistry.h"
#include "ResourceResponse.h"
#include "Page.h"
@@ -141,6 +142,8 @@ static QString drtDescriptionSuitableForTestResult(const WebCore::ResourceRespon
namespace WebCore
{
+bool FrameLoaderClientQt::deferMainResourceDataLoad = true;
+
FrameLoaderClientQt::FrameLoaderClientQt()
: m_frame(0)
, m_webFrame(0)
@@ -812,8 +815,15 @@ bool FrameLoaderClientQt::shouldFallBack(const WebCore::ResourceError&)
WTF::PassRefPtr<WebCore::DocumentLoader> FrameLoaderClientQt::createDocumentLoader(const WebCore::ResourceRequest& request, const SubstituteData& substituteData)
{
RefPtr<DocumentLoader> loader = DocumentLoader::create(request, substituteData);
- if (substituteData.isValid())
+ if (!deferMainResourceDataLoad || substituteData.isValid()) {
loader->setDeferMainResourceDataLoad(false);
+ // Use the default timeout interval for JS as the HTML tokenizer delay. This ensures
+ // that long-running JavaScript will still allow setHtml() to be synchronous, while
+ // still giving a reasonable timeout to prevent deadlock.
+ double delay = JSDOMWindowBase::commonJSGlobalData()->timeoutChecker.timeoutInterval() / 1000.0f;
+ m_frame->page()->setCustomHTMLTokenizerTimeDelay(delay);
+ } else
+ m_frame->page()->setCustomHTMLTokenizerTimeDelay(-1);
return loader.release();
}
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index adeb31c8ba..515cf9a00c 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -211,6 +211,8 @@ namespace WebCore {
QString chooseFile(const QString& oldFile);
+ static bool deferMainResourceDataLoad;
+
private:
Frame *m_frame;
QWebFrame *m_webFrame;
diff --git a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
index 0342c9f1ab..9dcba6091c 100644
--- a/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/declarative/qdeclarativewebview.cpp
@@ -612,7 +612,7 @@ QAction* QDeclarativeWebView::stopAction() const
#endif // QT_NO_ACTION
/*!
- \qmlproperty real WebView::title
+ \qmlproperty string WebView::title
This property holds the title of the web page currently viewed
By default, this property contains an empty string.
diff --git a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
index ffd192c315..d8cf06c121 100644
--- a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
+++ b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri
@@ -2,3 +2,4 @@ QT_WEBKIT_VERSION = 4.7.0
QT_WEBKIT_MAJOR_VERSION = 4
QT_WEBKIT_MINOR_VERSION = 7
QT_WEBKIT_PATCH_VERSION = 0
+QT_CONFIG *= webkit
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
index 76fdba336c..e584f97f6f 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebframe/tst_qwebframe.cpp
@@ -598,6 +598,7 @@ private slots:
void setHtml();
void setHtmlWithResource();
void setHtmlWithBaseURL();
+ void setHtmlWithJSAlert();
void ipv6HostEncoding();
void metaData();
#if !defined(Q_WS_MAEMO_5)
@@ -2485,6 +2486,33 @@ void tst_QWebFrame::setHtmlWithBaseURL()
QCOMPARE(m_view->page()->history()->count(), 0);
}
+class MyPage : public QWebPage
+{
+public:
+ MyPage() : QWebPage(), alerts(0) {}
+ int alerts;
+
+protected:
+ virtual void javaScriptAlert(QWebFrame*, const QString& msg)
+ {
+ alerts++;
+ QCOMPARE(msg, QString("foo"));
+ // Should not be enough to trigger deferred loading, since we've upped the HTML
+ // tokenizer delay in the Qt frameloader. See HTMLTokenizer::continueProcessing()
+ QTest::qWait(1000);
+ }
+};
+
+void tst_QWebFrame::setHtmlWithJSAlert()
+{
+ QString html("<html><head></head><body><script>alert('foo');</script><p>hello world</p></body></html>");
+ MyPage page;
+ m_view->setPage(&page);
+ page.mainFrame()->setHtml(html);
+ QCOMPARE(page.alerts, 1);
+ QCOMPARE(m_view->page()->mainFrame()->toHtml(), html);
+}
+
class TestNetworkManager : public QNetworkAccessManager
{
public:
diff --git a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 0f2ca22aae..b7ffb8a60c 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -219,6 +219,9 @@ public slots:
void tst_QWebPage::infiniteLoopJS()
{
+#ifdef Q_WS_MAEMO_5
+ QSKIP("Test never terminates on Maemo 5 : https://bugs.webkit.org/show_bug.cgi?id=38538", SkipAll);
+#endif
JSTestPage* newPage = new JSTestPage(m_view);
m_view->setPage(newPage);
m_view->setHtml(QString("<html><bodytest</body></html>"), QUrl());
diff --git a/src/corelib/concurrent/qtconcurrentexception.cpp b/src/corelib/concurrent/qtconcurrentexception.cpp
index e7f4674ce6..fad04a692a 100644
--- a/src/corelib/concurrent/qtconcurrentexception.cpp
+++ b/src/corelib/concurrent/qtconcurrentexception.cpp
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
the Qt Concurrent functions will throw a QtConcurrent::UnhandledException
in the receiver thread.
- When using QFuture, transferred exceptions willl be thrown when calling the following functions:
+ When using QFuture, transferred exceptions will be thrown when calling the following functions:
\list
\o QFuture::waitForFinished()
\o QFuture::result()
diff --git a/src/corelib/concurrent/qtconcurrentmap.cpp b/src/corelib/concurrent/qtconcurrentmap.cpp
index 39a13fb663..e74d69c5e4 100644
--- a/src/corelib/concurrent/qtconcurrentmap.cpp
+++ b/src/corelib/concurrent/qtconcurrentmap.cpp
@@ -70,7 +70,7 @@
\value UnorderedReduce Reduction is done in an arbitrary order.
\value OrderedReduce Reduction is done in the order of the
original sequence.
- \value SequentialReduce Reduction is done sequentally: only one
+ \value SequentialReduce Reduction is done sequentially: only one
thread will enter the reduce function at a time. (Parallel reduction
might be supported in a future version of Qt Concurrent.)
*/
diff --git a/src/corelib/corelib.pro b/src/corelib/corelib.pro
index 00cb83686e..10666b48ae 100644
--- a/src/corelib/corelib.pro
+++ b/src/corelib/corelib.pro
@@ -66,6 +66,21 @@ sse {
sse2 {
DEFINES += QT_HAVE_SSE2
}
+sse3 {
+ DEFINES += QT_HAVE_SSE3
+}
+ssse3 {
+ DEFINES += QT_HAVE_SSSE3
+}
+sse4_1 {
+ DEFINES += QT_HAVE_SSE4_1
+}
+sse4_2 {
+ DEFINES += QT_HAVE_SSE4_2
+}
+avx {
+ DEFINES += QT_HAVE_AVX
+}
iwmmxt {
DEFINES += QT_HAVE_IWMMXT
}
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 7aee29b515..d07ae4a733 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -2383,7 +2383,7 @@ void qDebug(const char *msg, ...)
This syntax inserts a space between each item, and
appends a newline at the end.
- To supress the output at runtime, install your own message handler
+ To suppress the output at runtime, install your own message handler
with qInstallMsgHandler().
\sa qDebug(), qCritical(), qFatal(), qInstallMsgHandler(),
@@ -2419,7 +2419,7 @@ void qWarning(const char *msg, ...)
A space is inserted between the items, and a newline is
appended at the end.
- To supress the output at runtime, install your own message handler
+ To suppress the output at runtime, install your own message handler
with qInstallMsgHandler().
\sa qDebug(), qWarning(), qFatal(), qInstallMsgHandler(),
@@ -2484,7 +2484,7 @@ void qErrnoWarning(int code, const char *msg, ...)
Example:
\snippet doc/src/snippets/code/src_corelib_global_qglobal.cpp 30
- To supress the output at runtime, install your own message handler
+ To suppress the output at runtime, install your own message handler
with qInstallMsgHandler().
\sa qDebug(), qCritical(), qWarning(), qInstallMsgHandler(),
@@ -2615,55 +2615,6 @@ void qsrand(uint seed)
#endif
}
-/*! \internal
- \relates <QtGlobal>
- \since 4.6
-
- Seed the PRNG, but only if it has not already been seeded.
-
- The default seed is a combination of current time, a stack address and a
- serial counter (since thread stack addresses are re-used).
-*/
-void qsrand()
-{
-#if (defined(Q_OS_UNIX) || defined(Q_OS_WIN)) && !defined(QT_NO_THREAD)
- SeedStorage *seedStorage = randTLS();
- if (seedStorage) {
- SeedStorageType *pseed = seedStorage->localData();
- if (pseed) {
- // already seeded
- return;
- }
- seedStorage->setLocalData(pseed = new SeedStorageType);
- // start beyond 1 to avoid the sequence reset
- static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(2);
- *pseed = QDateTime::currentDateTime().toTime_t()
- + quintptr(&pseed)
- + serial.fetchAndAddRelaxed(1);
-#if defined(Q_OS_WIN) || defined(Q_OS_SYMBIAN)
- // for Windows and Symbian the srand function must still be called.
- srand(*pseed);
-#endif
- }
-
-//QT_NO_THREAD implementations
-#else
- static unsigned int seed = 0;
-
- if (seed)
- return;
-
-#if defined(Q_OS_SYMBIAN)
- seed = Math::Random();
-#elif defined(Q_OS_WIN)
- seed = GetTickCount();
-#else
- seed = quintptr(&seed) + QDateTime::currentDateTime().toTime_t();
-#endif
- srand(seed);
-#endif // defined(Q_OS_UNIX) || defined(Q_OS_WIN)) && !defined(QT_NO_THREAD)
-}
-
/*!
\relates <QtGlobal>
\since 4.2
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 59b2a349ef..f4ecc7372b 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1279,6 +1279,11 @@ class QDataStream;
# else
# define Q_COMPAT_EXPORT Q_DECL_IMPORT
# endif
+# if defined(QT_BUILD_DBUS_LIB)
+# define Q_DBUS_EXPORT Q_DECL_EXPORT
+# else
+# define Q_DBUS_EXPORT Q_DECL_IMPORT
+# endif
# define Q_TEMPLATEDLL
# elif defined(QT_DLL) /* use a Qt DLL library */
# define Q_CORE_EXPORT Q_DECL_IMPORT
@@ -1296,6 +1301,7 @@ class QDataStream;
# define Q_SCRIPT_EXPORT Q_DECL_IMPORT
# define Q_SCRIPTTOOLS_EXPORT Q_DECL_IMPORT
# define Q_COMPAT_EXPORT Q_DECL_IMPORT
+# define Q_DBUS_EXPORT Q_DECL_IMPORT
# define Q_TEMPLATEDLL
# endif
# define Q_NO_DECLARED_NOT_DEFINED
@@ -1324,6 +1330,7 @@ class QDataStream;
# define Q_SCRIPT_EXPORT Q_DECL_EXPORT
# define Q_SCRIPTTOOLS_EXPORT Q_DECL_EXPORT
# define Q_COMPAT_EXPORT Q_DECL_EXPORT
+# define Q_DBUS_EXPORT Q_DECL_EXPORT
# else
# define Q_CORE_EXPORT
# define Q_GUI_EXPORT
@@ -1338,6 +1345,7 @@ class QDataStream;
# define Q_SCRIPT_EXPORT
# define Q_SCRIPTTOOLS_EXPORT
# define Q_COMPAT_EXPORT
+# define Q_DBUS_EXPORT
# endif
#endif
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index 6edadc5b3c..aba3c32742 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -90,6 +90,9 @@ Qt {
Q_ENUMS(InputMethodHint)
Q_FLAGS(WindowFlags WindowStates InputMethodHints)
Q_ENUMS(ConnectionType)
+#ifndef QT_NO_GESTURES
+ Q_ENUMS(GestureState)
+#endif
#endif // (defined(Q_MOC_RUN) || defined(QT_JAMBI_RUN))
#if defined(Q_MOC_RUN)
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index ed2ae6ef13..5cd7f0e35d 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -470,6 +470,7 @@
\value TextIncludeTrailingSpaces Same as IncludeTrailingSpaces
\value TextJustificationForced Ensures that text lines are justified.
+ \omitvalue TextBypassShaping
\omitvalue BreakAnywhere
\omitvalue DontClip
\omitvalue DontPrint
@@ -1730,7 +1731,7 @@
\value Key_MediaLast
\value Key_unknown
- \value Key_Call A key to answer or initiate a call (see \l Key_ToggleCallHangup for a key to toggle current call state)
+ \value Key_Call A key to answer or initiate a call (see Qt::Key_ToggleCallHangup for a key to toggle current call state)
\value Key_Camera A key to activate the camera shutter
\value Key_CameraFocus A key to focus the camera
\value Key_Context1
@@ -1738,7 +1739,7 @@
\value Key_Context3
\value Key_Context4
\value Key_Flip
- \value Key_Hangup A key to end an ongoing call (see \l Key_ToggleCallHangup for a key to toggle current call state)
+ \value Key_Hangup A key to end an ongoing call (see Qt::Key_ToggleCallHangup for a key to toggle current call state)
\value Key_No
\value Key_Select
\value Key_Yes
diff --git a/src/corelib/io/qabstractfileengine.cpp b/src/corelib/io/qabstractfileengine.cpp
index e239ee99f3..d6b6f1136b 100644
--- a/src/corelib/io/qabstractfileengine.cpp
+++ b/src/corelib/io/qabstractfileengine.cpp
@@ -818,7 +818,7 @@ bool QAbstractFileEngine::unmap(uchar *address)
You can call dirName() to get the directory name, nameFilters() to get a
stringlist of name filters, and filters() to get the entry filters.
- The pure virual function hasNext() returns true if the current directory
+ The pure virtual function hasNext() returns true if the current directory
has at least one more entry (i.e., the directory name is valid and
accessible, and we have not reached the end of the entry list), and false
otherwise. Reimplement next() to seek to the next entry.
@@ -828,7 +828,7 @@ bool QAbstractFileEngine::unmap(uchar *address)
function is provided for convenience; it returns the full path of the
current entry.
- Here is an example of how to implement an interator that returns each of
+ Here is an example of how to implement an iterator that returns each of
three fixed entries in sequence.
\snippet doc/src/snippets/code/src_corelib_io_qabstractfileengine.cpp 3
@@ -959,7 +959,7 @@ QString QAbstractFileEngineIterator::currentFilePath() const
/*!
The virtual function returns a QFileInfo for the current directory
entry. This function is provided for convenience. It can also be slightly
- faster that creating a QFileInfo object yourself, as the object returned
+ faster than creating a QFileInfo object yourself, as the object returned
by this function might contain cached information that QFileInfo otherwise
would have to access through the file engine.
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 9464a9765c..d83f7eec45 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -1023,7 +1023,7 @@ QString QFSFileEngine::fileName(FileName file) const
#if !defined(QWS) && defined(Q_OS_MAC)
QCFType<CFURLRef> url = CFURLCreateWithFileSystemPath(0, QCFString(d->filePath),
kCFURLPOSIXPathStyle, true);
- if (CFDictionaryRef dict = CFBundleCopyInfoDictionaryForURL(url)) {
+ if (QCFType<CFDictionaryRef> dict = CFBundleCopyInfoDictionaryForURL(url)) {
if (CFTypeRef name = (CFTypeRef)CFDictionaryGetValue(dict, kCFBundleNameKey)) {
if (CFGetTypeID(name) == CFStringGetTypeID())
return QCFString::toQString((CFStringRef)name);
@@ -1141,7 +1141,7 @@ QString QFSFileEngine::fileName(FileName file) const
if (FSResolveAliasFile(&fref, true, &isFolder, &isAlias) == noErr && isAlias) {
AliasHandle alias;
if (FSNewAlias(0, &fref, &alias) == noErr && alias) {
- CFStringRef cfstr;
+ QCFString cfstr;
if (FSCopyAliasInfo(alias, 0, 0, &cfstr, 0, 0) == noErr)
return QCFString::toQString(cfstr);
}
diff --git a/src/corelib/io/qiodevice_p.h b/src/corelib/io/qiodevice_p.h
index 4a25562605..1dd51ea8b2 100644
--- a/src/corelib/io/qiodevice_p.h
+++ b/src/corelib/io/qiodevice_p.h
@@ -155,10 +155,10 @@ public:
if ((first - buf) < size) {
// underflow, the existing valid data needs to move to the end of the (potentially bigger) buffer
makeSpace(len + size, freeSpaceAtStart);
- memcpy(first - size, block, size);
}
first -= size;
len += size;
+ memcpy(first, block, size);
}
private:
diff --git a/src/corelib/io/qprocess.cpp b/src/corelib/io/qprocess.cpp
index 9bc406362f..739ac4dbd4 100644
--- a/src/corelib/io/qprocess.cpp
+++ b/src/corelib/io/qprocess.cpp
@@ -1399,10 +1399,10 @@ QString QProcess::nativeArguments() const
\since 4.7
\overload
- Sets additional native command line arguments for the program.
+ Sets additional native command line \a arguments for the program.
On operating systems where the system API for passing command line
- arguments to a subprocess natively uses a single string, one can
+ \a arguments to a subprocess natively uses a single string, one can
conceive command lines which cannot be passed via QProcess's portable
list-based API. In such cases this function must be used to set a
string which is \e appended to the string composed from the usual
diff --git a/src/corelib/io/qtextstream.cpp b/src/corelib/io/qtextstream.cpp
index b1c403fb5c..eab06622f6 100644
--- a/src/corelib/io/qtextstream.cpp
+++ b/src/corelib/io/qtextstream.cpp
@@ -1991,7 +1991,7 @@ bool QTextStreamPrivate::getReal(double *f)
return true;
buf[i] = '\0';
- // backward-compatibility. Old implmentation supported +nan/-nan
+ // backward-compatibility. Old implementation supported +nan/-nan
// for some reason. QLocale only checks for lower-case
// nan/+inf/-inf, so here we also check for uppercase and mixed
// case versions.
diff --git a/src/corelib/kernel/qabstractitemmodel.cpp b/src/corelib/kernel/qabstractitemmodel.cpp
index 84152591da..e3fce1809e 100644
--- a/src/corelib/kernel/qabstractitemmodel.cpp
+++ b/src/corelib/kernel/qabstractitemmodel.cpp
@@ -1197,7 +1197,7 @@ void QAbstractItemModelPrivate::columnsRemoved(const QModelIndex &parent,
\l{QAbstractItemModel::}{endInsertRows()} must be called.
\sa {Model Classes}, {Model Subclassing Reference}, QModelIndex,
- QAbstractItemView, {Using Drag and Drop with Item Views},
+ QAbstractItemView, {Using drag & drop with item views},
{Simple DOM Model Example}, {Simple Tree Model Example},
{Editable Tree Model Example}, {Fetch More Example}
*/
@@ -1761,7 +1761,7 @@ QMimeData *QAbstractItemModel::mimeData(const QModelIndexList &indexes) const
where to place the data. This can occur in a tree when data is dropped on
a parent. Models will usually append the data to the parent in this case.
- \sa supportedDropActions(), {Using Drag and Drop with Item Views}
+ \sa supportedDropActions(), {Using drag & drop with item views}
*/
bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction action,
int row, int column, const QModelIndex &parent)
@@ -1798,8 +1798,8 @@ bool QAbstractItemModel::dropMimeData(const QMimeData *data, Qt::DropAction acti
reimplement the dropMimeData() function to handle the additional
operations.
- \sa dropMimeData(), Qt::DropActions, {Using Drag and Drop with Item
- Views}
+ \sa dropMimeData(), Qt::DropActions, {Using drag & drop with item
+ views}
*/
Qt::DropActions QAbstractItemModel::supportedDropActions() const
{
@@ -1815,7 +1815,7 @@ Qt::DropActions QAbstractItemModel::supportedDropActions() const
supportedDragActions() is used by QAbstractItemView::startDrag() as the
default values when a drag occurs.
- \sa Qt::DropActions, {Using Drag and Drop with Item Views}
+ \sa Qt::DropActions, {Using drag & drop with item views}
*/
Qt::DropActions QAbstractItemModel::supportedDragActions() const
{
@@ -1831,7 +1831,7 @@ Qt::DropActions QAbstractItemModel::supportedDragActions() const
Sets the supported drag \a actions for the items in the model.
- \sa supportedDragActions(), {Using Drag and Drop with Item Views}
+ \sa supportedDragActions(), {Using drag & drop with item views}
*/
void QAbstractItemModel::setSupportedDragActions(Qt::DropActions actions)
{
@@ -2547,7 +2547,7 @@ bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int star
For example, as shown in the diagram, we move three rows from
row 2 to 4 in the source, so \a sourceFirst is 2 and \a sourceLast is 4.
- We move those items to above row 2 in the destination, so \a destinationRow is 2.
+ We move those items to above row 2 in the destination, so \a destinationChild is 2.
\snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 6
@@ -2558,7 +2558,7 @@ bool QAbstractItemModelPrivate::allowMove(const QModelIndex &srcParent, int star
\o To append rows to another parent, move them to after the last row.
For example, as shown in the diagram, we move three rows to a
- collection of 6 existing rows (ending in row 5), so \a destinationStart is 6:
+ collection of 6 existing rows (ending in row 5), so \a destinationChild is 6:
\snippet doc/src/snippets/code/src_corelib_kernel_qabstractitemmodel.cpp 7
diff --git a/src/corelib/kernel/qeventdispatcher_glib.cpp b/src/corelib/kernel/qeventdispatcher_glib.cpp
index 9c1c827c43..8390275bb7 100644
--- a/src/corelib/kernel/qeventdispatcher_glib.cpp
+++ b/src/corelib/kernel/qeventdispatcher_glib.cpp
@@ -504,7 +504,7 @@ void QEventDispatcherGlib::registerTimer(int timerId, int interval, QObject *obj
{
#ifndef QT_NO_DEBUG
if (timerId < 1 || interval < 0 || !object) {
- qWarning("QEventDispatcherUNIX::registerTimer: invalid arguments");
+ qWarning("QEventDispatcherGlib::registerTimer: invalid arguments");
return;
} else if (object->thread() != thread() || thread() != QThread::currentThread()) {
qWarning("QObject::startTimer: timers cannot be started from another thread");
@@ -520,7 +520,7 @@ bool QEventDispatcherGlib::unregisterTimer(int timerId)
{
#ifndef QT_NO_DEBUG
if (timerId < 1) {
- qWarning("QEventDispatcherUNIX::unregisterTimer: invalid argument");
+ qWarning("QEventDispatcherGlib::unregisterTimer: invalid argument");
return false;
} else if (thread() != QThread::currentThread()) {
qWarning("QObject::killTimer: timers cannot be stopped from another thread");
@@ -536,7 +536,7 @@ bool QEventDispatcherGlib::unregisterTimers(QObject *object)
{
#ifndef QT_NO_DEBUG
if (!object) {
- qWarning("QEventDispatcherUNIX::unregisterTimers: invalid argument");
+ qWarning("QEventDispatcherGlib::unregisterTimers: invalid argument");
return false;
} else if (object->thread() != thread() || thread() != QThread::currentThread()) {
qWarning("QObject::killTimers: timers cannot be stopped from another thread");
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 2a52044d8e..1bad8ed961 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -423,7 +423,7 @@ void QSelectThread::run()
// ones that return -1 in select
// after loop update notifiers for all of them
- // as we dont have "exception" notifier type
+ // as we don't have "exception" notifier type
// we should force monitoring fd_set of this
// type as well
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index 6ebaaa36dc..fef02cfe41 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -1415,7 +1415,7 @@ 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
+ This function is useful to register typedefs so they can be used
by QMetaProperty, or in QueuedConnections
\snippet doc/src/snippets/code/src_corelib_kernel_qmetatype.cpp 9
diff --git a/src/corelib/plugin/quuid.cpp b/src/corelib/plugin/quuid.cpp
index 9332bbcf7c..6c1b6e71bc 100644
--- a/src/corelib/plugin/quuid.cpp
+++ b/src/corelib/plugin/quuid.cpp
@@ -578,11 +578,10 @@ QUuid QUuid::createUuid()
QT_BEGIN_INCLUDE_NAMESPACE
#include "qdatetime.h"
#include "qfile.h"
-#include "stdlib.h" // For srand/rand
+#include "qthreadstorage.h"
+#include <stdlib.h> // for RAND_MAX
QT_END_INCLUDE_NAMESPACE
-extern void qsrand(); // in qglobal.cpp
-
QUuid QUuid::createUuid()
{
QUuid result;
@@ -600,12 +599,32 @@ QUuid QUuid::createUuid()
static const int intbits = sizeof(int)*8;
static int randbits = 0;
if (!randbits) {
+ int r = 0;
int max = RAND_MAX;
- do { ++randbits; } while ((max=max>>1));
+ do { ++r; } while ((max=max>>1));
+ randbits = r;
}
- // reseed, but only if not already seeded
- qsrand();
+ // Seed the PRNG once per thread with a combination of current time, a
+ // stack address and a serial counter (since thread stack addresses are
+ // re-used).
+#ifndef QT_BOOTSTRAPPED
+ static QThreadStorage<int *> uuidseed;
+ if (!uuidseed.hasLocalData())
+ {
+ int *pseed = new int;
+ static QBasicAtomicInt serial = Q_BASIC_ATOMIC_INITIALIZER(2);
+ qsrand(*pseed = QDateTime::currentDateTime().toTime_t()
+ + quintptr(&pseed)
+ + serial.fetchAndAddRelaxed(1));
+ uuidseed.setLocalData(pseed);
+ }
+#else
+ static bool seeded = false;
+ if (!seeded)
+ qsrand(QDateTime::currentDateTime().toTime_t()
+ + quintptr(&seeded));
+#endif
int chunks = 16 / sizeof(uint);
while (chunks--) {
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index b46af1f483..8d38e4c855 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -1809,7 +1809,7 @@ QByteArray &QByteArray::replace(int pos, int len, const QByteArray &after)
Replaces \a len bytes from index position \a pos with the zero terminated
string \a after.
- Notice: this can change the lenght of the byte array.
+ Notice: this can change the length of the byte array.
*/
QByteArray &QByteArray::replace(int pos, int len, const char *after)
{
@@ -2152,18 +2152,18 @@ QByteArray QByteArray::repeated(int times) const
if (result.d->alloc != resultSize)
return QByteArray(); // not enough memory
- qMemCopy(result.d->data, d->data, d->size);
+ memcpy(result.d->data, d->data, d->size);
int sizeSoFar = d->size;
char *end = result.d->data + sizeSoFar;
const int halfResultSize = resultSize >> 1;
while (sizeSoFar <= halfResultSize) {
- qMemCopy(end, result.d->data, sizeSoFar);
+ memcpy(end, result.d->data, sizeSoFar);
end += sizeSoFar;
sizeSoFar <<= 1;
}
- qMemCopy(end, result.d->data, resultSize - sizeSoFar);
+ memcpy(end, result.d->data, resultSize - sizeSoFar);
result.d->data[resultSize] = '\0';
result.d->size = resultSize;
return result;
diff --git a/src/corelib/tools/qbytearraymatcher.cpp b/src/corelib/tools/qbytearraymatcher.cpp
index d5a59c94a8..f8504f0cbf 100644
--- a/src/corelib/tools/qbytearraymatcher.cpp
+++ b/src/corelib/tools/qbytearraymatcher.cpp
@@ -171,7 +171,7 @@ QByteArrayMatcher::~QByteArrayMatcher()
QByteArrayMatcher &QByteArrayMatcher::operator=(const QByteArrayMatcher &other)
{
q_pattern = other.q_pattern;
- qMemCopy(&p, &other.p, sizeof(p));
+ memcpy(&p, &other.p, sizeof(p));
return *this;
}
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index a51ee81023..6b1de5ef0e 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -2096,6 +2096,7 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l)
\value Serbia
\value SaintBarthelemy
\value SaintMartin
+ \value LatinAmericaAndTheCaribbean
\omitvalue LastCountry
\sa country()
diff --git a/src/corelib/tools/qsharedpointer.cpp b/src/corelib/tools/qsharedpointer.cpp
index 1b4b356a8a..f1025987d8 100644
--- a/src/corelib/tools/qsharedpointer.cpp
+++ b/src/corelib/tools/qsharedpointer.cpp
@@ -482,7 +482,7 @@
becomes managed by this QSharedPointer and must not be passed to
another QSharedPointer object or deleted outside this object.
- The \a deleter paramter specifies the custom deleter for this
+ The \a deleter parameter specifies the custom deleter for this
object. The custom deleter is called when the strong reference
count drops to 0 instead of the operator delete(). This is useful,
for instance, for calling deleteLater() in a QObject instead:
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index 550ff58008..4cce33941b 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -324,12 +324,17 @@ namespace QtSharedPointer {
typedef ExternalRefCountData Data;
inline void ref() const { d->weakref.ref(); d->strongref.ref(); }
- inline bool deref()
+ inline void deref()
+ { deref(d, this->value); }
+ static inline void deref(Data *d, T *value)
{
+ if (!d) return;
if (!d->strongref.deref()) {
- internalDestroy();
+ if (!d->destroy())
+ delete value;
}
- return d->weakref.deref();
+ if (!d->weakref.deref())
+ delete d;
}
inline void internalConstruct(T *ptr)
@@ -378,7 +383,7 @@ namespace QtSharedPointer {
template <class X>
inline ExternalRefCount(const ExternalRefCount<X> &other) : Basic<T>(other.value), d(other.d)
{ if (d) ref(); }
- inline ~ExternalRefCount() { if (d && !deref()) delete d; }
+ inline ~ExternalRefCount() { deref(); }
template <class X>
inline void internalCopy(const ExternalRefCount<X> &other)
@@ -386,12 +391,6 @@ namespace QtSharedPointer {
internalSet(other.d, other.data());
}
- inline void internalDestroy()
- {
- if (!d->destroy())
- delete this->value;
- }
-
inline void internalSwap(ExternalRefCount &other)
{
qSwap(d, other.d);
@@ -424,10 +423,14 @@ namespace QtSharedPointer {
else
o = 0;
}
- if (d && !deref())
- delete d;
- d = o;
- this->value = d && d->strongref ? actual : 0;
+
+ qSwap(d, o);
+ qSwap(this->value, actual);
+ if (!d || d->strongref == 0)
+ this->value = 0;
+
+ // dereference saved data
+ deref(o, actual);
}
Data *d;
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index 11357b3b71..fcc8dd7f67 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -46,6 +46,10 @@
#include <windows.h>
#endif
+#if defined(Q_OS_WIN64) && !defined(Q_CC_GNU)
+#include <intrin.h>
+#endif
+
QT_BEGIN_NAMESPACE
uint qDetectCPUFeatures()
@@ -96,6 +100,7 @@ uint qDetectCPUFeatures()
features = MMX|SSE|SSE2;
#elif defined(__i386__) || defined(_M_IX86)
unsigned int extended_result = 0;
+ unsigned int feature_result = 0;
uint result = 0;
/* see p. 118 of amd64 instruction set manual Vol3 */
#if defined(Q_CC_GNU)
@@ -117,7 +122,8 @@ uint qDetectCPUFeatures()
"1:\n"
"pop %%ebx\n"
"mov %%edx, %0\n"
- : "=r" (result)
+ "mov %%ecx, %1\n"
+ : "=r" (result), "=r" (feature_result)
:
: "%eax", "%ecx", "%edx"
);
@@ -169,6 +175,7 @@ uint qDetectCPUFeatures()
mov eax, 1
cpuid
mov result, edx
+ mov feature_result, ecx
skip:
pop edx
pop ecx
@@ -223,8 +230,65 @@ uint qDetectCPUFeatures()
features |= SSE;
if (result & (1u << 26))
features |= SSE2;
+ if (feature_result & (1u))
+ features |= SSE3;
+ if (feature_result & (1u << 9))
+ features |= SSSE3;
+ if (feature_result & (1u << 19))
+ features |= SSE4_1;
+ if (feature_result & (1u << 20))
+ features |= SSE4_2;
+ if (feature_result & (1u << 28))
+ features |= AVX;
+
#endif // i386
+#if defined(__x86_64__) || defined(Q_OS_WIN64)
+ uint feature_result = 0;
+
+#if defined(Q_CC_GNU)
+ asm ("push %%rbx\n"
+ "pushf\n"
+ "pop %%rax\n"
+ "mov %%eax, %%ebx\n"
+ "xor $0x00200000, %%eax\n"
+ "push %%rax\n"
+ "popf\n"
+ "pushf\n"
+ "pop %%rax\n"
+ "xor %%edx, %%edx\n"
+ "xor %%ebx, %%eax\n"
+ "jz 1f\n"
+
+ "mov $0x00000001, %%eax\n"
+ "cpuid\n"
+ "1:\n"
+ "pop %%rbx\n"
+ "mov %%ecx, %0\n"
+ : "=r" (feature_result)
+ :
+ : "%eax", "%ecx", "%edx"
+ );
+#elif defined (Q_OS_WIN64)
+ {
+ int info[4];
+ __cpuid(info, 1);
+ feature_result = info[2];
+ }
+#endif
+
+ if (feature_result & (1u))
+ features |= SSE3;
+ if (feature_result & (1u << 9))
+ features |= SSSE3;
+ if (feature_result & (1u << 19))
+ features |= SSE4_1;
+ if (feature_result & (1u << 20))
+ features |= SSE4_2;
+ if (feature_result & (1u << 28))
+ features |= AVX;
+#endif // x86_64
+
#if defined(QT_HAVE_MMX)
if (qgetenv("QT_NO_MMX").toInt())
features ^= MMX;
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 0ed9d5df14..5ff0f9778a 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -72,6 +72,27 @@ QT_BEGIN_HEADER
# include <emmintrin.h>
#endif
+// SSE3 intrinsics
+#if defined(QT_HAVE_SSE3) && (defined(__SSE3__) || defined(Q_CC_MSVC))
+#include <pmmintrin.h>
+#endif
+
+// SSSE3 intrinsics
+#if defined(QT_HAVE_SSSE3) && (defined(__SSSE3__) || defined(Q_CC_MSVC))
+#include <tmmintrin.h>
+#endif
+
+// SSE4.1 and SSE4.2 intrinsics
+#if (defined(QT_HAVE_SSE4_1) || defined(QT_HAVE_SSE4_2)) && (defined(__SSE4_1__) || defined(Q_CC_MSVC))
+#include <smmintrin.h>
+#endif
+
+// AVX intrinsics
+#if defined(QT_HAVE_AVX) && (defined(__AVX__) || defined(Q_CC_MSVC))
+#include <immintrin.h>
+#endif
+
+
#if !defined(QT_BOOTSTRAPPED) && (!defined(Q_CC_MSVC) || (defined(_M_X64) || _M_IX86_FP == 2))
#define QT_ALWAYS_HAVE_SSE2
#endif
@@ -119,7 +140,12 @@ enum CPUFeatures {
SSE2 = 0x20,
CMOV = 0x40,
IWMMXT = 0x80,
- NEON = 0x100
+ NEON = 0x100,
+ SSE3 = 0x200,
+ SSSE3 = 0x400,
+ SSE4_1 = 0x800,
+ SSE4_2 = 0x1000,
+ AVX = 0x2000
};
Q_CORE_EXPORT uint qDetectCPUFeatures();
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 57f79a0f2f..d6ab5da023 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -69,6 +69,10 @@
#include <winnls.h>
#endif
+#ifdef Q_OS_SYMBIAN
+#include <e32cmn.h>
+#endif
+
#include <limits.h>
#include <string.h>
#include <stdlib.h>
@@ -6156,18 +6160,18 @@ QString QString::repeated(int times) const
if (result.d->alloc != resultSize)
return QString(); // not enough memory
- qMemCopy(result.d->data, d->data, d->size * sizeof(ushort));
+ memcpy(result.d->data, d->data, d->size * sizeof(ushort));
int sizeSoFar = d->size;
ushort *end = result.d->data + sizeSoFar;
const int halfResultSize = resultSize >> 1;
while (sizeSoFar <= halfResultSize) {
- qMemCopy(end, result.d->data, sizeSoFar * sizeof(ushort));
+ memcpy(end, result.d->data, sizeSoFar * sizeof(ushort));
end += sizeSoFar;
sizeSoFar <<= 1;
}
- qMemCopy(end, result.d->data, (resultSize - sizeSoFar) * sizeof(ushort));
+ memcpy(end, result.d->data, (resultSize - sizeSoFar) * sizeof(ushort));
result.d->data[resultSize] = '\0';
result.d->size = resultSize;
return result;
@@ -6954,7 +6958,7 @@ bool QString::isRightToLeft() const
/*! \fn bool QString::isRightToLeft() const
- \internal
+ Returns true if the string is read right to left.
*/
diff --git a/src/corelib/tools/qstringmatcher.cpp b/src/corelib/tools/qstringmatcher.cpp
index ff136247ee..80a8457b70 100644
--- a/src/corelib/tools/qstringmatcher.cpp
+++ b/src/corelib/tools/qstringmatcher.cpp
@@ -208,7 +208,7 @@ QStringMatcher &QStringMatcher::operator=(const QStringMatcher &other)
if (this != &other) {
q_pattern = other.q_pattern;
q_cs = other.q_cs;
- qMemCopy(q_data, other.q_data, sizeof(q_data));
+ memcpy(q_data, other.q_data, sizeof(q_data));
}
return *this;
}
diff --git a/src/corelib/tools/qtextboundaryfinder.cpp b/src/corelib/tools/qtextboundaryfinder.cpp
index bcddcb2010..0428782ec7 100644
--- a/src/corelib/tools/qtextboundaryfinder.cpp
+++ b/src/corelib/tools/qtextboundaryfinder.cpp
@@ -244,7 +244,7 @@ QTextBoundaryFinder::QTextBoundaryFinder(BoundaryType type, const QString &strin
data required, it will use this instead of allocating its own buffer.
\warning QTextBoundaryFinder does not create a copy of \a chars. It is the
- application programmer's responsability to ensure the array is allocated for
+ application programmer's responsibility to ensure the array is allocated for
as long as the QTextBoundaryFinder object stays alive. The same applies to
\a buffer.
*/
diff --git a/src/dbus/dbus.pro b/src/dbus/dbus.pro
index 7c59808880..46a723a56c 100644
--- a/src/dbus/dbus.pro
+++ b/src/dbus/dbus.pro
@@ -3,7 +3,7 @@ QPRO_PWD = $$PWD
QT = core \
xml
CONFIG += link_pkgconfig
-DEFINES += QDBUS_MAKEDLL \
+DEFINES += QT_BUILD_DBUS_LIB \
DBUS_API_SUBJECT_TO_CHANGE
QMAKE_CXXFLAGS += $$QT_CFLAGS_DBUS
contains(QT_CONFIG, dbus-linked) {
diff --git a/src/dbus/qdbusabstractadaptor.h b/src/dbus/qdbusabstractadaptor.h
index fa64aef966..af5a3cec61 100644
--- a/src/dbus/qdbusabstractadaptor.h
+++ b/src/dbus/qdbusabstractadaptor.h
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
class QDBusAbstractAdaptorPrivate;
-class QDBUS_EXPORT QDBusAbstractAdaptor: public QObject
+class Q_DBUS_EXPORT QDBusAbstractAdaptor: public QObject
{
Q_OBJECT
protected:
diff --git a/src/dbus/qdbusabstractinterface.h b/src/dbus/qdbusabstractinterface.h
index 44f79a1ed9..177af6751c 100644
--- a/src/dbus/qdbusabstractinterface.h
+++ b/src/dbus/qdbusabstractinterface.h
@@ -64,7 +64,7 @@ class QDBusPendingCall;
class QDBusAbstractInterfacePrivate;
-class QDBUS_EXPORT QDBusAbstractInterfaceBase: public QObject
+class Q_DBUS_EXPORT QDBusAbstractInterfaceBase: public QObject
{
public:
int qt_metacall(QMetaObject::Call, int, void**);
@@ -74,7 +74,7 @@ private:
Q_DECLARE_PRIVATE(QDBusAbstractInterface)
};
-class QDBUS_EXPORT QDBusAbstractInterface:
+class Q_DBUS_EXPORT QDBusAbstractInterface:
#ifdef Q_QDOC
public QObject
#else
diff --git a/src/dbus/qdbusargument.h b/src/dbus/qdbusargument.h
index 73558b6beb..30f2cdabb8 100644
--- a/src/dbus/qdbusargument.h
+++ b/src/dbus/qdbusargument.h
@@ -64,7 +64,7 @@ QT_MODULE(DBus)
class QDBusArgumentPrivate;
class QDBusDemarshaller;
class QDBusMarshaller;
-class QDBUS_EXPORT QDBusArgument
+class Q_DBUS_EXPORT QDBusArgument
{
public:
enum ElementType {
@@ -184,43 +184,43 @@ template<> inline QVariant qdbus_cast<QVariant>(const QVariant &v, QVariant *)
return qdbus_cast<QDBusVariant>(v).variant();
}
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QVariant &v);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QVariant &v);
// QVariant types
#ifndef QDBUS_NO_SPECIALTYPES
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QDate &date);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QDate &date);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QDate &date);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QDate &date);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QTime &time);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QTime &time);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QTime &time);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QTime &time);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QDateTime &dt);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QDateTime &dt);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QDateTime &dt);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QDateTime &dt);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QRect &rect);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QRect &rect);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QRect &rect);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QRect &rect);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QRectF &rect);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QRectF &rect);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QRectF &rect);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QRectF &rect);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QSize &size);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QSize &size);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QSize &size);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QSize &size);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QSizeF &size);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QSizeF &size);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QSizeF &size);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QSizeF &size);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QPoint &pt);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QPoint &pt);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QPoint &pt);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QPoint &pt);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QPointF &pt);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QPointF &pt);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QPointF &pt);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QPointF &pt);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QLine &line);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QLine &line);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QLine &line);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QLine &line);
-QDBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QLineF &line);
-QDBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QLineF &line);
+Q_DBUS_EXPORT const QDBusArgument &operator>>(const QDBusArgument &a, QLineF &line);
+Q_DBUS_EXPORT QDBusArgument &operator<<(QDBusArgument &a, const QLineF &line);
#endif
template<template <typename> class Container, typename T>
diff --git a/src/dbus/qdbusconnection.cpp b/src/dbus/qdbusconnection.cpp
index 4382032c82..5cbb8ca822 100644
--- a/src/dbus/qdbusconnection.cpp
+++ b/src/dbus/qdbusconnection.cpp
@@ -125,7 +125,7 @@ QDBusConnectionManager::~QDBusConnectionManager()
connectionHash.clear();
}
-QDBUS_EXPORT void qDBusBindToApplication();
+Q_DBUS_EXPORT void qDBusBindToApplication();
void qDBusBindToApplication()
{
}
@@ -916,7 +916,7 @@ QString QDBusConnection::name() const
/*!
Attempts to register the \a serviceName on the D-Bus server and
- returns true if the registration succeded. The registration will
+ returns true if the registration succeeded. The registration will
fail if the name is already registered by another application.
\sa unregisterService(), QDBusConnectionInterface::registerService()
diff --git a/src/dbus/qdbusconnection.h b/src/dbus/qdbusconnection.h
index a8ca551689..eedda16958 100644
--- a/src/dbus/qdbusconnection.h
+++ b/src/dbus/qdbusconnection.h
@@ -72,7 +72,7 @@ class QDBusConnectionInterface;
class QObject;
class QDBusConnectionPrivate;
-class QDBUS_EXPORT QDBusConnection
+class Q_DBUS_EXPORT QDBusConnection
{
Q_GADGET
Q_ENUMS(BusType UnregisterMode)
@@ -85,16 +85,19 @@ public:
ExportScriptableSlots = 0x10,
ExportScriptableSignals = 0x20,
ExportScriptableProperties = 0x40,
+ ExportScriptableInvokables = 0x80,
ExportScriptableContents = 0xf0,
ExportNonScriptableSlots = 0x100,
ExportNonScriptableSignals = 0x200,
ExportNonScriptableProperties = 0x400,
+ ExportNonScriptableInvokables = 0x800,
ExportNonScriptableContents = 0xf00,
ExportAllSlots = ExportScriptableSlots|ExportNonScriptableSlots,
ExportAllSignals = ExportScriptableSignals|ExportNonScriptableSignals,
ExportAllProperties = ExportScriptableProperties|ExportNonScriptableProperties,
+ ExportAllInvokables = ExportScriptableInvokables|ExportNonScriptableInvokables,
ExportAllContents = ExportScriptableContents|ExportNonScriptableContents,
#ifndef Q_QDOC
diff --git a/src/dbus/qdbusconnectioninterface.h b/src/dbus/qdbusconnectioninterface.h
index 1a020b7abf..4650e127d3 100644
--- a/src/dbus/qdbusconnectioninterface.h
+++ b/src/dbus/qdbusconnectioninterface.h
@@ -62,7 +62,7 @@ class QByteArray;
/*
* Proxy class for interface org.freedesktop.DBus
*/
-class QDBUS_EXPORT QDBusConnectionInterface: public QDBusAbstractInterface
+class Q_DBUS_EXPORT QDBusConnectionInterface: public QDBusAbstractInterface
{
Q_OBJECT
Q_ENUMS(ServiceQueueOptions ServiceReplacementOptions RegisterServiceReply)
diff --git a/src/dbus/qdbuscontext.h b/src/dbus/qdbuscontext.h
index 13fbe4beb3..cb9310c954 100644
--- a/src/dbus/qdbuscontext.h
+++ b/src/dbus/qdbuscontext.h
@@ -57,7 +57,7 @@ class QDBusConnection;
class QDBusMessage;
class QDBusContextPrivate;
-class QDBUS_EXPORT QDBusContext
+class Q_DBUS_EXPORT QDBusContext
{
public:
QDBusContext();
diff --git a/src/dbus/qdbuserror.h b/src/dbus/qdbuserror.h
index ff9d1dfe7d..72736d0975 100644
--- a/src/dbus/qdbuserror.h
+++ b/src/dbus/qdbuserror.h
@@ -57,7 +57,7 @@ QT_MODULE(DBus)
class QDBusMessage;
-class QDBUS_EXPORT QDBusError
+class Q_DBUS_EXPORT QDBusError
{
public:
enum ErrorType {
@@ -115,7 +115,7 @@ private:
};
#ifndef QT_NO_DEBUG_STREAM
-QDBUS_EXPORT QDebug operator<<(QDebug, const QDBusError &);
+Q_DBUS_EXPORT QDebug operator<<(QDebug, const QDBusError &);
#endif
QT_END_NAMESPACE
diff --git a/src/dbus/qdbusextratypes.h b/src/dbus/qdbusextratypes.h
index 205baff9ed..544e63fa97 100644
--- a/src/dbus/qdbusextratypes.h
+++ b/src/dbus/qdbusextratypes.h
@@ -59,7 +59,7 @@ QT_MODULE(DBus)
// defined in qhash.cpp
Q_CORE_EXPORT uint qHash(const QString &key);
-class QDBUS_EXPORT QDBusObjectPath : private QString
+class Q_DBUS_EXPORT QDBusObjectPath : private QString
{
public:
inline QDBusObjectPath() { }
@@ -109,7 +109,7 @@ inline uint qHash(const QDBusObjectPath &objectPath)
{ return qHash(objectPath.path()); }
-class QDBUS_EXPORT QDBusSignature : private QString
+class Q_DBUS_EXPORT QDBusSignature : private QString
{
public:
inline QDBusSignature() { }
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index efa6744584..7951177fab 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -508,7 +508,7 @@ static bool shouldWatchService(const QString &service)
return !service.isEmpty() && !service.startsWith(QLatin1Char(':'));
}
-extern QDBUS_EXPORT void qDBusAddSpyHook(QDBusSpyHook);
+extern Q_DBUS_EXPORT void qDBusAddSpyHook(QDBusSpyHook);
void qDBusAddSpyHook(QDBusSpyHook hook)
{
qDBusSpyHookList()->append(hook);
@@ -618,7 +618,7 @@ static int findSlot(const QMetaObject *mo, const QByteArray &name, int flags,
continue;
// check type:
- if (mm.methodType() != QMetaMethod::Slot)
+ if (mm.methodType() != QMetaMethod::Slot && mm.methodType() != QMetaMethod::Method)
continue;
// check name:
@@ -682,10 +682,17 @@ static int findSlot(const QMetaObject *mo, const QByteArray &name, int flags,
if (isAsync && metaTypes.count() > i + 1)
continue;
- if (isScriptable && (flags & QDBusConnection::ExportScriptableSlots) == 0)
- continue; // not exported
- if (!isScriptable && (flags & QDBusConnection::ExportNonScriptableSlots) == 0)
- continue; // not exported
+ if (mm.methodType() == QMetaMethod::Slot) {
+ if (isScriptable && (flags & QDBusConnection::ExportScriptableSlots) == 0)
+ continue; // scriptable slots not exported
+ if (!isScriptable && (flags & QDBusConnection::ExportNonScriptableSlots) == 0)
+ continue; // non-scriptable slots not exported
+ } else {
+ if (isScriptable && (flags & QDBusConnection::ExportScriptableInvokables) == 0)
+ continue; // scriptable invokables not exported
+ if (!isScriptable && (flags & QDBusConnection::ExportNonScriptableInvokables) == 0)
+ continue; // non-scriptable invokables not exported
+ }
// if we got here, this slot matched
return idx;
@@ -1379,7 +1386,8 @@ void QDBusConnectionPrivate::activateObject(ObjectTreeNode &node, const QDBusMes
return; // internal filters have already run or an error has been sent
// try the object itself:
- if (node.flags & (QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportNonScriptableSlots)) {
+ if (node.flags & (QDBusConnection::ExportScriptableSlots|QDBusConnection::ExportNonScriptableSlots) ||
+ node.flags & (QDBusConnection::ExportScriptableInvokables|QDBusConnection::ExportNonScriptableInvokables)) {
bool interfaceFound = true;
if (!msg.interface().isEmpty())
interfaceFound = qDBusInterfaceInObject(node.obj, msg.interface());
diff --git a/src/dbus/qdbusinterface.cpp b/src/dbus/qdbusinterface.cpp
index b989cab413..248bf65bba 100644
--- a/src/dbus/qdbusinterface.cpp
+++ b/src/dbus/qdbusinterface.cpp
@@ -277,7 +277,7 @@ int QDBusInterfacePrivate::metacall(QMetaObject::Call c, int id, void **argv)
// signal relay from D-Bus world to Qt world
QMetaObject::activate(q, metaObject, id, argv);
- } else if (mm.methodType() == QMetaMethod::Slot) {
+ } else if (mm.methodType() == QMetaMethod::Slot || mm.methodType() == QMetaMethod::Method) {
// method call relay from Qt world to D-Bus world
// get D-Bus equivalent signature
QString methodName = QLatin1String(metaObject->dbusNameForMethod(id));
diff --git a/src/dbus/qdbusinterface.h b/src/dbus/qdbusinterface.h
index 02a9059826..141fbe502c 100644
--- a/src/dbus/qdbusinterface.h
+++ b/src/dbus/qdbusinterface.h
@@ -54,7 +54,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
class QDBusInterfacePrivate;
-class QDBUS_EXPORT QDBusInterface: public QDBusAbstractInterface
+class Q_DBUS_EXPORT QDBusInterface: public QDBusAbstractInterface
{
friend class QDBusConnection;
private:
diff --git a/src/dbus/qdbusintrospection_p.h b/src/dbus/qdbusintrospection_p.h
index aa1ae57c9e..3a69321f47 100644
--- a/src/dbus/qdbusintrospection_p.h
+++ b/src/dbus/qdbusintrospection_p.h
@@ -63,7 +63,7 @@
QT_BEGIN_NAMESPACE
-class QDBUS_EXPORT QDBusIntrospection
+class Q_DBUS_EXPORT QDBusIntrospection
{
public:
// forward declarations
diff --git a/src/dbus/qdbusmacros.h b/src/dbus/qdbusmacros.h
index 693a350c01..d8bfda58e1 100644
--- a/src/dbus/qdbusmacros.h
+++ b/src/dbus/qdbusmacros.h
@@ -46,14 +46,6 @@
#include <QtCore/qmetatype.h>
#include <QtCore/qvariant.h>
-#if defined(QDBUS_MAKEDLL)
-# define QDBUS_EXPORT Q_DECL_EXPORT
-#elif defined(QT_SHARED)
-# define QDBUS_EXPORT Q_DECL_IMPORT
-#else
-# define QDBUS_EXPORT
-#endif
-
#ifndef Q_MOC_RUN
# define Q_NOREPLY
#endif
diff --git a/src/dbus/qdbusmessage.h b/src/dbus/qdbusmessage.h
index f2e64b9b37..fa1f2c9b71 100644
--- a/src/dbus/qdbusmessage.h
+++ b/src/dbus/qdbusmessage.h
@@ -56,7 +56,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
class QDBusMessagePrivate;
-class QDBUS_EXPORT QDBusMessage
+class Q_DBUS_EXPORT QDBusMessage
{
public:
enum MessageType {
@@ -120,7 +120,7 @@ private:
};
#ifndef QT_NO_DEBUG_STREAM
-QDBUS_EXPORT QDebug operator<<(QDebug, const QDBusMessage &);
+Q_DBUS_EXPORT QDebug operator<<(QDebug, const QDBusMessage &);
#endif
QT_END_NAMESPACE
diff --git a/src/dbus/qdbusmetaobject_p.h b/src/dbus/qdbusmetaobject_p.h
index 777ef549b5..07f1cc00db 100644
--- a/src/dbus/qdbusmetaobject_p.h
+++ b/src/dbus/qdbusmetaobject_p.h
@@ -62,7 +62,7 @@ QT_BEGIN_NAMESPACE
class QDBusError;
struct QDBusMetaObjectPrivate;
-struct QDBUS_EXPORT QDBusMetaObject: public QMetaObject
+struct Q_DBUS_EXPORT QDBusMetaObject: public QMetaObject
{
bool cached;
diff --git a/src/dbus/qdbusmetatype.h b/src/dbus/qdbusmetatype.h
index b487e2380e..9ae194459b 100644
--- a/src/dbus/qdbusmetatype.h
+++ b/src/dbus/qdbusmetatype.h
@@ -53,7 +53,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
-class QDBUS_EXPORT QDBusMetaType
+class Q_DBUS_EXPORT QDBusMetaType
{
public:
typedef void (*MarshallFunction)(QDBusArgument &, const void *);
diff --git a/src/dbus/qdbuspendingcall.h b/src/dbus/qdbuspendingcall.h
index ca0eaaaae8..492eb3cba8 100644
--- a/src/dbus/qdbuspendingcall.h
+++ b/src/dbus/qdbuspendingcall.h
@@ -62,7 +62,7 @@ class QDBusError;
class QDBusPendingCallWatcher;
class QDBusPendingCallPrivate;
-class QDBUS_EXPORT QDBusPendingCall
+class Q_DBUS_EXPORT QDBusPendingCall
{
public:
QDBusPendingCall(const QDBusPendingCall &other);
@@ -96,7 +96,7 @@ private:
};
class QDBusPendingCallWatcherPrivate;
-class QDBUS_EXPORT QDBusPendingCallWatcher: public QObject, public QDBusPendingCall
+class Q_DBUS_EXPORT QDBusPendingCallWatcher: public QObject, public QDBusPendingCall
{
Q_OBJECT
public:
diff --git a/src/dbus/qdbuspendingreply.h b/src/dbus/qdbuspendingreply.h
index 4757115c6e..61e561e800 100644
--- a/src/dbus/qdbuspendingreply.h
+++ b/src/dbus/qdbuspendingreply.h
@@ -55,7 +55,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
-class QDBUS_EXPORT QDBusPendingReplyData: public QDBusPendingCall
+class Q_DBUS_EXPORT QDBusPendingReplyData: public QDBusPendingCall
{
protected:
QDBusPendingReplyData();
diff --git a/src/dbus/qdbusreply.h b/src/dbus/qdbusreply.h
index fbe7459762..ba25308c2e 100644
--- a/src/dbus/qdbusreply.h
+++ b/src/dbus/qdbusreply.h
@@ -59,7 +59,7 @@ QT_BEGIN_NAMESPACE
QT_MODULE(DBus)
-QDBUS_EXPORT void qDBusReplyFill(const QDBusMessage &reply, QDBusError &error, QVariant &data);
+Q_DBUS_EXPORT void qDBusReplyFill(const QDBusMessage &reply, QDBusError &error, QVariant &data);
template<typename T>
class QDBusReply
diff --git a/src/dbus/qdbusserver.cpp b/src/dbus/qdbusserver.cpp
index 2377795fda..6a4553cb6c 100644
--- a/src/dbus/qdbusserver.cpp
+++ b/src/dbus/qdbusserver.cpp
@@ -100,7 +100,7 @@ QDBusError QDBusServer::lastError() const
}
/*!
- Returns the address this server is assosiated with.
+ Returns the address this server is associated with.
*/
QString QDBusServer::address() const
{
diff --git a/src/dbus/qdbusserver.h b/src/dbus/qdbusserver.h
index 90d40f5619..8e824a80c0 100644
--- a/src/dbus/qdbusserver.h
+++ b/src/dbus/qdbusserver.h
@@ -57,7 +57,7 @@ class QDBusConnectionPrivate;
class QDBusError;
class QDBusConnection;
-class QDBUS_EXPORT QDBusServer: public QObject
+class Q_DBUS_EXPORT QDBusServer: public QObject
{
Q_OBJECT
public:
diff --git a/src/dbus/qdbusservicewatcher.h b/src/dbus/qdbusservicewatcher.h
index c7609a804d..d9a0d928a3 100644
--- a/src/dbus/qdbusservicewatcher.h
+++ b/src/dbus/qdbusservicewatcher.h
@@ -56,7 +56,7 @@ QT_MODULE(DBus)
class QDBusConnection;
class QDBusServiceWatcherPrivate;
-class QDBUS_EXPORT QDBusServiceWatcher: public QObject
+class Q_DBUS_EXPORT QDBusServiceWatcher: public QObject
{
Q_OBJECT
Q_PROPERTY(QStringList watchedServices READ watchedServices WRITE setWatchedServices)
diff --git a/src/dbus/qdbusthreaddebug_p.h b/src/dbus/qdbusthreaddebug_p.h
index e8d90c5a94..87cb4d6977 100644
--- a/src/dbus/qdbusthreaddebug_p.h
+++ b/src/dbus/qdbusthreaddebug_p.h
@@ -63,8 +63,8 @@
#if QDBUS_THREAD_DEBUG
QT_BEGIN_NAMESPACE
typedef void (*qdbusThreadDebugFunc)(int, int, QDBusConnectionPrivate *);
-QDBUS_EXPORT void qdbusDefaultThreadDebug(int, int, QDBusConnectionPrivate *);
-extern QDBUS_EXPORT qdbusThreadDebugFunc qdbusThreadDebug;
+Q_DBUS_EXPORT void qdbusDefaultThreadDebug(int, int, QDBusConnectionPrivate *);
+extern Q_DBUS_EXPORT qdbusThreadDebugFunc qdbusThreadDebug;
QT_END_NAMESPACE
#endif
diff --git a/src/dbus/qdbusutil_p.h b/src/dbus/qdbusutil_p.h
index 8a1846ab4d..2b53c6b021 100644
--- a/src/dbus/qdbusutil_p.h
+++ b/src/dbus/qdbusutil_p.h
@@ -67,25 +67,25 @@ QT_BEGIN_NAMESPACE
namespace QDBusUtil
{
- QDBUS_EXPORT bool isValidInterfaceName(const QString &ifaceName);
+ Q_DBUS_EXPORT bool isValidInterfaceName(const QString &ifaceName);
- QDBUS_EXPORT bool isValidUniqueConnectionName(const QString &busName);
+ Q_DBUS_EXPORT bool isValidUniqueConnectionName(const QString &busName);
- QDBUS_EXPORT bool isValidBusName(const QString &busName);
+ Q_DBUS_EXPORT bool isValidBusName(const QString &busName);
- QDBUS_EXPORT bool isValidMemberName(const QString &memberName);
+ Q_DBUS_EXPORT bool isValidMemberName(const QString &memberName);
- QDBUS_EXPORT bool isValidErrorName(const QString &errorName);
+ Q_DBUS_EXPORT bool isValidErrorName(const QString &errorName);
- QDBUS_EXPORT bool isValidPartOfObjectPath(const QString &path);
+ Q_DBUS_EXPORT bool isValidPartOfObjectPath(const QString &path);
- QDBUS_EXPORT bool isValidObjectPath(const QString &path);
+ Q_DBUS_EXPORT bool isValidObjectPath(const QString &path);
- QDBUS_EXPORT bool isValidSignature(const QString &signature);
+ Q_DBUS_EXPORT bool isValidSignature(const QString &signature);
- QDBUS_EXPORT bool isValidSingleSignature(const QString &signature);
+ Q_DBUS_EXPORT bool isValidSingleSignature(const QString &signature);
- QDBUS_EXPORT QString argumentToString(const QVariant &variant);
+ Q_DBUS_EXPORT QString argumentToString(const QVariant &variant);
enum AllowEmptyFlag {
EmptyAllowed,
diff --git a/src/dbus/qdbusxmlgenerator.cpp b/src/dbus/qdbusxmlgenerator.cpp
index 463ac73a82..1222ac7f95 100644
--- a/src/dbus/qdbusxmlgenerator.cpp
+++ b/src/dbus/qdbusxmlgenerator.cpp
@@ -53,7 +53,7 @@
QT_BEGIN_NAMESPACE
-extern QDBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
+extern Q_DBUS_EXPORT QString qDBusGenerateMetaObjectXml(QString interface, const QMetaObject *mo,
const QMetaObject *base, int flags);
static inline QString typeNameToXml(const char *typeName)
@@ -133,7 +133,7 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
if (mm.methodType() == QMetaMethod::Signal)
// adding a signal
isSignal = true;
- else if (mm.methodType() == QMetaMethod::Slot && mm.access() == QMetaMethod::Public)
+ else if (mm.access() == QMetaMethod::Public && (mm.methodType() == QMetaMethod::Slot || mm.methodType() == QMetaMethod::Method))
isSignal = false;
else
continue; // neither signal nor public slot
@@ -141,9 +141,9 @@ static QString generateInterfaceXml(const QMetaObject *mo, int flags, int method
if (isSignal && !(flags & (QDBusConnection::ExportScriptableSignals |
QDBusConnection::ExportNonScriptableSignals)))
continue; // we're not exporting any signals
- if (!isSignal && !(flags & (QDBusConnection::ExportScriptableSlots |
- QDBusConnection::ExportNonScriptableSlots)))
- continue; // we're not exporting any slots
+ if (!isSignal && (!(flags & (QDBusConnection::ExportScriptableSlots | QDBusConnection::ExportNonScriptableSlots)) &&
+ !(flags & (QDBusConnection::ExportScriptableInvokables | QDBusConnection::ExportNonScriptableInvokables))))
+ continue; // we're not exporting any slots or invokables
QString xml = QString::fromLatin1(" <%1 name=\"%2\">\n")
.arg(isSignal ? QLatin1String("signal") : QLatin1String("method"))
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index 872f6cb855..6e073305b5 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -1,9 +1,19 @@
=============================================================================
-The changes below are pre Qt 4.7.0 tech preview
+The changes below are pre Qt 4.7.0 RC1
TextInput
- copy(), cut() and paste() functions added
+Font.letterSpacing
+ - was percentage based. Now specified in pixels.
+Item
+ - wantsFocus renamed to activeFocus
+ - forceFocus() renamed to forceActiveFocus()
+ - focus now returns the scoped focus (i.e. focus read/write now manipulate
+ the same value)
+TextInput and TextEdit:
+ - focusOnPress renamed to activeFocusOnPress
+=============================================================================
The changes below are pre Qt 4.7.0 beta 2
QDeclarativeView
diff --git a/src/declarative/debugger/qdeclarativedebugtrace.cpp b/src/declarative/debugger/qdeclarativedebugtrace.cpp
index 5e6d5e7d53..b2b0c8a8e0 100644
--- a/src/declarative/debugger/qdeclarativedebugtrace.cpp
+++ b/src/declarative/debugger/qdeclarativedebugtrace.cpp
@@ -78,6 +78,9 @@ void QDeclarativeDebugTrace::endRange(RangeType t)
void QDeclarativeDebugTrace::addEventImpl(EventType event)
{
+ if (!isEnabled())
+ return;
+
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
ds << m_timer.elapsed() << (int)Event << (int)event;
@@ -86,6 +89,9 @@ void QDeclarativeDebugTrace::addEventImpl(EventType event)
void QDeclarativeDebugTrace::startRangeImpl(RangeType range)
{
+ if (!isEnabled())
+ return;
+
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
ds << m_timer.elapsed() << (int)RangeStart << (int)range;
@@ -94,6 +100,9 @@ void QDeclarativeDebugTrace::startRangeImpl(RangeType range)
void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &u)
{
+ if (!isEnabled())
+ return;
+
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
ds << m_timer.elapsed() << (int)RangeData << (int)range << (QString)u.toString();
@@ -102,6 +111,9 @@ void QDeclarativeDebugTrace::rangeDataImpl(RangeType range, const QUrl &u)
void QDeclarativeDebugTrace::endRangeImpl(RangeType range)
{
+ if (!isEnabled())
+ return;
+
QByteArray data;
QDataStream ds(&data, QIODevice::WriteOnly);
ds << m_timer.elapsed() << (int)RangeEnd << (int)range;
diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp
index 6241922aaf..878f42f3c0 100644
--- a/src/declarative/debugger/qpacketprotocol.cpp
+++ b/src/declarative/debugger/qpacketprotocol.cpp
@@ -422,7 +422,7 @@ QPacket::~QPacket()
/*!
Creates a copy of \a other. The initial stream positions are shared, but the
- two packets are otherwise independant.
+ two packets are otherwise independent.
*/
QPacket::QPacket(const QPacket & other)
: QDataStream(), b(other.b), buf(0)
diff --git a/src/declarative/graphicsitems/qdeclarativeanchors_p.h b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
index 1bd7608935..c9297977fb 100644
--- a/src/declarative/graphicsitems/qdeclarativeanchors_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeanchors_p.h
@@ -70,11 +70,11 @@ class Q_DECLARATIVE_EXPORT QDeclarativeAnchors : public QObject
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 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(qreal verticalCenterOffset READ verticalCenterOffset WRITE setVerticalCenterOffset NOTIFY verticalCenterOffsetChanged)
+ Q_PROPERTY(qreal baselineOffset READ baselineOffset WRITE setBaselineOffset NOTIFY baselineOffsetChanged)
Q_PROPERTY(QGraphicsObject *fill READ fill WRITE setFill RESET resetFill NOTIFY fillChanged)
Q_PROPERTY(QGraphicsObject *centerIn READ centerIn WRITE setCenterIn RESET resetCenterIn NOTIFY centerInChanged)
diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
index 44c206b8b1..48812484b8 100644
--- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp
@@ -149,6 +149,8 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage()
\endqml
The URL may be absolute, or relative to the URL of the component.
+
+ \sa QDeclarativeImageProvider
*/
void QDeclarativeBorderImage::setSource(const QUrl &url)
{
diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
index 9af5f560dc..19cabdd62d 100644
--- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp
@@ -681,12 +681,15 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
if (newY < maxY && maxY - minY <= 0)
newY = maxY + (newY - maxY) / 2;
if (boundsBehavior == QDeclarativeFlickable::StopAtBounds && (newY > minY || newY < maxY)) {
- if (newY > minY)
- newY = minY;
- else if (newY < maxY)
+ rejectY = true;
+ if (newY < maxY) {
newY = maxY;
- else
- rejectY = true;
+ rejectY = false;
+ }
+ if (newY > minY) {
+ newY = minY;
+ rejectY = false;
+ }
}
if (!rejectY && stealMouse) {
vData.move.setValue(qRound(newY));
@@ -708,12 +711,15 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent
if (newX < maxX && maxX - minX <= 0)
newX = maxX + (newX - maxX) / 2;
if (boundsBehavior == QDeclarativeFlickable::StopAtBounds && (newX > minX || newX < maxX)) {
- if (newX > minX)
- newX = minX;
- else if (newX < maxX)
+ rejectX = true;
+ if (newX < maxX) {
newX = maxX;
- else
- rejectX = true;
+ rejectX = false;
+ }
+ if (newX > minX) {
+ newX = minX;
+ rejectX = false;
+ }
}
if (!rejectX && stealMouse) {
hData.move.setValue(qRound(newX));
@@ -1214,6 +1220,7 @@ bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
d->handleMousePressEvent(&mouseEvent);
d->captureDelayedPress(event);
+ stealThisEvent = d->stealMouse; // Update stealThisEvent in case changed by function call above
break;
case QEvent::GraphicsSceneMouseRelease:
if (d->delayedPressEvent) {
@@ -1234,7 +1241,6 @@ bool QDeclarativeFlickable::sendMouseEvent(QGraphicsSceneMouseEvent *event)
default:
break;
}
- stealThisEvent = d->stealMouse; // Update stealThisEvent and grabber in case changed by function calls above
grabber = qobject_cast<QDeclarativeItem*>(s->mouseGrabberItem());
if (grabber && stealThisEvent && !grabber->keepMouseGrab() && grabber != this) {
d->clearDelayedPress();
@@ -1426,21 +1432,23 @@ void QDeclarativeFlickable::movementEnding()
if (!d->flickingHorizontally)
emit flickEnded();
}
- if (d->movingHorizontally) {
- d->movingHorizontally = false;
- d->hMoved = false;
- emit movingChanged();
- emit movingHorizontallyChanged();
- if (!d->movingVertically)
- emit movementEnded();
- }
- if (d->movingVertically) {
- d->movingVertically = false;
- d->vMoved = false;
- emit movingChanged();
- emit movingVerticallyChanged();
- if (!d->movingHorizontally)
- emit movementEnded();
+ if (!d->pressed && !d->stealMouse) {
+ if (d->movingHorizontally) {
+ d->movingHorizontally = false;
+ d->hMoved = false;
+ emit movingChanged();
+ emit movingHorizontallyChanged();
+ if (!d->movingVertically)
+ emit movementEnded();
+ }
+ if (d->movingVertically) {
+ d->movingVertically = false;
+ d->vMoved = false;
+ emit movingChanged();
+ emit movingVerticallyChanged();
+ if (!d->movingHorizontally)
+ emit movementEnded();
+ }
}
d->hData.smoothVelocity.setValue(0);
d->vData.smoothVelocity.setValue(0);
diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp
index 14a4f08d6f..68a4c64958 100644
--- a/src/declarative/graphicsitems/qdeclarativegridview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp
@@ -1085,13 +1085,15 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
\c portrait data directly.
An improved grid view is shown below. The delegate is visually improved and is moved
- into a separate \c contactDelegate component. Also, the currently selected item is highlighted
- with a blue \l Rectangle using the \l highlight property, and \c focus is set to \c true
- to enable keyboard navigation for the grid view.
+ into a separate \c contactDelegate component.
\snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs advanced
\image gridview-highlight.png
+ The currently selected item is highlighted with a blue \l Rectangle using the \l highlight property,
+ and \c focus is set to \c true to enable keyboard navigation for the grid view.
+ The grid view itself is a focus scope (see \l{qmlfocus#Acquiring Focus and Focus Scopes}{the focus documentation page} for more details).
+
Delegates are instantiated as needed and may be destroyed at any time.
State should \e never be stored in a delegate.
@@ -1276,6 +1278,11 @@ void QDeclarativeGridView::setDelegate(QDeclarativeComponent *delegate)
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();
+ d->releaseItem(d->currentItem);
+ d->currentItem = 0;
refill();
d->moveReason = QDeclarativeGridViewPrivate::SetIndex;
d->updateCurrent(d->currentIndex);
@@ -1293,9 +1300,15 @@ void QDeclarativeGridView::setDelegate(QDeclarativeComponent *delegate)
\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.
+ The \c currentIndex property holds the index of the current item, and
+ \c currentItem holds the current item.
+
+ If highlightFollowsCurrentItem is \c true, setting either of these
+ properties will smoothly scroll the GridView so that the current
+ item becomes visible.
+
+ Note that the position of the current item
+ may only be approximate until it becomes visible in the view.
*/
int QDeclarativeGridView::currentIndex() const
{
@@ -1385,7 +1398,7 @@ void QDeclarativeGridView::setHighlight(QDeclarativeComponent *highlight)
\qmlproperty bool GridView::highlightFollowsCurrentItem
This property sets whether the highlight is managed by the view.
- If this property is true, the highlight is moved smoothly
+ If this property is true (the default value), the highlight is moved smoothly
to follow the current item. Otherwise, the
highlight is not moved by the view, and any movement must be implemented
by the highlight.
@@ -1568,6 +1581,8 @@ void QDeclarativeGridView::setFlow(Flow flow)
If this is true, key navigation that would move the current item selection
past one end of the view instead wraps around and moves the selection to
the other end of the view.
+
+ By default, key navigation is not wrapped.
*/
bool QDeclarativeGridView::isWrapEnabled() const
{
diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp
index 90738c8e2d..37736ccac7 100644
--- a/src/declarative/graphicsitems/qdeclarativeimage.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp
@@ -66,7 +66,7 @@ QT_BEGIN_NAMESPACE
\endqml
\endtable
- If the \l {Image::width}{width} and \l{Image::height}{height} properties are not specified,
+ If the \l {Item::width}{width} and \l{Item::height}{height} properties are not specified,
the Image element is automatically sized to the loaded image. Image elements can be
stretched and tiled using the \l fillMode property.
diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
index 67f2327023..ba40443933 100644
--- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp
@@ -50,6 +50,13 @@
QT_BEGIN_NAMESPACE
+
+/*!
+ \class QDeclarativeImageBase
+ \internal
+ \brief The base class for declarative images.
+ */
+
QDeclarativeImageBase::QDeclarativeImageBase(QDeclarativeImageBasePrivate &dd, QDeclarativeItem *parent)
: QDeclarativeItem(dd, parent)
{
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp
index 190b22cbec..2c295cd1fb 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp
@@ -63,11 +63,9 @@
#include <QtGui/qgraphicstransform.h>
#include <qlistmodelinterface_p.h>
-QT_BEGIN_NAMESPACE
+#include <float.h>
-#ifndef FLT_MAX
-#define FLT_MAX 1E+37
-#endif
+QT_BEGIN_NAMESPACE
/*!
\qmlclass Transform QGraphicsTransform
@@ -91,7 +89,7 @@ QT_BEGIN_NAMESPACE
*/
/*!
- \qmlclass Translate QGraphicsTranslate
+ \qmlclass Translate QDeclarativeTranslate
\since 4.7
\brief The Translate object provides a way to move an Item without changing its x or y properties.
@@ -420,12 +418,12 @@ void QDeclarativeItemKeyFilter::componentComplete()
/*!
- \qmlclass KeyNavigation
+ \qmlclass KeyNavigation QDeclarativeKeyNavigationAttached
\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
+ between focused 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.
@@ -513,8 +511,10 @@ QDeclarativeItem *QDeclarativeKeyNavigationAttached::left() const
void QDeclarativeKeyNavigationAttached::setLeft(QDeclarativeItem *i)
{
Q_D(QDeclarativeKeyNavigationAttached);
+ if (d->left == i)
+ return;
d->left = i;
- emit changed();
+ emit leftChanged();
}
QDeclarativeItem *QDeclarativeKeyNavigationAttached::right() const
@@ -526,8 +526,10 @@ QDeclarativeItem *QDeclarativeKeyNavigationAttached::right() const
void QDeclarativeKeyNavigationAttached::setRight(QDeclarativeItem *i)
{
Q_D(QDeclarativeKeyNavigationAttached);
+ if (d->right == i)
+ return;
d->right = i;
- emit changed();
+ emit rightChanged();
}
QDeclarativeItem *QDeclarativeKeyNavigationAttached::up() const
@@ -539,8 +541,10 @@ QDeclarativeItem *QDeclarativeKeyNavigationAttached::up() const
void QDeclarativeKeyNavigationAttached::setUp(QDeclarativeItem *i)
{
Q_D(QDeclarativeKeyNavigationAttached);
+ if (d->up == i)
+ return;
d->up = i;
- emit changed();
+ emit upChanged();
}
QDeclarativeItem *QDeclarativeKeyNavigationAttached::down() const
@@ -552,8 +556,10 @@ QDeclarativeItem *QDeclarativeKeyNavigationAttached::down() const
void QDeclarativeKeyNavigationAttached::setDown(QDeclarativeItem *i)
{
Q_D(QDeclarativeKeyNavigationAttached);
+ if (d->down == i)
+ return;
d->down = i;
- emit changed();
+ emit downChanged();
}
QDeclarativeItem *QDeclarativeKeyNavigationAttached::tab() const
@@ -565,8 +571,10 @@ QDeclarativeItem *QDeclarativeKeyNavigationAttached::tab() const
void QDeclarativeKeyNavigationAttached::setTab(QDeclarativeItem *i)
{
Q_D(QDeclarativeKeyNavigationAttached);
+ if (d->tab == i)
+ return;
d->tab = i;
- emit changed();
+ emit tabChanged();
}
QDeclarativeItem *QDeclarativeKeyNavigationAttached::backtab() const
@@ -578,8 +586,10 @@ QDeclarativeItem *QDeclarativeKeyNavigationAttached::backtab() const
void QDeclarativeKeyNavigationAttached::setBacktab(QDeclarativeItem *i)
{
Q_D(QDeclarativeKeyNavigationAttached);
+ if (d->backtab == i)
+ return;
d->backtab = i;
- emit changed();
+ emit backtabChanged();
}
/*!
@@ -714,7 +724,7 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post)
}
/*!
- \qmlclass Keys
+ \qmlclass Keys QDeclarativeKeysAttached
\since 4.7
\brief The Keys attached property provides key handling to Items.
@@ -1388,26 +1398,6 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec
*/
/*!
- \property QDeclarativeItem::baseline
- \internal
-*/
-
-/*!
- \property QDeclarativeItem::focus
- \internal
-*/
-
-/*!
- \property QDeclarativeItem::wantsFocus
- \internal
-*/
-
-/*!
- \property QDeclarativeItem::transformOrigin
- \internal
-*/
-
-/*!
\fn void QDeclarativeItem::childrenRectChanged(const QRectF &)
\internal
*/
@@ -1452,7 +1442,7 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec
*/
/*!
- \fn void QDeclarativeItem::wantsFocusChanged(bool)
+ \fn void QDeclarativeItem::activeFocusChanged(bool)
\internal
*/
@@ -1534,6 +1524,9 @@ QDeclarativeItem::~QDeclarativeItem()
\endqml
The default transform origin is \c Item.Center.
+
+ To set an arbitrary transform origin point use the \l Scale or \l Rotation
+ transform elements.
*/
/*!
@@ -1970,6 +1963,9 @@ QVariant QDeclarativeItem::inputMethodQuery(Qt::InputMethodQuery query) const
return v;
}
+/*!
+ \internal
+ */
void QDeclarativeItem::keyPressPreHandler(QKeyEvent *event)
{
Q_D(QDeclarativeItem);
@@ -1980,6 +1976,9 @@ void QDeclarativeItem::keyPressPreHandler(QKeyEvent *event)
d->doneEventPreHandler = true;
}
+/*!
+ \internal
+ */
void QDeclarativeItem::keyReleasePreHandler(QKeyEvent *event)
{
Q_D(QDeclarativeItem);
@@ -1990,6 +1989,9 @@ void QDeclarativeItem::keyReleasePreHandler(QKeyEvent *event)
d->doneEventPreHandler = true;
}
+/*!
+ \internal
+ */
void QDeclarativeItem::inputMethodPreHandler(QInputMethodEvent *event)
{
Q_D(QDeclarativeItem);
@@ -2000,7 +2002,6 @@ void QDeclarativeItem::inputMethodPreHandler(QInputMethodEvent *event)
d->doneEventPreHandler = true;
}
-
/*!
\internal
*/
@@ -2059,20 +2060,6 @@ QDeclarativeAnchorLine QDeclarativeItemPrivate::baseline() const
}
/*!
- \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
@@ -2204,6 +2191,8 @@ void QDeclarativeItem::setBaselineOffset(qreal offset)
}
\endqml
\endtable
+
+ \sa transform, Rotation
*/
/*!
@@ -2240,6 +2229,8 @@ void QDeclarativeItem::setBaselineOffset(qreal offset)
}
\endqml
\endtable
+
+ \sa transform, Scale
*/
/*!
@@ -2377,12 +2368,12 @@ QScriptValue QDeclarativeItem::mapToItem(const QScriptValue &item, qreal x, qrea
}
/*!
- \qmlmethod Item::forceFocus()
+ \qmlmethod Item::forceActiveFocus()
- Force the focus on the item.
- This method sets the focus on the item and makes sure that all the focus scopes higher in the object hierarchy are given focus.
+ Force active focus on the item.
+ This method sets focus on the item and makes sure that all the focus scopes higher in the object hierarchy are also given focus.
*/
-void QDeclarativeItem::forceFocus()
+void QDeclarativeItem::forceActiveFocus()
{
setFocus(true);
QGraphicsItem *parent = parentItem();
@@ -2419,8 +2410,19 @@ void QDeclarativeItemPrivate::focusChanged(bool flag)
{
Q_Q(QDeclarativeItem);
if (!(flags & QGraphicsItem::ItemIsFocusScope) && parent)
- emit q->wantsFocusChanged(flag); //see also QDeclarativeItemPrivate::subFocusItemChange()
- emit q->focusChanged(flag);
+ emit q->activeFocusChanged(flag); //see also QDeclarativeItemPrivate::subFocusItemChange()
+
+ bool inScope = false;
+ QGraphicsItem *p = parent;
+ while (p) {
+ if (p->flags() & QGraphicsItem::ItemIsFocusScope) {
+ inScope = true;
+ break;
+ }
+ p = p->parentItem();
+ }
+ if (!inScope)
+ emit q->focusChanged(flag);
}
/*! \internal */
@@ -2492,7 +2494,7 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi
Item {
filter: [
Blur { ... },
- Relection { ... }
+ Reflection { ... }
...
]
}
@@ -2503,7 +2505,7 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi
\qmlproperty bool Item::clip
This property holds whether clipping is enabled.
- if clipping is enabled, an item will clip its own painting, as well
+ 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.
@@ -2543,11 +2545,6 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi
\sa {qmlstates}{States}
*/
-/*!
- \property QDeclarativeItem::state
- \internal
-*/
-
/*! \internal */
QString QDeclarativeItemPrivate::state() const
{
@@ -2570,11 +2567,6 @@ void QDeclarativeItemPrivate::setState(const QString &state)
For more information see \l Transform.
*/
-/*!
- \property QDeclarativeItem::transform
- \internal
-*/
-
/*! \internal */
QDeclarativeListProperty<QGraphicsTransform> QDeclarativeItem::transform()
{
@@ -2707,14 +2699,14 @@ bool QDeclarativeItem::sceneEvent(QEvent *event)
if (event->type() == QEvent::FocusIn ||
event->type() == QEvent::FocusOut) {
- d->focusChanged(hasFocus());
+ d->focusChanged(hasActiveFocus());
}
return rv;
}
}
/*!
- \reimp
+ \internal
Note that unlike QGraphicsItems, QDeclarativeItem::itemChange() is \e not called
during initial widget polishing. Items wishing to optimize start-up construction
@@ -2863,6 +2855,26 @@ void QDeclarativeItem::setSmooth(bool smooth)
}
/*!
+ \property QDeclarativeItem::focus
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::transform
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::transformOrigin
+ \internal
+*/
+
+/*!
+ \property QDeclarativeItem::activeFocus
+ \internal
+*/
+
+/*!
\internal
Return the width of the item
*/
@@ -3101,15 +3113,32 @@ void QDeclarativeItem::setSize(const QSizeF &size)
}
/*!
- \qmlproperty bool Item::wantsFocus
+ \qmlproperty bool Item::activeFocus
+
+ This property indicates whether the item has active focus.
- This property indicates whether the item has has an active focus request.
+ An item with active focus will receive keyboard input,
+ or is a FocusScope ancestor of the item that will receive keyboard input.
- \sa {qmlfocus}{Keyboard Focus}
+ Usually, activeFocus is gained by setting focus on an item and its enclosing
+ FocusScopes. In the following example \c input will have activeFocus.
+ \qml
+ Rectangle {
+ FocusScope {
+ focus: true
+ TextInput {
+ id: input
+ focus: true
+ }
+ }
+ }
+ \endqml
+
+ \sa focus, {qmlfocus}{Keyboard Focus}
*/
/*! \internal */
-bool QDeclarativeItem::wantsFocus() const
+bool QDeclarativeItem::hasActiveFocus() const
{
Q_D(const QDeclarativeItem);
return focusItem() == this ||
@@ -3119,16 +3148,51 @@ bool QDeclarativeItem::wantsFocus() const
/*!
\qmlproperty bool Item::focus
- This property indicates whether the item has keyboard input focus. Set this
- property to true to request focus.
+ This property indicates whether the item has focus within the enclosing focus scope. If true, this item
+ will gain active focus when the enclosing focus scope gains active focus.
+ In the following example, \c input will be given active focus when \c scope gains active focus.
+ \qml
+ Rectangle {
+ FocusScope {
+ id: scope
+ TextInput {
+ id: input
+ focus: true
+ }
+ }
+ }
+ \endqml
+
+ For the purposes of this property, the top level item in the scene
+ is assumed to act like a focus scope, and to always have active focus
+ when the scene has focus. On a practical level, that means the following
+ QML will give active focus to \c input on startup.
+
+ \qml
+ Rectangle {
+ TextInput {
+ id: input
+ focus: true
+ }
+ }
+ \endqml
- \sa {qmlfocus}{Keyboard Focus}
+ \sa activeFocus, {qmlfocus}{Keyboard Focus}
*/
/*! \internal */
bool QDeclarativeItem::hasFocus() const
{
- return QGraphicsItem::hasFocus();
+ Q_D(const QDeclarativeItem);
+ QGraphicsItem *p = d->parent;
+ while (p) {
+ if (p->flags() & QGraphicsItem::ItemIsFocusScope) {
+ return p->focusScopeItem() == this;
+ }
+ p = p->parentItem();
+ }
+
+ return hasActiveFocus() ? true : (!QGraphicsItem::parentItem() ? true : false);
}
/*! \internal */
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.h b/src/declarative/graphicsitems/qdeclarativeitem.h
index 4f420f8952..afb1f2e70e 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem.h
@@ -87,9 +87,10 @@ class Q_DECLARATIVE_EXPORT QDeclarativeItem : public QGraphicsObject, public QDe
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(bool activeFocus READ hasActiveFocus NOTIFY activeFocusChanged)
Q_PROPERTY(QDeclarativeListProperty<QGraphicsTransform> transform READ transform DESIGNABLE false FINAL)
Q_PROPERTY(TransformOrigin transformOrigin READ transformOrigin WRITE setTransformOrigin NOTIFY transformOriginChanged)
+ Q_PROPERTY(QPointF transformOriginPoint READ transformOriginPoint) // transformOriginPoint is read-only for Item
Q_PROPERTY(bool smooth READ smooth WRITE setSmooth NOTIFY smoothChanged)
Q_ENUMS(TransformOrigin)
Q_CLASSINFO("DefaultProperty", "data")
@@ -138,7 +139,7 @@ public:
QRectF boundingRect() const;
virtual void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *);
- bool wantsFocus() const;
+ bool hasActiveFocus() const;
bool hasFocus() const;
void setFocus(bool);
@@ -147,16 +148,15 @@ public:
Q_INVOKABLE QScriptValue mapFromItem(const QScriptValue &item, qreal x, qreal y) const;
Q_INVOKABLE QScriptValue mapToItem(const QScriptValue &item, qreal x, qreal y) const;
- Q_INVOKABLE void forceFocus();
+ Q_INVOKABLE void forceActiveFocus();
Q_INVOKABLE QDeclarativeItem *childAt(qreal x, qreal y) const;
Q_SIGNALS:
- void childrenChanged();
void childrenRectChanged(const QRectF &);
void baselineOffsetChanged(qreal);
void stateChanged(const QString &);
void focusChanged(bool);
- void wantsFocusChanged(bool);
+ void activeFocusChanged(bool);
void parentChanged(QDeclarativeItem *);
void transformOriginChanged(TransformOrigin);
void smoothChanged(bool);
diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h
index bc5d80910d..fffb4f7dce 100644
--- a/src/declarative/graphicsitems/qdeclarativeitem_p.h
+++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h
@@ -285,11 +285,18 @@ public:
virtual void subFocusItemChange()
{
if (flags & QGraphicsItem::ItemIsFocusScope || !parent)
- emit q_func()->wantsFocusChanged(subFocusItem != 0);
+ emit q_func()->activeFocusChanged(subFocusItem != 0);
//see also QDeclarativeItemPrivate::focusChanged
}
// Reimplemented from QGraphicsItemPrivate
+ virtual void focusScopeItemChange(bool isSubFocusItem)
+ {
+ emit q_func()->focusChanged(isSubFocusItem);
+ }
+
+
+ // Reimplemented from QGraphicsItemPrivate
virtual void siblingOrderChange()
{
Q_Q(QDeclarativeItem);
@@ -356,12 +363,12 @@ class QDeclarativeKeyNavigationAttached : public QObject, public QDeclarativeIte
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)
+ Q_PROPERTY(QDeclarativeItem *left READ left WRITE setLeft NOTIFY leftChanged)
+ Q_PROPERTY(QDeclarativeItem *right READ right WRITE setRight NOTIFY rightChanged)
+ Q_PROPERTY(QDeclarativeItem *up READ up WRITE setUp NOTIFY upChanged)
+ Q_PROPERTY(QDeclarativeItem *down READ down WRITE setDown NOTIFY downChanged)
+ Q_PROPERTY(QDeclarativeItem *tab READ tab WRITE setTab NOTIFY tabChanged)
+ Q_PROPERTY(QDeclarativeItem *backtab READ backtab WRITE setBacktab NOTIFY backtabChanged)
Q_PROPERTY(Priority priority READ priority WRITE setPriority NOTIFY priorityChanged)
Q_ENUMS(Priority)
@@ -389,7 +396,12 @@ public:
static QDeclarativeKeyNavigationAttached *qmlAttachedProperties(QObject *);
Q_SIGNALS:
- void changed();
+ void leftChanged();
+ void rightChanged();
+ void upChanged();
+ void downChanged();
+ void tabChanged();
+ void backtabChanged();
void priorityChanged();
private:
diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
index b198077f7f..783eff1e64 100644
--- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp
@@ -95,7 +95,8 @@ static QDeclarativePrivate::AutoParentResult qgraphicsobject_autoParent(QObject
void QDeclarativeItemModule::defineModule()
{
- QDeclarativePrivate::registerAutoParentFunction(qgraphicsobject_autoParent);
+ QDeclarativePrivate::RegisterAutoParent autoparent = { 0, &qgraphicsobject_autoParent };
+ QDeclarativePrivate::qmlregister(QDeclarativePrivate::AutoParentRegistration, &autoparent);
#ifdef QT_NO_MOVIE
qmlRegisterTypeNotAvailable("Qt",4,7,"AnimatedImage",
@@ -141,7 +142,9 @@ void QDeclarativeItemModule::defineModule()
qmlRegisterType<QGraphicsScale>("Qt",4,7,"Scale");
qmlRegisterType<QDeclarativeText>("Qt",4,7,"Text");
qmlRegisterType<QDeclarativeTextEdit>("Qt",4,7,"TextEdit");
+#ifndef QT_NO_LINEEDIT
qmlRegisterType<QDeclarativeTextInput>("Qt",4,7,"TextInput");
+#endif
qmlRegisterType<QDeclarativeViewSection>("Qt",4,7,"ViewSection");
qmlRegisterType<QDeclarativeVisualDataModel>("Qt",4,7,"VisualDataModel");
qmlRegisterType<QDeclarativeVisualItemModel>("Qt",4,7,"VisualItemModel");
diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp
index 110c970ff4..82b3e1c083 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp
@@ -60,7 +60,7 @@ void QDeclarativeViewSection::setProperty(const QString &property)
{
if (property != m_property) {
m_property = property;
- emit changed();
+ emit propertyChanged();
}
}
@@ -68,7 +68,7 @@ void QDeclarativeViewSection::setCriteria(QDeclarativeViewSection::SectionCriter
{
if (criteria != m_criteria) {
m_criteria = criteria;
- emit changed();
+ emit criteriaChanged();
}
}
@@ -575,6 +575,8 @@ FxListItem *QDeclarativeListViewPrivate::createItem(int modelIndex)
listItem->attached->m_prevSection = item->attached->section();
else
listItem->attached->m_prevSection = sectionAt(modelIndex-1);
+ }
+ if (modelIndex < model->count()-1) {
if (FxListItem *item = visibleItem(modelIndex+1))
listItem->attached->m_nextSection = item->attached->section();
else
@@ -1385,14 +1387,16 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m
the delegate is able to access the model's \c name and \c number data directly.
An improved list view is shown below. The delegate is visually improved and is moved
- into a separate \c contactDelegate component. Also, the currently selected item is highlighted
- with a blue \l Rectangle using the \l highlight property, and \c focus is set to \c true
- to enable keyboard navigation for the list view.
+ into a separate \c contactDelegate component.
\snippet doc/src/snippets/declarative/listview/listview.qml classdocs advanced
\image listview-highlight.png
- In a GridView, delegates are instantiated as needed and may be destroyed at any time.
+ The currently selected item is highlighted with a blue \l Rectangle using the \l highlight property,
+ and \c focus is set to \c true to enable keyboard navigation for the list view.
+ The list view itself is a focus scope (see \l{qmlfocus#Acquiring Focus and Focus Scopes}{the focus documentation page} for more details).
+
+ Delegates are instantiated as needed and may be destroyed at any time.
State should \e never be stored in a delegate.
\note Views do not enable \e clip automatically. If the view
@@ -1616,6 +1620,8 @@ void QDeclarativeListView::setDelegate(QDeclarativeComponent *delegate)
for (int i = 0; i < d->visibleItems.count(); ++i)
d->releaseItem(d->visibleItems.at(i));
d->visibleItems.clear();
+ d->releaseItem(d->currentItem);
+ d->currentItem = 0;
refill();
d->moveReason = QDeclarativeListViewPrivate::SetIndex;
d->updateCurrent(d->currentIndex);
@@ -1632,8 +1638,14 @@ void QDeclarativeListView::setDelegate(QDeclarativeComponent *delegate)
\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
+ The \c currentIndex property holds the index of the current item, and
+ \c currentItem holds the current item.
+
+ If highlightFollowsCurrentItem is \c true, setting either of these
+ properties will smoothly scroll the ListView so that the current
+ item becomes visible.
+
+ Note that the position of the current item
may only be approximate until it becomes visible in the view.
*/
int QDeclarativeListView::currentIndex() const
@@ -1727,12 +1739,12 @@ void QDeclarativeListView::setHighlight(QDeclarativeComponent *highlight)
\qmlproperty bool ListView::highlightFollowsCurrentItem
This property holds whether the highlight is managed by the view.
- If this property is true, the highlight is moved smoothly
+ If this property is true (the default value), the highlight is moved smoothly
to follow the current item. Otherwise, the
highlight is not moved by the view, and any movement must be implemented
by the highlight.
- Here is a highlight with its motion defined by a \l {SpringAniamtion} item:
+ Here is a highlight with its motion defined by a \l {SpringAnimation} item:
\snippet doc/src/snippets/declarative/listview/listview.qml highlightFollowsCurrentItem
@@ -1848,6 +1860,8 @@ void QDeclarativeListView::setHighlightRangeMode(HighlightRangeMode mode)
\qmlproperty real ListView::spacing
This property holds the spacing between items.
+
+ The default value is 0.
*/
qreal QDeclarativeListView::spacing() const
{
@@ -1914,11 +1928,13 @@ void QDeclarativeListView::setOrientation(QDeclarativeListView::Orientation orie
/*!
\qmlproperty bool ListView::keyNavigationWraps
- This property holds whether the list wraps key navigation.
+ This property holds whether the list wraps key navigation.
If this is true, key navigation that would move the current item selection
past the end of the list instead wraps around and moves the selection to
the start of the list, and vice-versa.
+
+ By default, key navigation is not wrapped.
*/
bool QDeclarativeListView::isWrapEnabled() const
{
diff --git a/src/declarative/graphicsitems/qdeclarativelistview_p.h b/src/declarative/graphicsitems/qdeclarativelistview_p.h
index 9941040065..b26486181d 100644
--- a/src/declarative/graphicsitems/qdeclarativelistview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativelistview_p.h
@@ -53,8 +53,8 @@ QT_MODULE(Declarative)
class Q_AUTOTEST_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(QString property READ property WRITE setProperty NOTIFY propertyChanged)
+ Q_PROPERTY(SectionCriteria criteria READ criteria WRITE setCriteria NOTIFY criteriaChanged)
Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
Q_ENUMS(SectionCriteria)
public:
@@ -73,7 +73,8 @@ public:
QString sectionString(const QString &value);
Q_SIGNALS:
- void changed();
+ void propertyChanged();
+ void criteriaChanged();
void delegateChanged();
private:
diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp
index e745ca66b0..d28181e520 100644
--- a/src/declarative/graphicsitems/qdeclarativeloader.cpp
+++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp
@@ -118,9 +118,9 @@ void QDeclarativeLoaderPrivate::initResize()
be instantiated may be specified directly by the \l sourceComponent
property, or loaded from a URL via the \l source property.
- Loader can be used to delay the creation of a component until it is required.
- For example, this loads "Page1.qml" as a component into the Loader element
- when the \l MouseArea is clicked:
+ Loader can be used to delay the creation of a component until it
+ is required. For example, this loads "Page1.qml" as a component
+ into the Loader element, when the \l MouseArea is clicked:
\code
import Qt 4.7
@@ -159,13 +159,15 @@ void QDeclarativeLoaderPrivate::initResize()
unloads "Page1.qml" and frees resources consumed by it.
+ Note that Loader is a focus scope. Its \c focus property must be set to \c true for any of its children
+ to get the \e {active focus} (see \l{qmlfocus#Acquiring Focus and Focus Scopes}{the focus documentation page} for more details).
+
\sa {dynamic-object-creation}{Dynamic Object Creation}
*/
/*!
\internal
\class QDeclarativeLoader
- \qmlclass Loader
*/
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
index b7b0c9e186..dcdb9f6215 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp
+++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp
@@ -46,12 +46,14 @@
#include <QGraphicsSceneMouseEvent>
+#include <float.h>
+
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),
-_active(false)
+: QObject(parent), _target(0), _axis(XandYAxis), _xmin(-FLT_MAX), _xmax(FLT_MAX), _ymin(-FLT_MAX), _ymax(FLT_MAX),
+_active(false), _filterChildren(false)
{
}
@@ -158,12 +160,24 @@ void QDeclarativeDrag::setActive(bool drag)
emit activeChanged();
}
+bool QDeclarativeDrag::filterChildren() const
+{
+ return _filterChildren;
+}
+
+void QDeclarativeDrag::setFilterChildren(bool filter)
+{
+ if (_filterChildren == filter)
+ return;
+ _filterChildren = filter;
+ emit filterChildrenChanged();
+}
+
QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate()
{
delete drag;
}
-
/*!
\qmlclass MouseArea QDeclarativeMouseArea
\since 4.7
@@ -396,6 +410,7 @@ void QDeclarativeMouseArea::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeMouseArea);
d->moved = false;
+ d->stealMouse = false;
if (!d->absorb)
QDeclarativeItem::mousePressEvent(event);
else {
@@ -454,8 +469,10 @@ void QDeclarativeMouseArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
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)))
+ if ((d->dragX && !(dx < dragThreshold)) || (d->dragY && !(dy < dragThreshold))) {
d->drag->setActive(true);
+ d->stealMouse = true;
+ }
if (!keepMouseGrab()) {
if ((!d->dragY && dy < dragThreshold && d->dragX && dx > dragThreshold)
|| (!d->dragX && dx < dragThreshold && d->dragY && dy > dragThreshold)
@@ -493,6 +510,7 @@ void QDeclarativeMouseArea::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
void QDeclarativeMouseArea::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeMouseArea);
+ d->stealMouse = false;
if (!d->absorb) {
QDeclarativeItem::mouseReleaseEvent(event);
} else {
@@ -503,6 +521,9 @@ void QDeclarativeMouseArea::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
// If we don't accept hover, we need to reset containsMouse.
if (!acceptHoverEvents())
setHovered(false);
+ QGraphicsScene *s = scene();
+ if (s && s->mouseGrabberItem() == this)
+ ungrabMouse();
setKeepMouseGrab(false);
}
}
@@ -577,6 +598,71 @@ bool QDeclarativeMouseArea::sceneEvent(QEvent *event)
return rv;
}
+bool QDeclarativeMouseArea::sendMouseEvent(QGraphicsSceneMouseEvent *event)
+{
+ Q_D(QDeclarativeMouseArea);
+ 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:
+ 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 && stealThisEvent && !grabber->keepMouseGrab() && grabber != this)
+ grabMouse();
+
+ return stealThisEvent;
+ }
+ if (mouseEvent.type() == QEvent::GraphicsSceneMouseRelease) {
+ d->stealMouse = false;
+ ungrabMouse();
+ }
+ return false;
+}
+
+bool QDeclarativeMouseArea::sceneEventFilter(QGraphicsItem *i, QEvent *e)
+{
+ Q_D(QDeclarativeMouseArea);
+ if (!d->absorb || !isVisible() || !d->drag || !d->drag->filterChildren())
+ 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);
+}
+
void QDeclarativeMouseArea::timerEvent(QTimerEvent *event)
{
Q_D(QDeclarativeMouseArea);
@@ -757,6 +843,7 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag()
\qmlproperty real MouseArea::drag.maximumX
\qmlproperty real MouseArea::drag.minimumY
\qmlproperty real MouseArea::drag.maximumY
+ \qmlproperty bool MouseArea::drag.filterChildren
\c drag provides a convenient way to make an item draggable.
@@ -777,6 +864,12 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag()
for \c rect in the above example, it cannot be dragged along the X-axis.
This can be avoided by settng the anchor value to \c undefined in
an \l onPressed handler.
+
+ If \c drag.filterChildren is set to true, a drag can override descendant MouseAreas. This
+ enables a parent MouseArea to handle drags, for example, while descendants handle clicks:
+
+ \snippet doc/src/snippets/declarative/mouseareadragfilter.qml dragfilter
+
*/
QT_END_NAMESPACE
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
index 4fe3fcb5aa..0da7515b00 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea_p.h
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p.h
@@ -62,6 +62,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeDrag : public QObject
Q_PROPERTY(qreal minimumY READ ymin WRITE setYmin NOTIFY minimumYChanged)
Q_PROPERTY(qreal maximumY READ ymax WRITE setYmax NOTIFY maximumYChanged)
Q_PROPERTY(bool active READ active NOTIFY activeChanged)
+ Q_PROPERTY(bool filterChildren READ filterChildren WRITE setFilterChildren NOTIFY filterChildrenChanged)
//### consider drag and drop
public:
@@ -88,6 +89,9 @@ public:
bool active() const;
void setActive(bool);
+ bool filterChildren() const;
+ void setFilterChildren(bool);
+
Q_SIGNALS:
void targetChanged();
void axisChanged();
@@ -96,6 +100,7 @@ Q_SIGNALS:
void minimumYChanged();
void maximumYChanged();
void activeChanged();
+ void filterChildrenChanged();
private:
QGraphicsObject *_target;
@@ -104,7 +109,8 @@ private:
qreal _xmax;
qreal _ymin;
qreal _ymax;
- bool _active;
+ bool _active : 1;
+ bool _filterChildren: 1;
Q_DISABLE_COPY(QDeclarativeDrag)
};
@@ -177,6 +183,8 @@ protected:
void hoverMoveEvent(QGraphicsSceneHoverEvent *event);
void hoverLeaveEvent(QGraphicsSceneHoverEvent *event);
bool sceneEvent(QEvent *);
+ bool sendMouseEvent(QGraphicsSceneMouseEvent *event);
+ bool sceneEventFilter(QGraphicsItem *i, QEvent *e);
void timerEvent(QTimerEvent *event);
virtual void geometryChanged(const QRectF &newGeometry,
diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
index 3d7bd1e8f1..cf9dc183fa 100644
--- a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h
@@ -68,7 +68,7 @@ class QDeclarativeMouseAreaPrivate : public QDeclarativeItemPrivate
public:
QDeclarativeMouseAreaPrivate()
: absorb(true), hovered(false), pressed(false), longPress(false),
- moved(false), drag(0)
+ moved(false), stealMouse(false), drag(0)
{
}
@@ -78,6 +78,7 @@ public:
{
Q_Q(QDeclarativeMouseArea);
q->setAcceptedMouseButtons(Qt::LeftButton);
+ q->setFiltersChildEvents(true);
}
void saveEvent(QGraphicsSceneMouseEvent *event) {
@@ -101,6 +102,7 @@ public:
bool moved : 1;
bool dragX : 1;
bool dragY : 1;
+ bool stealMouse : 1;
QDeclarativeDrag *drag;
QPointF startScene;
qreal startX;
diff --git a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
index 3b9b8df687..a6db1fa7fe 100644
--- a/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepainteditem.cpp
@@ -90,6 +90,8 @@ QT_BEGIN_NAMESPACE
static int inpaint=0;
static int inpaint_clearcache=0;
+extern Q_GUI_EXPORT bool qt_applefontsmoothing_enabled;
+
/*!
Marks areas of the cache that intersect with the given \a rect as dirty and
in need of being refreshed.
@@ -287,7 +289,14 @@ void QDeclarativePaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem
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)) {
+#ifdef Q_WS_MAC
+ bool oldSmooth = qt_applefontsmoothing_enabled;
+ qt_applefontsmoothing_enabled = false;
+#endif
QPainter qp(&d->imagecache[i]->image);
+#ifdef Q_WS_MAC
+ qt_applefontsmoothing_enabled = oldSmooth;
+#endif
qp.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform, d->smoothCache);
qp.translate(-area.x(), -area.y());
qp.scale(d->contentsScale,d->contentsScale);
@@ -349,7 +358,14 @@ void QDeclarativePaintedItem::paint(QPainter *p, const QStyleOptionGraphicsItem
if (d->fillColor.isValid())
img.fill(d->fillColor);
{
+#ifdef Q_WS_MAC
+ bool oldSmooth = qt_applefontsmoothing_enabled;
+ qt_applefontsmoothing_enabled = false;
+#endif
QPainter qp(&img);
+#ifdef Q_WS_MAC
+ qt_applefontsmoothing_enabled = oldSmooth;
+#endif
qp.setRenderHints(QPainter::HighQualityAntialiasing | QPainter::TextAntialiasing | QPainter::SmoothPixmapTransform, d->smoothCache);
qp.translate(-r.x(),-r.y());
diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp
index a904869532..c48011d3f6 100644
--- a/src/declarative/graphicsitems/qdeclarativepath.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepath.cpp
@@ -474,6 +474,7 @@ void QDeclarativeCurve::setX(qreal x)
{
if (_x != x) {
_x = x;
+ emit xChanged();
emit changed();
}
}
@@ -487,6 +488,7 @@ void QDeclarativeCurve::setY(qreal y)
{
if (_y != y) {
_y = y;
+ emit yChanged();
emit changed();
}
}
@@ -533,6 +535,13 @@ void QDeclarativeCurve::setY(qreal y)
/*!
\qmlproperty string PathAttribute::name
the name of the attribute to change.
+
+ This attribute will be available to the delegate as PathView.<name>
+
+ Note that using an existing Item property name such as "opacity" as an
+ attribute is allowed. This is because path attributes add a new
+ \l{qdeclarativeintroduction.html#attached-properties} {Attached Property}
+ which in no way clashes with existing properties.
*/
/*!
@@ -569,6 +578,7 @@ void QDeclarativePathAttribute::setValue(qreal value)
{
if (_value != value) {
_value = value;
+ emit valueChanged();
emit changed();
}
}
@@ -671,6 +681,7 @@ void QDeclarativePathQuad::setControlX(qreal x)
{
if (_controlX != x) {
_controlX = x;
+ emit controlXChanged();
emit changed();
}
}
@@ -688,6 +699,7 @@ void QDeclarativePathQuad::setControlY(qreal y)
{
if (_controlY != y) {
_controlY = y;
+ emit controlYChanged();
emit changed();
}
}
@@ -754,6 +766,7 @@ void QDeclarativePathCubic::setControl1X(qreal x)
{
if (_control1X != x) {
_control1X = x;
+ emit control1XChanged();
emit changed();
}
}
@@ -767,6 +780,7 @@ void QDeclarativePathCubic::setControl1Y(qreal y)
{
if (_control1Y != y) {
_control1Y = y;
+ emit control1YChanged();
emit changed();
}
}
@@ -786,6 +800,7 @@ void QDeclarativePathCubic::setControl2X(qreal x)
{
if (_control2X != x) {
_control2X = x;
+ emit control2XChanged();
emit changed();
}
}
@@ -799,6 +814,7 @@ void QDeclarativePathCubic::setControl2Y(qreal y)
{
if (_control2Y != y) {
_control2Y = y;
+ emit control2YChanged();
emit changed();
}
}
diff --git a/src/declarative/graphicsitems/qdeclarativepath_p.h b/src/declarative/graphicsitems/qdeclarativepath_p.h
index 001bcdfbd0..5ab5cfd635 100644
--- a/src/declarative/graphicsitems/qdeclarativepath_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepath_p.h
@@ -68,7 +68,7 @@ class Q_AUTOTEST_EXPORT QDeclarativePathAttribute : public QDeclarativePathEleme
Q_OBJECT
Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged)
- Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY changed)
+ Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged)
public:
QDeclarativePathAttribute(QObject *parent=0) : QDeclarativePathElement(parent), _value(0) {}
@@ -81,6 +81,7 @@ public:
Q_SIGNALS:
void nameChanged();
+ void valueChanged();
private:
QString _name;
@@ -91,8 +92,8 @@ class Q_AUTOTEST_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)
+ Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
+ Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
public:
QDeclarativeCurve(QObject *parent=0) : QDeclarativePathElement(parent), _x(0), _y(0) {}
@@ -104,6 +105,10 @@ public:
virtual void addToPath(QPainterPath &) {}
+Q_SIGNALS:
+ void xChanged();
+ void yChanged();
+
private:
qreal _x;
qreal _y;
@@ -122,8 +127,8 @@ class Q_AUTOTEST_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)
+ Q_PROPERTY(qreal controlX READ controlX WRITE setControlX NOTIFY controlXChanged)
+ Q_PROPERTY(qreal controlY READ controlY WRITE setControlY NOTIFY controlYChanged)
public:
QDeclarativePathQuad(QObject *parent=0) : QDeclarativeCurve(parent), _controlX(0), _controlY(0) {}
@@ -135,6 +140,10 @@ public:
void addToPath(QPainterPath &path);
+Q_SIGNALS:
+ void controlXChanged();
+ void controlYChanged();
+
private:
qreal _controlX;
qreal _controlY;
@@ -144,10 +153,10 @@ class Q_AUTOTEST_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)
+ Q_PROPERTY(qreal control1X READ control1X WRITE setControl1X NOTIFY control1XChanged)
+ Q_PROPERTY(qreal control1Y READ control1Y WRITE setControl1Y NOTIFY control1YChanged)
+ Q_PROPERTY(qreal control2X READ control2X WRITE setControl2X NOTIFY control2XChanged)
+ Q_PROPERTY(qreal control2Y READ control2Y WRITE setControl2Y NOTIFY control2YChanged)
public:
QDeclarativePathCubic(QObject *parent=0) : QDeclarativeCurve(parent), _control1X(0), _control1Y(0), _control2X(0), _control2Y(0) {}
@@ -165,11 +174,17 @@ public:
void addToPath(QPainterPath &path);
+Q_SIGNALS:
+ void control1XChanged();
+ void control1YChanged();
+ void control2XChanged();
+ void control2YChanged();
+
private:
- int _control1X;
- int _control1Y;
- int _control2X;
- int _control2Y;
+ qreal _control1X;
+ qreal _control1Y;
+ qreal _control2X;
+ qreal _control2Y;
};
class Q_AUTOTEST_EXPORT QDeclarativePathPercent : public QDeclarativePathElement
diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp
index f4ebd136f8..06ac275cd8 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview.cpp
+++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp
@@ -90,6 +90,26 @@ void QDeclarativePathViewAttached::setValue(const QByteArray &name, const QVaria
m_metaobject->setValue(name, val);
}
+
+void QDeclarativePathViewPrivate::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()));
+ lastPosTime.invalidate();
+ static int timelineCompletedIdx = -1;
+ static int movementEndingIdx = -1;
+ if (timelineCompletedIdx == -1) {
+ timelineCompletedIdx = QDeclarativeTimeLine::staticMetaObject.indexOfSignal("completed()");
+ movementEndingIdx = QDeclarativePathView::staticMetaObject.indexOfSlot("movementEnding()");
+ }
+ QMetaObject::connect(&tl, timelineCompletedIdx,
+ q, movementEndingIdx, Qt::DirectConnection);
+}
+
QDeclarativeItem *QDeclarativePathViewPrivate::getItem(int modelIndex)
{
Q_Q(QDeclarativePathView);
@@ -284,8 +304,8 @@ void QDeclarativePathViewPrivate::updateItem(QDeclarativeItem *item, qreal perce
att->setValue(attr.toUtf8(), path->attributeAt(attr, percent));
}
QPointF pf = path->pointAt(percent);
- item->setX(qRound(pf.x() - item->width()*item->scale()/2));
- item->setY(qRound(pf.y() - item->height()*item->scale()/2));
+ item->setX(qRound(pf.x() - item->width()/2));
+ item->setY(qRound(pf.y() - item->height()/2));
}
void QDeclarativePathViewPrivate::regenerate()
@@ -314,7 +334,7 @@ void QDeclarativePathViewPrivate::regenerate()
and XmlListModel, or custom model classes defined in C++ that inherit from
QAbstractListModel.
- A ListView has a \l model, which defines the data to be displayed, and
+ The view has a \l model, which defines the data to be displayed, and
a \l delegate, which defines how the data should be displayed.
The \l delegate is instantiated for each item on the \l path.
The items may be flicked to move them along the path.
@@ -333,6 +353,9 @@ void QDeclarativePathViewPrivate::regenerate()
opacity of the items as they rotate. This additional code can be seen in the
PathAttribute documentation.)
+ The \c focus can be set to \c true to enable keyboard navigation.
+ The path view itself is a focus scope (see \l{qmlfocus#Acquiring Focus and Focus Scopes}{the focus documentation page} for more details).
+
Delegates are instantiated as needed and may be destroyed at any time.
State should \e never be stored in a delegate.
@@ -341,7 +364,7 @@ void QDeclarativePathViewPrivate::regenerate()
to set \e {clip: true} in order to have the out of view items clipped
nicely.
- \sa Path
+ \sa Path, {declarative/modelviews/pathview}{PathView example}
*/
QDeclarativePathView::QDeclarativePathView(QDeclarativeItem *parent)
@@ -848,6 +871,61 @@ void QDeclarativePathView::setInteractive(bool interactive)
}
/*!
+ \qmlproperty bool PathView::moving
+
+ This property holds whether the view is currently moving
+ due to the user either dragging or flicking the view.
+*/
+bool QDeclarativePathView::isMoving() const
+{
+ Q_D(const QDeclarativePathView);
+ return d->moving;
+}
+
+/*!
+ \qmlproperty bool PathView::flicking
+
+ This property holds whether the view is currently moving
+ due to the user flicking the view.
+*/
+bool QDeclarativePathView::isFlicking() const
+{
+ Q_D(const QDeclarativePathView);
+ return d->flicking;
+}
+
+/*!
+ \qmlsignal PathView::onMovementStarted()
+
+ This handler is called when the view begins moving due to user
+ interaction.
+*/
+
+/*!
+ \qmlsignal PathView::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 PathView::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 PathView::onFlickEnded()
+
+ This handler is called when the view stops moving due to a flick.
+*/
+
+/*!
\qmlproperty Component PathView::delegate
The delegate provides a template defining each item instantiated by the view.
@@ -964,7 +1042,11 @@ void QDeclarativePathView::mousePressEvent(QGraphicsSceneMouseEvent *event)
return;
}
- d->stealMouse = false;
+ if (d->tl.isActive() && d->flicking)
+ d->stealMouse = true; // If we've been flicked then steal the click.
+ else
+ d->stealMouse = false;
+
d->lastElapsed = 0;
d->lastDist = 0;
QDeclarativeItemPrivate::start(d->lastPosTime);
@@ -1000,6 +1082,11 @@ void QDeclarativePathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
d->lastDist = diff;
d->startPc = newPc;
}
+ if (!d->moving) {
+ d->moving = true;
+ emit movingChanged();
+ emit movementStarted();
+ }
}
}
@@ -1039,12 +1126,19 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *)
d->moveOffset.setValue(d->offset);
d->tl.accel(d->moveOffset, velocity, accel, dist);
d->tl.callback(QDeclarativeTimeLineCallback(&d->moveOffset, d->fixOffsetCallback, d));
+ if (!d->flicking) {
+ d->flicking = true;
+ emit flickingChanged();
+ emit flickStarted();
+ }
} else {
d->fixOffset();
}
d->lastPosTime.invalidate();
ungrabMouse();
+ if (!d->tl.isActive())
+ movementEnding();
}
bool QDeclarativePathView::sendMouseEvent(QGraphicsSceneMouseEvent *event)
@@ -1372,6 +1466,21 @@ void QDeclarativePathView::ticked()
d->updateCurrent();
}
+void QDeclarativePathView::movementEnding()
+{
+ Q_D(QDeclarativePathView);
+ if (d->flicking) {
+ d->flicking = false;
+ emit flickingChanged();
+ emit flickEnded();
+ }
+ if (d->moving && !d->stealMouse) {
+ d->moving = false;
+ emit movingChanged();
+ emit movementEnded();
+ }
+}
+
// find the item closest to the snap position
int QDeclarativePathViewPrivate::calcCurrentIndex()
{
diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p.h
index d2980c6fcd..035a64b762 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepathview_p.h
@@ -74,6 +74,9 @@ class Q_AUTOTEST_EXPORT QDeclarativePathView : public QDeclarativeItem
Q_PROPERTY(qreal flickDeceleration READ flickDeceleration WRITE setFlickDeceleration NOTIFY flickDecelerationChanged)
Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged)
+ Q_PROPERTY(bool moving READ isMoving NOTIFY movingChanged)
+ Q_PROPERTY(bool flicking READ isFlicking NOTIFY flickingChanged)
+
Q_PROPERTY(int count READ count NOTIFY countChanged)
Q_PROPERTY(QDeclarativeComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
Q_PROPERTY(int pathItemCount READ pathItemCount WRITE setPathItemCount NOTIFY pathItemCountChanged)
@@ -122,6 +125,9 @@ public:
bool isInteractive() const;
void setInteractive(bool);
+ bool isMoving() const;
+ bool isFlicking() const;
+
int count() const;
QDeclarativeComponent *delegate() const;
@@ -151,9 +157,15 @@ Q_SIGNALS:
void pathItemCountChanged();
void flickDecelerationChanged();
void interactiveChanged();
+ void movingChanged();
+ void flickingChanged();
void highlightChanged();
void highlightItemChanged();
void highlightMoveDurationChanged();
+ void movementStarted();
+ void movementEnded();
+ void flickStarted();
+ void flickEnded();
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event);
@@ -167,6 +179,7 @@ protected:
private Q_SLOTS:
void refill();
void ticked();
+ void movementEnding();
void itemsInserted(int index, int count);
void itemsRemoved(int index, int count);
void itemsMoved(int,int,int);
diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
index a0d2610712..9abec2eb4f 100644
--- a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h
@@ -78,6 +78,7 @@ public:
, lastElapsed(0), mappedRange(1.0)
, stealMouse(false), ownModel(false), interactive(true), haveHighlightRange(true)
, autoHighlight(true), highlightUp(false), layoutScheduled(false)
+ , moving(false), flicking(false)
, dragMargin(0), deceleration(100)
, moveOffset(this, &QDeclarativePathViewPrivate::setOffset)
, firstIndex(-1), pathItems(-1), requestedIndex(-1)
@@ -90,15 +91,7 @@ public:
{
}
- 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()));
- lastPosTime.invalidate();
- }
+ void init();
void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry) {
if ((newGeometry.size() != oldGeometry.size())
@@ -155,6 +148,8 @@ public:
bool autoHighlight : 1;
bool highlightUp : 1;
bool layoutScheduled : 1;
+ bool moving : 1;
+ bool flicking : 1;
QElapsedTimer lastPosTime;
QPointF lastPos;
qreal dragMargin;
diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
index 3be4014154..2b268fbe7b 100644
--- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp
+++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp
@@ -148,7 +148,6 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate()
/*!
\internal
\class QDeclarativeRepeater
- \qmlclass Repeater
*/
/*!
diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp
index 9a281e59b7..ab2be9c5f0 100644
--- a/src/declarative/graphicsitems/qdeclarativetext.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetext.cpp
@@ -57,6 +57,8 @@
QT_BEGIN_NAMESPACE
+extern Q_GUI_EXPORT bool qt_applefontsmoothing_enabled;
+
class QTextDocumentWithImageResources : public QTextDocument {
Q_OBJECT
@@ -301,8 +303,7 @@ QDeclarativeTextPrivate::~QDeclarativeTextPrivate()
Sets the letter spacing for the font.
Letter spacing changes the default spacing between individual letters in the font.
- A value of 100 will keep the spacing unchanged; a value of 200 will enlarge the spacing after a character by
- the width of the character itself.
+ A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.
*/
/*!
@@ -711,61 +712,37 @@ QRectF QDeclarativeText::boundingRect() const
int x = 0;
int y = 0;
- // Could include font max left/right bearings to either side of rectangle.
-
- if (d->cache || d->style != Normal) {
- 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;
- }
+ QSize size = d->cachedLayoutSize;
+ if (d->style != Normal)
+ size += QSize(2,2);
- return QRectF(x,y,d->imgCache.width(),d->imgCache.height());
- } else {
- switch (d->hAlign) {
- case AlignLeft:
- x = 0;
- break;
- case AlignRight:
- x = w - d->cachedLayoutSize.width();
- break;
- case AlignHCenter:
- x = (w - d->cachedLayoutSize.width()) / 2;
- break;
- }
+ // Could include font max left/right bearings to either side of rectangle.
- 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;
- }
+ switch (d->hAlign) {
+ case AlignLeft:
+ x = 0;
+ break;
+ case AlignRight:
+ x = w - size.width();
+ break;
+ case AlignHCenter:
+ x = (w - size.width()) / 2;
+ break;
+ }
- return QRectF(x,y,d->cachedLayoutSize.width(),d->cachedLayoutSize.height());
+ switch (d->vAlign) {
+ case AlignTop:
+ y = 0;
+ break;
+ case AlignBottom:
+ y = h - size.height();
+ break;
+ case AlignVCenter:
+ y = (h - size.height()) / 2;
+ break;
}
+
+ return QRectF(x,y,size.width(),size.height());
}
void QDeclarativeText::geometryChanged(const QRectF &newGeometry,
@@ -1028,7 +1005,14 @@ QPixmap QDeclarativeTextPrivate::wrappedTextImage(bool drawStyle)
QPixmap img(size);
if (!size.isEmpty()) {
img.fill(Qt::transparent);
+#ifdef Q_WS_MAC
+ bool oldSmooth = qt_applefontsmoothing_enabled;
+ qt_applefontsmoothing_enabled = false;
+#endif
QPainter p(&img);
+#ifdef Q_WS_MAC
+ qt_applefontsmoothing_enabled = oldSmooth;
+#endif
drawWrappedText(&p, QPointF(0,0), drawStyle);
}
return img;
@@ -1051,7 +1035,14 @@ QPixmap QDeclarativeTextPrivate::richTextImage(bool drawStyle)
//paint text
QPixmap img(size);
img.fill(Qt::transparent);
+#ifdef Q_WS_MAC
+ bool oldSmooth = qt_applefontsmoothing_enabled;
+ qt_applefontsmoothing_enabled = false;
+#endif
QPainter p(&img);
+#ifdef Q_WS_MAC
+ qt_applefontsmoothing_enabled = oldSmooth;
+#endif
QAbstractTextDocumentLayout::PaintContext context;
@@ -1127,6 +1118,15 @@ int QDeclarativeText::resourcesLoading() const
return d->doc ? d->doc->resourcesLoading() : 0;
}
+/*!
+ \qmlproperty bool Text::clip
+ This property holds whether the text is clipped.
+
+ Note that if the text does not fit in the bounding rectangle it will be abruptly chopped.
+
+ If you want to display potentially long text in a limited space, you probably want to use \c elide instead.
+*/
+
void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
{
Q_D(QDeclarativeText);
@@ -1146,13 +1146,10 @@ void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWid
bool needClip = clip() && (d->imgCache.width() > width() ||
d->imgCache.height() > height());
- if (needClip) {
- p->save();
- p->setClipRect(boundingRect(), Qt::IntersectClip);
- }
- p->drawPixmap(br.x(), br.y(), d->imgCache);
if (needClip)
- p->restore();
+ p->drawPixmap(0, 0, width(), height(), d->imgCache, -br.x(), -br.y(), width(), height());
+ else
+ p->drawPixmap(br.x(), br.y(), d->imgCache);
if (d->smooth) {
p->setRenderHint(QPainter::Antialiasing, oldAA);
@@ -1166,7 +1163,7 @@ void QDeclarativeText::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWid
if (needClip) {
p->save();
- p->setClipRect(boundingRect(), Qt::IntersectClip);
+ p->setClipRect(0, 0, width(), height(), Qt::IntersectClip);
}
if (d->richText) {
QAbstractTextDocumentLayout::PaintContext context;
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index f3eef23755..8117676524 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -202,8 +202,9 @@ QString QDeclarativeTextEdit::text() const
Sets the font size in pixels.
- Using this function makes the font device dependent.
- Use \l font.pointSize to set the size of the font in a device independent manner.
+ Using this function makes the font device dependent. Use
+ \l{TextEdit::font.pointSize} to set the size of the font in a
+ device independent manner.
*/
/*!
@@ -212,8 +213,7 @@ QString QDeclarativeTextEdit::text() const
Sets the letter spacing for the font.
Letter spacing changes the default spacing between individual letters in the font.
- A value of 100 will keep the spacing unchanged; a value of 200 will enlarge the spacing after a character by
- the width of the character itself.
+ A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.
*/
/*!
@@ -256,7 +256,6 @@ 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) {
#ifndef QT_NO_TEXTHTMLPARSER
@@ -624,7 +623,7 @@ void QDeclarativeTextEdit::moveCursorSelection(int pos)
\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
+ This property is set and unset when the text edit gets active focus, but it can also
be set directly (useful, for example, if a KeyProxy might forward keys to it).
*/
bool QDeclarativeTextEdit::isCursorVisible() const
@@ -783,9 +782,9 @@ QString QDeclarativeTextEdit::selectedText() const
}
/*!
- \qmlproperty bool TextEdit::focusOnPress
+ \qmlproperty bool TextEdit::activeFocusOnPress
- Whether the TextEdit should gain focus on a mouse press. By default this is
+ Whether the TextEdit should gain active focus on a mouse press. By default this is
set to true.
*/
bool QDeclarativeTextEdit::focusOnPress() const
@@ -800,13 +799,13 @@ void QDeclarativeTextEdit::setFocusOnPress(bool on)
if (d->focusOnPress == on)
return;
d->focusOnPress = on;
- emit focusOnPressChanged(d->focusOnPress);
+ emit activeFocusOnPressChanged(d->focusOnPress);
}
/*!
\qmlproperty bool TextEdit::persistentSelection
- Whether the TextEdit should keep the selection visible when it loses focus to another
+ Whether the TextEdit should keep the selection visible when it loses active focus to another
item in the scene. By default this is set to true;
*/
bool QDeclarativeTextEdit::persistentSelection() const
@@ -1106,15 +1105,15 @@ void QDeclarativeTextEdit::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeTextEdit);
if (d->focusOnPress){
- bool hadFocus = hasFocus();
- forceFocus();
+ bool hadActiveFocus = hasActiveFocus();
+ forceActiveFocus();
if (d->showInputPanelOnFocus) {
- if (hasFocus() && hadFocus && !isReadOnly()) {
+ if (hasActiveFocus() && hadActiveFocus && !isReadOnly()) {
// re-open input panel on press if already focused
openSoftwareInputPanel();
}
} else { // show input panel on click
- if (hasFocus() && !hadFocus) {
+ if (hasActiveFocus() && !hadActiveFocus) {
d->clickCausedFocus = true;
}
}
@@ -1291,9 +1290,11 @@ void QDeclarativeTextEditPrivate::init()
void QDeclarativeTextEdit::q_textChanged()
{
+ Q_D(QDeclarativeTextEdit);
+ d->text = text();
updateSize();
updateMicroFocus();
- emit textChanged(text());
+ emit textChanged(d->text);
}
void QDeclarativeTextEdit::moveCursorDelegate()
@@ -1427,10 +1428,10 @@ void QDeclarativeTextEditPrivate::updateDefaultTextOption()
By default the opening of input panels follows the platform style. On Symbian^1 and
Symbian^3 -based devices the panels are opened by clicking TextEdit. On other platforms
- the panels are automatically opened when TextEdit element gains focus. Input panels are
- always closed if no editor owns focus.
+ the panels are automatically opened when TextEdit element gains active focus. Input panels are
+ always closed if no editor has active focus.
- You can disable the automatic behavior by setting the property \c focusOnPress to false
+ You can disable the automatic behavior by setting the property \c activeFocusOnPress to false
and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement
the behavior you want.
@@ -1441,12 +1442,12 @@ void QDeclarativeTextEditPrivate::updateDefaultTextOption()
TextEdit {
id: textEdit
text: "Hello world!"
- focusOnPress: false
+ activeFocusOnPress: false
MouseArea {
anchors.fill: parent
onClicked: {
- if (!textEdit.focus) {
- textEdit.focus = true;
+ if (!textEdit.activeFocus) {
+ textEdit.forceActiveFocus();
textEdit.openSoftwareInputPanel();
} else {
textEdit.focus = false;
@@ -1478,10 +1479,10 @@ void QDeclarativeTextEdit::openSoftwareInputPanel()
By default the opening of input panels follows the platform style. On Symbian^1 and
Symbian^3 -based devices the panels are opened by clicking TextEdit. On other platforms
- the panels are automatically opened when TextEdit element gains focus. Input panels are
- always closed if no editor owns focus.
+ the panels are automatically opened when TextEdit element gains active focus. Input panels are
+ always closed if no editor has active focus.
- You can disable the automatic behavior by setting the property \c focusOnPress to false
+ You can disable the automatic behavior by setting the property \c activeFocusOnPress to false
and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement
the behavior you want.
@@ -1492,12 +1493,12 @@ void QDeclarativeTextEdit::openSoftwareInputPanel()
TextEdit {
id: textEdit
text: "Hello world!"
- focusOnPress: false
+ activeFocusOnPress: false
MouseArea {
anchors.fill: parent
onClicked: {
- if (!textEdit.focus) {
- textEdit.focus = true;
+ if (!textEdit.activeFocus) {
+ textEdit.forceActiveFocus();
textEdit.openSoftwareInputPanel();
} else {
textEdit.focus = false;
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
index 279af78a3b..68fde3d9e7 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h
@@ -85,7 +85,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem
Q_PROPERTY(int selectionStart READ selectionStart NOTIFY selectionStartChanged)
Q_PROPERTY(int selectionEnd READ selectionEnd NOTIFY selectionEndChanged)
Q_PROPERTY(QString selectedText READ selectedText NOTIFY selectionChanged)
- Q_PROPERTY(bool focusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY focusOnPressChanged)
+ Q_PROPERTY(bool activeFocusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY activeFocusOnPressChanged)
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)
@@ -216,7 +216,7 @@ Q_SIGNALS:
void readOnlyChanged(bool isReadOnly);
void cursorVisibleChanged(bool isCursorVisible);
void cursorDelegateChanged();
- void focusOnPressChanged(bool focusIsPressed);
+ void activeFocusOnPressChanged(bool activeFocusOnPressed);
void persistentSelectionChanged(bool isPersistentSelection);
void textMarginChanged(qreal textMargin);
void selectByMouseChanged(bool selectByMouse);
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 2a5d73d97a..90f5a701dc 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -51,6 +51,8 @@
#include <QFontMetrics>
#include <QPainter>
+#ifndef QT_NO_LINEEDIT
+
QT_BEGIN_NAMESPACE
/*!
@@ -176,8 +178,7 @@ void QDeclarativeTextInput::setText(const QString &s)
Sets the letter spacing for the font.
Letter spacing changes the default spacing between individual letters in the font.
- A value of 100 will keep the spacing unchanged; a value of 200 will enlarge the spacing after a character by
- the width of the character itself.
+ A positive value increases the letter spacing by the corresponding pixels; a negative value decreases the spacing.
*/
/*!
@@ -376,14 +377,14 @@ void QDeclarativeTextInput::setMaxLength(int 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
+ This property is set and unset when the TextInput gets active 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).
+ (but without actually giving it active 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.
@@ -396,7 +397,7 @@ void QDeclarativeTextInput::setMaxLength(int ml)
\endcode
In the above snippet the cursor will still become visible when the
- TextInput gains focus.
+ TextInput gains active focus.
*/
bool QDeclarativeTextInput::isCursorVisible() const
{
@@ -511,9 +512,9 @@ QString QDeclarativeTextInput::selectedText() const
}
/*!
- \qmlproperty bool TextInput::focusOnPress
+ \qmlproperty bool TextInput::activeFocusOnPress
- Whether the TextInput should gain focus on a mouse press. By default this is
+ Whether the TextInput should gain active focus on a mouse press. By default this is
set to true.
*/
bool QDeclarativeTextInput::focusOnPress() const
@@ -530,7 +531,7 @@ void QDeclarativeTextInput::setFocusOnPress(bool b)
d->focusOnPress = b;
- emit focusOnPressChanged(d->focusOnPress);
+ emit activeFocusOnPressChanged(d->focusOnPress);
}
/*!
@@ -946,15 +947,15 @@ void QDeclarativeTextInput::mousePressEvent(QGraphicsSceneMouseEvent *event)
{
Q_D(QDeclarativeTextInput);
if(d->focusOnPress){
- bool hadFocus = hasFocus();
- forceFocus();
+ bool hadActiveFocus = hasActiveFocus();
+ forceActiveFocus();
if (d->showInputPanelOnFocus) {
- if (hasFocus() && hadFocus && !isReadOnly()) {
+ if (hasActiveFocus() && hadActiveFocus && !isReadOnly()) {
// re-open input panel on press if already focused
openSoftwareInputPanel();
}
} else { // show input panel on click
- if (hasFocus() && !hadFocus) {
+ if (hasActiveFocus() && !hadActiveFocus) {
d->clickCausedFocus = true;
}
}
@@ -1313,10 +1314,10 @@ void QDeclarativeTextInput::moveCursorSelection(int position)
By default the opening of input panels follows the platform style. On Symbian^1 and
Symbian^3 -based devices the panels are opened by clicking TextInput. On other platforms
- the panels are automatically opened when TextInput element gains focus. Input panels are
- always closed if no editor owns focus.
+ the panels are automatically opened when TextInput element gains active focus. Input panels are
+ always closed if no editor has active focus.
- . You can disable the automatic behavior by setting the property \c focusOnPress to false
+ . You can disable the automatic behavior by setting the property \c activeFocusOnPress to false
and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement
the behavior you want.
@@ -1327,12 +1328,12 @@ void QDeclarativeTextInput::moveCursorSelection(int position)
TextInput {
id: textInput
text: "Hello world!"
- focusOnPress: false
+ activeFocusOnPress: false
MouseArea {
anchors.fill: parent
onClicked: {
- if (!textInput.focus) {
- textInput.focus = true;
+ if (!textInput.activeFocus) {
+ textInput.forceActiveFocus()
textInput.openSoftwareInputPanel();
} else {
textInput.focus = false;
@@ -1364,10 +1365,10 @@ void QDeclarativeTextInput::openSoftwareInputPanel()
By default the opening of input panels follows the platform style. On Symbian^1 and
Symbian^3 -based devices the panels are opened by clicking TextInput. On other platforms
- the panels are automatically opened when TextInput element gains focus. Input panels are
- always closed if no editor owns focus.
+ the panels are automatically opened when TextInput element gains active focus. Input panels are
+ always closed if no editor has active focus.
- . You can disable the automatic behavior by setting the property \c focusOnPress to false
+ . You can disable the automatic behavior by setting the property \c activeFocusOnPress to false
and use functions openSoftwareInputPanel() and closeSoftwareInputPanel() to implement
the behavior you want.
@@ -1378,12 +1379,12 @@ void QDeclarativeTextInput::openSoftwareInputPanel()
TextInput {
id: textInput
text: "Hello world!"
- focusOnPress: false
+ activeFocusOnPress: false
MouseArea {
anchors.fill: parent
onClicked: {
- if (!textInput.focus) {
- textInput.focus = true;
+ if (!textInput.activeFocus) {
+ textInput.forceActiveFocus();
textInput.openSoftwareInputPanel();
} else {
textInput.focus = false;
@@ -1538,3 +1539,5 @@ void QDeclarativeTextInput::updateSize(bool needsRedraw)
QT_END_NAMESPACE
+#endif // QT_NO_LINEEDIT
+
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
index b1862c68aa..06f77e5d8d 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h
@@ -48,6 +48,8 @@
#include <QGraphicsSceneMouseEvent>
#include <QIntValidator>
+#ifndef QT_NO_LINEEDIT
+
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
@@ -87,7 +89,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextInput : public QDeclarativePaintedItem
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)
+ Q_PROPERTY(bool activeFocusOnPress READ focusOnPress WRITE setFocusOnPress NOTIFY activeFocusOnPressChanged)
Q_PROPERTY(QString passwordCharacter READ passwordCharacter WRITE setPasswordCharacter NOTIFY passwordCharacterChanged)
Q_PROPERTY(QString displayText READ displayText NOTIFY displayTextChanged)
Q_PROPERTY(bool autoScroll READ autoScroll WRITE setAutoScroll NOTIFY autoScrollChanged)
@@ -211,7 +213,7 @@ Q_SIGNALS:
void echoModeChanged(EchoMode echoMode);
void passwordCharacterChanged();
void displayTextChanged();
- void focusOnPressChanged(bool focusOnPress);
+ void activeFocusOnPressChanged(bool activeFocusOnPress);
void autoScrollChanged(bool autoScroll);
void selectByMouseChanged(bool selectByMouse);
@@ -263,4 +265,6 @@ QML_DECLARE_TYPE(QRegExpValidator)
QT_END_HEADER
+#endif // QT_NO_LINEEDIT
+
#endif // QDECLARATIVETEXTINPUT_H
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
index 4ac5134f20..5ad6a3b8b2 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetextinput_p_p.h
@@ -62,6 +62,8 @@
//
// We mean it.
+#ifndef QT_NO_LINEEDIT
+
QT_BEGIN_NAMESPACE
class QDeclarativeTextInputPrivate : public QDeclarativePaintedItemPrivate
@@ -132,5 +134,7 @@ public:
QT_END_NAMESPACE
+#endif // QT_NO_LINEEDIT
+
#endif
diff --git a/src/declarative/graphicsitems/qdeclarativetranslate.cpp b/src/declarative/graphicsitems/qdeclarativetranslate.cpp
index 17daac7c40..be9b3f3c22 100644
--- a/src/declarative/graphicsitems/qdeclarativetranslate.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetranslate.cpp
@@ -90,7 +90,7 @@ void QDeclarativeTranslate::setX(qreal x)
return;
d->x = x;
update();
- emit positionChanged();
+ emit xChanged();
}
/*!
@@ -113,11 +113,11 @@ void QDeclarativeTranslate::setY(qreal y)
return;
d->y = y;
update();
- emit positionChanged();
+ emit yChanged();
}
/*!
- \reimp
+ \internal
*/
void QDeclarativeTranslate::applyTo(QMatrix4x4 *matrix) const
{
diff --git a/src/declarative/graphicsitems/qdeclarativetranslate_p.h b/src/declarative/graphicsitems/qdeclarativetranslate_p.h
index 0207dce7ec..b87151881b 100644
--- a/src/declarative/graphicsitems/qdeclarativetranslate_p.h
+++ b/src/declarative/graphicsitems/qdeclarativetranslate_p.h
@@ -56,8 +56,8 @@ class Q_AUTOTEST_EXPORT QDeclarativeTranslate : public QGraphicsTransform
{
Q_OBJECT
- Q_PROPERTY(qreal x READ x WRITE setX NOTIFY positionChanged)
- Q_PROPERTY(qreal y READ y WRITE setY NOTIFY positionChanged)
+ Q_PROPERTY(qreal x READ x WRITE setX NOTIFY xChanged)
+ Q_PROPERTY(qreal y READ y WRITE setY NOTIFY yChanged)
public:
QDeclarativeTranslate(QObject *parent = 0);
@@ -72,7 +72,8 @@ public:
void applyTo(QMatrix4x4 *matrix) const;
Q_SIGNALS:
- void positionChanged();
+ void xChanged();
+ void yChanged();
private:
Q_DECLARE_PRIVATE(QDeclarativeTranslate)
diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
index 786d6f95ac..ceb1961467 100644
--- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
+++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp
@@ -77,8 +77,8 @@ 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);
+ QDeclarative_setParent_noEvent(item, prop->object);
+ static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->children.append(Item(item));
static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->itemAppended();
static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->emitChildrenChanged();
}
@@ -88,12 +88,12 @@ public:
}
static QDeclarativeItem *children_at(QDeclarativeListProperty<QDeclarativeItem> *prop, int index) {
- return static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->children.at(index);
+ return static_cast<QDeclarativeVisualItemModelPrivate *>(prop->data)->children.at(index).item;
}
void itemAppended() {
Q_Q(QDeclarativeVisualItemModel);
- QDeclarativeVisualItemModelAttached *attached = QDeclarativeVisualItemModelAttached::properties(children.last());
+ QDeclarativeVisualItemModelAttached *attached = QDeclarativeVisualItemModelAttached::properties(children.last().item);
attached->setIndex(children.count()-1);
emit q->itemsInserted(children.count()-1, 1);
emit q->countChanged();
@@ -104,7 +104,25 @@ public:
emit q->childrenChanged();
}
- QList<QDeclarativeItem *> children;
+ int indexOf(QDeclarativeItem *item) const {
+ for (int i = 0; i < children.count(); ++i)
+ if (children.at(i).item == item)
+ return i;
+ return -1;
+ }
+
+ class Item {
+ public:
+ Item(QDeclarativeItem *i) : item(i), ref(0) {}
+
+ void addRef() { ++ref; }
+ bool deref() { return --ref == 0; }
+
+ QDeclarativeItem *item;
+ int ref;
+ };
+
+ QList<Item> children;
};
@@ -182,12 +200,22 @@ bool QDeclarativeVisualItemModel::isValid() const
QDeclarativeItem *QDeclarativeVisualItemModel::item(int index, bool)
{
Q_D(QDeclarativeVisualItemModel);
- return d->children.at(index);
+ QDeclarativeVisualItemModelPrivate::Item &item = d->children[index];
+ item.addRef();
+ return item.item;
}
-QDeclarativeVisualModel::ReleaseFlags QDeclarativeVisualItemModel::release(QDeclarativeItem *)
+QDeclarativeVisualModel::ReleaseFlags QDeclarativeVisualItemModel::release(QDeclarativeItem *item)
{
- // Nothing to do
+ Q_D(QDeclarativeVisualItemModel);
+ int idx = d->indexOf(item);
+ if (idx >= 0) {
+ if (d->children[idx].deref()) {
+ if (item->scene())
+ item->scene()->removeItem(item);
+ QDeclarative_setParent_noEvent(item, this);
+ }
+ }
return 0;
}
@@ -206,7 +234,7 @@ 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();
+ return QDeclarativeEngine::contextForObject(d->children.at(index).item)->contextProperty(name).toString();
}
QVariant QDeclarativeVisualItemModel::evaluate(int index, const QString &expression, QObject *objectContext)
@@ -216,7 +244,7 @@ QVariant QDeclarativeVisualItemModel::evaluate(int index, const QString &express
return QVariant();
QDeclarativeContext *ccontext = qmlContext(this);
QDeclarativeContext *ctxt = new QDeclarativeContext(ccontext);
- ctxt->setContextObject(d->children.at(index));
+ ctxt->setContextObject(d->children.at(index).item);
QDeclarativeExpression e(ctxt, objectContext, expression);
QVariant value = e.evaluate();
delete ctxt;
@@ -226,7 +254,7 @@ QVariant QDeclarativeVisualItemModel::evaluate(int index, const QString &express
int QDeclarativeVisualItemModel::indexOf(QDeclarativeItem *item, QObject *) const
{
Q_D(const QDeclarativeVisualItemModel);
- return d->children.indexOf(item);
+ return d->indexOf(item);
}
QDeclarativeVisualItemModelAttached *QDeclarativeVisualItemModel::qmlAttachedProperties(QObject *obj)
@@ -416,6 +444,9 @@ public:
int propForRole(int) const;
void setValue(int, const QVariant &);
+ bool hasValue(int id) const {
+ return m_meta->hasValue(id);
+ }
void ensureProperties();
@@ -1089,6 +1120,11 @@ QString QDeclarativeVisualDataModel::stringValue(int index, const QString &name)
if (d->m_visualItemModel)
return d->m_visualItemModel->stringValue(index, name);
+ if ((!d->m_listModelInterface || !d->m_abstractItemModel) && d->m_listAccessor) {
+ if (QObject *object = d->m_listAccessor->at(index).value<QObject*>())
+ return object->property(name.toUtf8()).toString();
+ }
+
if ((!d->m_listModelInterface && !d->m_abstractItemModel) || !d->m_delegate)
return QString();
@@ -1183,11 +1219,13 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count,
int role = roles.at(roleIdx);
int propId = data->propForRole(role);
if (propId != -1) {
- if (d->m_listModelInterface) {
- data->setValue(propId, d->m_listModelInterface->data(idx, QList<int>() << role).value(role));
- } else if (d->m_abstractItemModel) {
- QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root);
- data->setValue(propId, d->m_abstractItemModel->data(index, role));
+ if (data->hasValue(propId)) {
+ if (d->m_listModelInterface) {
+ data->setValue(propId, d->m_listModelInterface->data(idx, QList<int>() << role).value(role));
+ } else if (d->m_abstractItemModel) {
+ QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root);
+ data->setValue(propId, d->m_abstractItemModel->data(index, role));
+ }
}
} else {
QString roleName;
diff --git a/src/declarative/qml/parser/qdeclarativejslexer.cpp b/src/declarative/qml/parser/qdeclarativejslexer.cpp
index fcaaece43c..65a6af24d7 100644
--- a/src/declarative/qml/parser/qdeclarativejslexer.cpp
+++ b/src/declarative/qml/parser/qdeclarativejslexer.cpp
@@ -103,7 +103,7 @@ Lexer::Lexer(Engine *eng, bool tokenizeComments)
prohibitAutomaticSemicolon(false),
tokenizeComments(tokenizeComments)
{
- driver->setLexer(this);
+ if (driver) driver->setLexer(this);
// allocate space for read buffers
buffer8 = new char[size8];
buffer16 = new QChar[size16];
@@ -677,9 +677,9 @@ int Lexer::lex()
setDone(Other);
} else
state = Start;
- driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
} else if (current == 0) {
- driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
setDone(Eof);
}
@@ -689,14 +689,14 @@ int Lexer::lex()
setDone(Bad);
err = UnclosedComment;
errmsg = QCoreApplication::translate("QDeclarativeParser", "Unclosed comment at end of file");
- driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
+ if (driver) 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);
+ if (driver) driver->addComment(startpos, tokenLength(), startlineno, startcolumn);
}
break;
diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h
index 53ff51ca3b..c6b64ae863 100644
--- a/src/declarative/qml/qdeclarative.h
+++ b/src/declarative/qml/qdeclarative.h
@@ -116,7 +116,7 @@ int qmlRegisterType()
0
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
int qmlRegisterTypeNotAvailable(const char *uri, int versionMajor, int versionMinor, const char *qmlName, const QString& message);
@@ -151,7 +151,7 @@ int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMin
0
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
template<typename T>
@@ -184,7 +184,7 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c
0
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
template<typename T, typename E>
@@ -217,7 +217,7 @@ int qmlRegisterExtendedType()
0
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
template<typename T, typename E>
@@ -258,7 +258,7 @@ int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor,
0
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
template<typename T>
@@ -278,7 +278,7 @@ int qmlRegisterInterface(const char *typeName)
qobject_interface_iid<T *>()
};
- return QDeclarativePrivate::registerType(interface);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::InterfaceRegistration, &interface);
}
template<typename T>
@@ -312,7 +312,7 @@ int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor,
parser
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
class QDeclarativeContext;
diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp
index 23307c9744..ba757fc785 100644
--- a/src/declarative/qml/qdeclarativecompiler.cpp
+++ b/src/declarative/qml/qdeclarativecompiler.cpp
@@ -240,7 +240,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop,
if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: color expected"));
}
break;
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
case QVariant::Date:
{
bool ok;
@@ -262,7 +262,7 @@ bool QDeclarativeCompiler::testLiteralAssignment(const QMetaProperty &prop,
if (!ok) COMPILE_EXCEPTION(v, tr("Invalid property assignment: datetime expected"));
}
break;
-#endif // QT_NO_TEXTDATE
+#endif // QT_NO_DATESTRING
case QVariant::Point:
case QVariant::PointF:
{
@@ -416,7 +416,7 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop,
instr.storeColor.value = c.rgba();
}
break;
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
case QVariant::Date:
{
QDate d = QDeclarativeStringConverters::dateFromString(string);
@@ -450,7 +450,7 @@ void QDeclarativeCompiler::genLiteralAssignment(const QMetaProperty &prop,
instr.storeDateTime.valueIndex = index;
}
break;
-#endif // QT_NO_TEXTDATE
+#endif // QT_NO_DATESTRING
case QVariant::Point:
case QVariant::PointF:
{
@@ -1070,6 +1070,7 @@ void QDeclarativeCompiler::genObjectBody(QDeclarativeParser::Object *obj)
store.storeSignal.value =
output->indexForString(v->value.asScript().trimmed());
store.storeSignal.context = ctxt.stack;
+ store.storeSignal.name = output->indexForByteArray(prop->name);
output->bytecode << store;
}
@@ -2765,6 +2766,7 @@ bool QDeclarativeCompiler::completeComponentBuild()
bool isSharable = sharableTest.isSharable(expression);
QDeclarativeRewrite::RewriteBinding rewriteBinding;
+ rewriteBinding.setName('$'+binding.property->name);
expression = rewriteBinding(expression);
quint32 length = expression.length();
diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp
index 36c4b49157..1d48b1ab2a 100644
--- a/src/declarative/qml/qdeclarativecomponent.cpp
+++ b/src/declarative/qml/qdeclarativecomponent.cpp
@@ -115,24 +115,10 @@ class QByteArray;
a small component within a QML file, or for defining a component that logically
belongs with other QML components within a file.
- For example, here is a component that is used by multiple \l Loader objects:
+ For example, here is a component that is used by multiple \l Loader objects.
+ It contains a top level \l Rectangle item:
- \qml
- Item {
- Component {
- id: redSquare
-
- Rectangle {
- color: "red"
- width: 10
- height: 10
- }
- }
-
- Loader { sourceComponent: redSquare }
- Loader { sourceComponent: redSquare; x: 20 }
- }
- \endqml
+ \snippet doc/src/snippets/declarative/component.qml 0
Notice that while a \l Rectangle by itself would be automatically
rendered and displayed, this is not the case for the above rectangle
@@ -141,12 +127,16 @@ class QByteArray;
file, and is not loaded until requested (in this case, by the
two \l Loader objects).
+ A Component cannot contain anything other
+ than an \c id and a single top level item. While the \c id is optional,
+ the top level item is not; you cannot define an empty component.
+
The Component element is commonly used to provide graphical components
for views. For example, the ListView::delegate property requires a Component
to specify how each list item is to be displayed.
- Component objects can also be dynamically generated using
- \l{Qt::createComponent}{Qt.createComponent()}.
+ Component objects can also be dynamically created using
+ \l{QML:Qt::createComponent()}{Qt.createComponent()}.
*/
/*!
@@ -607,6 +597,9 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q
the \a parent value. Note that if the returned object is to be displayed, you
must provide a valid \a parent value or set the returned object's \l{Item::parent}{parent}
property, or else the object will not be visible.
+
+ Dynamically created instances can be deleted with the \c destroy() method.
+ See \l {Dynamic Object Management} for more information.
*/
/*!
diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp
index 97ef99c1cf..e8cb36e4bf 100644
--- a/src/declarative/qml/qdeclarativeengine.cpp
+++ b/src/declarative/qml/qdeclarativeengine.cpp
@@ -115,22 +115,55 @@ QT_BEGIN_NAMESPACE
/*!
\qmlclass QtObject QObject
\since 4.7
- \brief The QtObject element is the most basic element in QML
+ \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.
+ objectName property.
+
+ It can be useful to create a QtObject if you need an extremely
+ lightweight element to enclose a set of custom properties:
+
+ \snippet doc/src/snippets/declarative/qtobject.qml 0
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.
+ \qmlproperty string QML:QtObject::objectName
+ This property holds the QObject::objectName for this specific object instance.
+
+ This allows a C++ application to locate an item within a QML component
+ using the QObject::findChild() method. For example, the following C++
+ application locates the child \l Rectangle item and dynamically changes its
+ \c color value:
+
+ \qml
+ // MyRect.qml
+
+ import Qt 4.7
+
+ Item {
+ width: 200; height: 200
+
+ Rectangle {
+ anchors.fill: parent
+ color: "red"
+ objectName: "myRect"
+ }
+ }
+ \endqml
+
+ \code
+ // main.cpp
+
+ QDeclarativeView view;
+ view.setSource(QUrl::fromLocalFile("MyRect.qml"));
+ view.show();
- See \l{scripting.html#accessing-child-qobjects}{Accessing Child QObjects}
- in the scripting documentation for details how objectName can be used from
- scripts.
+ QDeclarativeItem *item = view.rootObject()->findChild<QDeclarativeItem*>("myRect");
+ if (item)
+ item->setProperty("color", QColor(Qt::yellow));
+ \endcode
*/
struct StaticQtMetaObject : public QObject
@@ -195,7 +228,7 @@ There are also string based constructors for these types. See \l{qdeclarativebas
\section1 Date/Time Formatters
-The Qt object contains several functions for formatting dates and times.
+The Qt object contains several functions for formatting QDateTime, QDate and QTime values.
\list
\o \l{QML:Qt::formatDateTime}{string Qt.formatDateTime(datetime date, variant format)}
@@ -237,8 +270,8 @@ QDeclarativeEnginePrivate::QDeclarativeEnginePrivate(QDeclarativeEngine *e)
}
/*!
-\qmlmethod url Qt::resolvedUrl(url)
-Returns \c url resolved relative to the URL of the caller.
+ \qmlmethod url Qt::resolvedUrl(url)
+ Returns \c url resolved relative to the URL of the caller.
*/
QUrl QDeclarativeScriptEngine::resolvedUrl(QScriptContext *context, const QUrl& url)
{
@@ -268,7 +301,9 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr
+ QDir::separator() + QLatin1String("OfflineStorage");
#endif
+#ifndef QT_NO_XMLSTREAMREADER
qt_add_qmlxmlhttprequest(this);
+#endif
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.
@@ -296,7 +331,7 @@ QDeclarativeScriptEngine::QDeclarativeScriptEngine(QDeclarativeEnginePrivate *pr
qtObject.setProperty(QLatin1String("tint"), newFunction(QDeclarativeEnginePrivate::tint, 2));
}
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
//date/time formatting
qtObject.setProperty(QLatin1String("formatDate"),newFunction(QDeclarativeEnginePrivate::formatDate, 2));
qtObject.setProperty(QLatin1String("formatTime"),newFunction(QDeclarativeEnginePrivate::formatTime, 2));
@@ -545,9 +580,9 @@ void QDeclarativeEngine::clearComponentCache()
component instances should be added to sub-contexts parented to the
root context.
*/
-QDeclarativeContext *QDeclarativeEngine::rootContext()
+QDeclarativeContext *QDeclarativeEngine::rootContext() const
{
- Q_D(QDeclarativeEngine);
+ Q_D(const QDeclarativeEngine);
return d->rootContext;
}
@@ -1071,27 +1106,23 @@ QString QDeclarativeEnginePrivate::urlToLocalFileOrQrc(const QUrl& url)
\qmlmethod object Qt::createComponent(url)
Returns a \l Component object created using the QML file at the specified \a url,
-or \c null if there was an error in creating the component.
+or \c null if an empty string was given.
+
+The returned component's \l Component::status property indicates whether the
+component was successfully created. If the status is \c Component.Error,
+see \l Component::errorString() for an error description.
Call \l {Component::createObject()}{Component.createObject()} on the returned
component to create an object instance of the component.
-Here is an example. Notice it checks whether the component \l{Component::status}{status} is
-\c Component.Ready before calling \l {Component::createObject()}{createObject()}
-in case the QML file is loaded over a network and thus is not ready immediately.
-
-\snippet doc/src/snippets/declarative/componentCreation.js 0
-\codeline
-\snippet doc/src/snippets/declarative/componentCreation.js 1
+For example:
-If you are certain the files will be local, you could simplify to:
+\snippet doc/src/snippets/declarative/createComponent-simple.qml 0
-\snippet doc/src/snippets/declarative/componentCreation.js 2
+See \l {Dynamic Object Management} for more information on using this function.
To create a QML object from an arbitrary string of QML (instead of a file),
use \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()}.
-
-\sa {Dynamic Object Management}
*/
QScriptValue QDeclarativeEnginePrivate::createComponent(QScriptContext *ctxt, QScriptEngine *engine)
@@ -1140,7 +1171,7 @@ Note that this function returns immediately, and therefore may not work if
the \a qml string loads new components (that is, external QML files that have not yet been loaded).
If this is the case, consider using \l{QML:Qt::createComponent()}{Qt.createComponent()} instead.
-\sa {Dynamic Object Management}
+See \l {Dynamic Object Management} for more information on using this function.
*/
QScriptValue QDeclarativeEnginePrivate::createQmlObject(QScriptContext *ctxt, QScriptEngine *engine)
@@ -1265,7 +1296,7 @@ QScriptValue QDeclarativeEnginePrivate::vector3d(QScriptContext *ctxt, QScriptEn
\qmlmethod string Qt::formatDate(datetime date, variant format)
Returns the string representation of \c date, formatted according to \c format.
*/
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
QScriptValue QDeclarativeEnginePrivate::formatDate(QScriptContext*ctxt, QScriptEngine*engine)
{
int argCount = ctxt->argumentCount();
@@ -1406,7 +1437,7 @@ QScriptValue QDeclarativeEnginePrivate::formatDateTime(QScriptContext*ctxt, QScr
}
return engine->newVariant(qVariantFromValue(date.toString(enumFormat)));
}
-#endif // QT_NO_TEXTDATE
+#endif // QT_NO_DATESTRING
/*!
\qmlmethod color Qt::rgba(real red, real green, real blue, real alpha)
diff --git a/src/declarative/qml/qdeclarativeengine.h b/src/declarative/qml/qdeclarativeengine.h
index 01487f5ae4..d971d8052b 100644
--- a/src/declarative/qml/qdeclarativeengine.h
+++ b/src/declarative/qml/qdeclarativeengine.h
@@ -74,7 +74,7 @@ public:
QDeclarativeEngine(QObject *p = 0);
virtual ~QDeclarativeEngine();
- QDeclarativeContext *rootContext();
+ QDeclarativeContext *rootContext() const;
void clearComponentCache();
diff --git a/src/declarative/qml/qdeclarativeengine_p.h b/src/declarative/qml/qdeclarativeengine_p.h
index a5c8c388d1..3b5dd5a3f9 100644
--- a/src/declarative/qml/qdeclarativeengine_p.h
+++ b/src/declarative/qml/qdeclarativeengine_p.h
@@ -304,7 +304,7 @@ public:
static QScriptValue consoleLog(QScriptContext*, QScriptEngine*);
static QScriptValue quit(QScriptContext*, QScriptEngine*);
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
static QScriptValue formatDate(QScriptContext*, QScriptEngine*);
static QScriptValue formatTime(QScriptContext*, QScriptEngine*);
static QScriptValue formatDateTime(QScriptContext*, QScriptEngine*);
diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp
index 001da4612d..18373663b8 100644
--- a/src/declarative/qml/qdeclarativeenginedebug.cpp
+++ b/src/declarative/qml/qdeclarativeenginedebug.cpp
@@ -485,24 +485,22 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId,
if (object && context) {
+ QDeclarativeProperty property(object, propertyName, context);
if (isLiteralValue) {
- QDeclarativeProperty literalProperty(object, propertyName, context);
- literalProperty.write(expression);
+ property.write(expression);
+ } else if (hasValidSignal(object, propertyName)) {
+ QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString());
+ QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression);
+ } else if (property.isProperty()) {
+ QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context);
+ binding->setTarget(property);
+ binding->setNotifyOnValueChanged(true);
+ QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding);
+ if (oldBinding)
+ oldBinding->destroy();
+ binding->update();
} else {
- if (hasValidSignal(object, propertyName)) {
- QDeclarativeProperty property(object, propertyName);
- QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString());
- QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression);
- } else {
- QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context);
- QDeclarativeProperty property(object, propertyName);
- binding->setTarget(property);
- binding->setNotifyOnValueChanged(true);
- QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding);
- if (oldBinding)
- oldBinding->destroy();
- binding->update();
- }
+ qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object;
}
}
}
diff --git a/src/declarative/qml/qdeclarativeerror.cpp b/src/declarative/qml/qdeclarativeerror.cpp
index 8717f568ef..0ab5cd9b5f 100644
--- a/src/declarative/qml/qdeclarativeerror.cpp
+++ b/src/declarative/qml/qdeclarativeerror.cpp
@@ -250,7 +250,9 @@ QDebug operator<<(QDebug debug, const QDeclarativeError &error)
if (f.open(QIODevice::ReadOnly)) {
QByteArray data = f.readAll();
QTextStream stream(data, QIODevice::ReadOnly);
+#ifndef QT_NO_TEXTCODEC
stream.setCodec("UTF-8");
+#endif
const QString code = stream.readAll();
const QStringList lines = code.split(QLatin1Char('\n'));
diff --git a/src/declarative/qml/qdeclarativeexpression.cpp b/src/declarative/qml/qdeclarativeexpression.cpp
index 9935e384a7..585fb69728 100644
--- a/src/declarative/qml/qdeclarativeexpression.cpp
+++ b/src/declarative/qml/qdeclarativeexpression.cpp
@@ -604,6 +604,7 @@ QScriptValue QDeclarativeExpressionPrivate::scriptValue(QObject *secondaryScope,
scriptContext->pushScope(ep->globalClass->staticGlobalObject());
QDeclarativeRewrite::RewriteBinding rewriteBinding;
+ rewriteBinding.setName(name);
bool ok = true;
const QString code = rewriteBinding(expression, &ok);
if (ok)
diff --git a/src/declarative/qml/qdeclarativeexpression_p.h b/src/declarative/qml/qdeclarativeexpression_p.h
index b629e204f1..1700335be9 100644
--- a/src/declarative/qml/qdeclarativeexpression_p.h
+++ b/src/declarative/qml/qdeclarativeexpression_p.h
@@ -194,6 +194,7 @@ public:
QString url; // This is a QString for a reason. QUrls are slooooooow...
int line;
+ QByteArray name; //function name, hint for the debugger
};
QDeclarativeQtScriptExpression::DeleteWatcher::DeleteWatcher(QDeclarativeQtScriptExpression *data)
diff --git a/src/declarative/qml/qdeclarativeextensionplugin.cpp b/src/declarative/qml/qdeclarativeextensionplugin.cpp
index 0660599ff7..9b5eb613f1 100644
--- a/src/declarative/qml/qdeclarativeextensionplugin.cpp
+++ b/src/declarative/qml/qdeclarativeextensionplugin.cpp
@@ -50,23 +50,76 @@ QT_BEGIN_NAMESPACE
\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 registerTypes()
- function, and exporting the class using the Q_EXPORT_PLUGIN2()
- macro.
+ QDeclarativeExtensionPlugin is a plugin interface that makes it possible to
+ create QML extensions that can be loaded dynamically into QML applications.
+ These extensions allow custom QML types to be made available to the QML engine.
+
+ To write a QML extension plugin:
+
+ \list
+ \o Subclass QDeclarativeExtensionPlugin, implement registerTypes() method
+ to register types using qmlRegisterType(), and export the class using the Q_EXPORT_PLUGIN2() macro
+ \o Write an appropriate project file for the plugin
+ \o Create a \l{Writing a qmldir file}{qmldir file} to describe the plugin
+ \endlist
QML extension plugins can be used to provide either application-specific or
library-like plugins. Library plugins should limit themselves to registering types,
as any manipulation of the engine's root context may cause conflicts
or other issues in the library user's code.
- See \l {Tutorial: Writing QML extensions with C++} for details on creating
- QML extensions, including how to build a plugin with with QDeclarativeExtensionPlugin.
- For a simple overview, see the \l{declarative/cppextensions/plugins}{plugins} example.
+
+ \section1 An example
+
+ Suppose there is a new \c TimeModel C++ class that should be made available
+ as a new QML element. It provides the current time through \c hour and \c minute
+ properties, like this:
+
+ \snippet examples/declarative/cppextensions/plugins/plugin.cpp 0
+ \dots
+
+ To make this class available as a QML type, create a plugin that registers
+ this type with a specific \l {QML Modules}{module} using qmlRegisterType(). For this example the plugin
+ module will be named \c com.nokia.TimeExample (as defined in the project
+ file further below).
+
+ \snippet examples/declarative/cppextensions/plugins/plugin.cpp plugin
+ \codeline
+ \snippet examples/declarative/cppextensions/plugins/plugin.cpp export
+
+ This registers the \c TimeModel class with the 1.0 version of this
+ plugin library, as a QML type called \c Time. The Q_ASSERT statement
+ ensures the module is imported correctly by any QML components that use this plugin.
+
+ The project file defines the project as a plugin library and specifies
+ it should be built into the \c com/nokia/TimeExample directory:
+
+ \code
+ TEMPLATE = lib
+ CONFIG += qt plugin
+ QT += declarative
+
+ DESTDIR = com/nokia/TimeExample
+ TARGET = qmlqtimeexampleplugin
+ ...
+ \endcode
+
+ Finally, a \l{Writing a qmldir file}{qmldir file} is required in the \c com/nokia/TimeExample directory
+ that describes the plugin. This directory includes a \c Clock.qml file that
+ should be bundled with the plugin, so it needs to be specified in the \c qmldir
+ file:
+
+ \quotefile examples/declarative/cppextensions/plugins/com/nokia/TimeExample/qmldir
+
+ Once the project is built and installed, the new \c Time element can be
+ used by any QML component that imports the \c com.nokia.TimeExample module:
+
+ \snippet examples/declarative/cppextensions/plugins/plugins.qml 0
+
+ The full source code is available in the \l {declarative/cppextensions/plugins}{plugins example}.
+
+ The \l {Tutorial: Writing QML extensions with C++} also contains a chapter
+ on creating QML plugins.
\sa QDeclarativeEngine::importPlugin(), {How to Create Qt Plugins}
*/
@@ -95,7 +148,7 @@ QDeclarativeExtensionPlugin::QDeclarativeExtensionPlugin(QObject *parent)
}
/*!
- Destroys the plugin.
+ \internal
*/
QDeclarativeExtensionPlugin::~QDeclarativeExtensionPlugin()
{
diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp
index a294c386cb..241df875ee 100644
--- a/src/declarative/qml/qdeclarativeimageprovider.cpp
+++ b/src/declarative/qml/qdeclarativeimageprovider.cpp
@@ -212,9 +212,6 @@ QImage QDeclarativeImageProvider::requestImage(const QString &id, QSize *size, c
In all cases, \a size must be set to the original size of the image. This
is used to set the \l {Item::}{width} and \l {Item::}{height} of image
elements that should be automatically sized to the loaded image.
-
- \note this method may be called by multiple threads, so ensure the
- implementation of this method is reentrant.
*/
QPixmap QDeclarativeImageProvider::requestPixmap(const QString &id, QSize *size, const QSize& requestedSize)
{
diff --git a/src/declarative/qml/qdeclarativeinstruction_p.h b/src/declarative/qml/qdeclarativeinstruction_p.h
index d1a0a0a15f..f0b032c7dc 100644
--- a/src/declarative/qml/qdeclarativeinstruction_p.h
+++ b/src/declarative/qml/qdeclarativeinstruction_p.h
@@ -292,7 +292,8 @@ public:
struct StoreSignalInstruction {
int signalIndex;
int value;
- int context;
+ short context;
+ int name;
};
struct AssignSignalObjectInstruction {
int signal;
diff --git a/src/declarative/qml/qdeclarativelist.cpp b/src/declarative/qml/qdeclarativelist.cpp
index 7c89672da5..9598d98292 100644
--- a/src/declarative/qml/qdeclarativelist.cpp
+++ b/src/declarative/qml/qdeclarativelist.cpp
@@ -306,7 +306,7 @@ int QDeclarativeListReference::count() const
/*!
\class QDeclarativeListProperty
\since 4.7
-\brief The QDeclarativeListProperty class allows applications to explose list-like
+\brief The QDeclarativeListProperty class allows applications to expose list-like
properties to QML.
QML has many list properties, where more than one object value can be assigned.
diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp
index 153e2be4a6..a5c878f411 100644
--- a/src/declarative/qml/qdeclarativemetatype.cpp
+++ b/src/declarative/qml/qdeclarativemetatype.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#include <QtDeclarative/qdeclarativeprivate.h>
#include "private/qdeclarativemetatype_p.h"
#include "private/qdeclarativeproxymetaobject_p.h"
@@ -485,17 +486,17 @@ int QDeclarativeType::index() const
return d->m_index;
}
-int QDeclarativePrivate::registerAutoParentFunction(AutoParentFunction function)
+int registerAutoParentFunction(QDeclarativePrivate::RegisterAutoParent &autoparent)
{
QWriteLocker lock(metaTypeDataLock());
QDeclarativeMetaTypeData *data = metaTypeData();
- data->parentFunctions.append(function);
+ data->parentFunctions.append(autoparent.function);
return data->parentFunctions.count() - 1;
}
-int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterInterface &interface)
+int registerInterface(const QDeclarativePrivate::RegisterInterface &interface)
{
if (interface.version > 0)
qFatal("qmlRegisterType(): Cannot mix incompatible QML versions.");
@@ -524,7 +525,7 @@ int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterInterfa
return index;
}
-int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterType &type)
+int registerType(const QDeclarativePrivate::RegisterType &type)
{
if (type.elementName) {
for (int ii = 0; type.elementName[ii]; ++ii) {
@@ -576,6 +577,22 @@ int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterType &t
}
/*
+This method is "over generalized" to allow us to (potentially) register more types of things in
+the future without adding exported symbols.
+*/
+int QDeclarativePrivate::qmlregister(RegistrationType type, void *data)
+{
+ if (type == TypeRegistration) {
+ return registerType(*reinterpret_cast<RegisterType *>(data));
+ } else if (type == InterfaceRegistration) {
+ return registerInterface(*reinterpret_cast<RegisterInterface *>(data));
+ } else if (type == AutoParentRegistration) {
+ return registerAutoParentFunction(*reinterpret_cast<RegisterAutoParent *>(data));
+ }
+ return -1;
+}
+
+/*
Have any types been registered for \a module with at least versionMajor.versionMinor, and types
for \a module with at most versionMajor.versionMinor.
diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h
index 4c98b6f330..f41054774c 100644
--- a/src/declarative/qml/qdeclarativemetatype_p.h
+++ b/src/declarative/qml/qdeclarativemetatype_p.h
@@ -63,6 +63,8 @@ QT_BEGIN_NAMESPACE
class QDeclarativeType;
class QDeclarativeCustomParser;
+class QDeclarativeTypePrivate;
+
class Q_DECLARATIVE_EXPORT QDeclarativeMetaType
{
public:
@@ -103,7 +105,6 @@ public:
static QList<QDeclarativePrivate::AutoParentFunction> parentFunctions();
};
-class QDeclarativeTypePrivate;
class Q_DECLARATIVE_EXPORT QDeclarativeType
{
public:
@@ -144,11 +145,12 @@ public:
int propertyValueInterceptorCast() const;
int index() const;
+
private:
friend class QDeclarativeTypePrivate;
friend struct QDeclarativeMetaTypeData;
- friend int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterInterface &);
- friend int QDeclarativePrivate::registerType(const QDeclarativePrivate::RegisterType &);
+ friend int registerType(const QDeclarativePrivate::RegisterType &);
+ friend int registerInterface(const QDeclarativePrivate::RegisterInterface &);
QDeclarativeType(int, const QDeclarativePrivate::RegisterInterface &);
QDeclarativeType(int, const QDeclarativePrivate::RegisterType &);
~QDeclarativeType();
diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h
index cd859fe88d..b2d74517c1 100644
--- a/src/declarative/qml/qdeclarativeprivate.h
+++ b/src/declarative/qml/qdeclarativeprivate.h
@@ -42,6 +42,17 @@
#ifndef QDECLARATIVEPRIVATE_H
#define QDECLARATIVEPRIVATE_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>
#ifndef Q_OS_WIN
@@ -177,6 +188,9 @@ namespace QDeclarativePrivate
return AttachedPropertySelector<T, has_attachedPropertiesMethod<T, has_attachedPropertiesMember<T>::value>::value>::metaObject();
}
+ enum AutoParentResult { Parented, IncompatibleObject, IncompatibleParent };
+ typedef AutoParentResult (*AutoParentFunction)(QObject *object, QObject *parent);
+
struct RegisterType {
int version;
@@ -214,13 +228,19 @@ namespace QDeclarativePrivate
const char *iid;
};
- enum AutoParentResult { Parented, IncompatibleObject, IncompatibleParent };
- typedef AutoParentResult (*AutoParentFunction)(QObject *object, QObject *parent);
+ struct RegisterAutoParent {
+ int version;
- int Q_DECLARATIVE_EXPORT registerAutoParentFunction(AutoParentFunction);
- int Q_DECLARATIVE_EXPORT registerType(const RegisterType &);
- int Q_DECLARATIVE_EXPORT registerType(const RegisterInterface &);
+ AutoParentFunction function;
+ };
+
+ enum RegistrationType {
+ TypeRegistration = 0,
+ InterfaceRegistration = 1,
+ AutoParentRegistration = 2
+ };
+ int Q_DECLARATIVE_EXPORT qmlregister(RegistrationType, void *);
}
QT_END_NAMESPACE
diff --git a/src/declarative/qml/qdeclarativerewrite.cpp b/src/declarative/qml/qdeclarativerewrite.cpp
index 3d40e77653..bc9a114353 100644
--- a/src/declarative/qml/qdeclarativerewrite.cpp
+++ b/src/declarative/qml/qdeclarativerewrite.cpp
@@ -102,7 +102,7 @@ QString RewriteBinding::rewrite(QString code, unsigned position,
unsigned startOfStatement = node->firstSourceLocation().begin() - _position;
unsigned endOfStatement = node->lastSourceLocation().end() - _position;
- _writer->replace(startOfStatement, 0, QLatin1String("(function() { "));
+ _writer->replace(startOfStatement, 0, QLatin1String("(function ") + QString::fromUtf8(_name) + QLatin1String("() { "));
_writer->replace(endOfStatement, 0, QLatin1String(" })"));
if (rewriteDump()) {
diff --git a/src/declarative/qml/qdeclarativerewrite_p.h b/src/declarative/qml/qdeclarativerewrite_p.h
index 33b168c69e..6f3c46e5f5 100644
--- a/src/declarative/qml/qdeclarativerewrite_p.h
+++ b/src/declarative/qml/qdeclarativerewrite_p.h
@@ -78,10 +78,14 @@ class RewriteBinding: protected AST::Visitor
{
unsigned _position;
TextWriter *_writer;
+ QByteArray _name;
public:
QString operator()(const QString &code, bool *ok = 0);
+ //name of the function: used for the debugger
+ void setName(const QByteArray &name) { _name = name; }
+
protected:
using AST::Visitor::visit;
diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp
index 219d7593a1..f703cf5edd 100644
--- a/src/declarative/qml/qdeclarativescriptparser.cpp
+++ b/src/declarative/qml/qdeclarativescriptparser.cpp
@@ -831,7 +831,9 @@ bool QDeclarativeScriptParser::parse(const QByteArray &qmldata, const QUrl &url)
_scriptFile = fileName;
QTextStream stream(qmldata, QIODevice::ReadOnly);
+#ifndef QT_NO_TEXTCODEC
stream.setCodec("UTF-8");
+#endif
const QString code = stream.readAll();
data = new QDeclarativeScriptParserJsASTData(fileName);
@@ -896,6 +898,14 @@ QList<QDeclarativeError> QDeclarativeScriptParser::errors() const
return _errors;
}
+static void replaceWithSpace(QString &str, int idx, int n)
+{
+ QChar *data = str.data() + idx;
+ QChar space(' ');
+ for (int ii = 0; ii < n; ++ii)
+ *data++ = space;
+}
+
/*
Searches for ".pragma <value>" declarations within \a script. Currently supported pragmas
are:
@@ -905,83 +915,48 @@ QDeclarativeParser::Object::ScriptBlock::Pragmas QDeclarativeScriptParser::extra
{
QDeclarativeParser::Object::ScriptBlock::Pragmas rv = QDeclarativeParser::Object::ScriptBlock::None;
- const QChar forwardSlash(QLatin1Char('/'));
- const QChar star(QLatin1Char('*'));
- const QChar newline(QLatin1Char('\n'));
- const QChar dot(QLatin1Char('.'));
- const QChar semicolon(QLatin1Char(';'));
- const QChar space(QLatin1Char(' '));
- const QString pragma(QLatin1String(".pragma "));
-
- const QChar *pragmaData = pragma.constData();
-
- const QChar *data = script.constData();
- const int length = script.count();
- for (int ii = 0; ii < length; ++ii) {
- const QChar &c = data[ii];
-
- if (c.isSpace())
- continue;
-
- if (c == forwardSlash) {
- ++ii;
- if (ii >= length)
- return rv;
-
- const QChar &c = data[ii];
- if (c == forwardSlash) {
- // Find next newline
- while (ii < length && data[++ii] != newline) {};
- } else if (c == star) {
- // Find next star
- while (true) {
- while (ii < length && data[++ii] != star) {};
- if (ii + 1 >= length)
- return rv;
-
- if (data[ii + 1] == forwardSlash) {
- ++ii;
- break;
- }
- }
- } else {
- return rv;
- }
- } else if (c == dot) {
- // Could be a pragma!
- if (ii + pragma.length() >= length ||
- 0 != ::memcmp(data + ii, pragmaData, sizeof(QChar) * pragma.length()))
- return rv;
+ const QString pragma(QLatin1String("pragma"));
+ const QString library(QLatin1String("library"));
- int pragmaStatementIdx = ii;
+ QDeclarativeJS::Lexer l(0);
+ l.setCode(script, 0);
- ii += pragma.length();
+ int token = l.lex();
- while (ii < length && data[ii].isSpace()) { ++ii; }
+ while (true) {
+ if (token != QDeclarativeJSGrammar::T_DOT)
+ return rv;
- int startIdx = ii;
+ int startOffset = l.tokenOffset();
+ int startLine = l.currentLineNo();
- while (ii < length && data[ii].isLetter()) { ++ii; }
+ token = l.lex();
- int endIdx = ii;
+ if (token != QDeclarativeJSGrammar::T_IDENTIFIER ||
+ l.currentLineNo() != startLine ||
+ script.mid(l.tokenOffset(), l.tokenLength()) != pragma)
+ return rv;
- if (ii != length && data[ii] != forwardSlash && !data[ii].isSpace() && data[ii] != semicolon)
- return rv;
+ token = l.lex();
- QString p(data + startIdx, endIdx - startIdx);
+ if (token != QDeclarativeJSGrammar::T_IDENTIFIER ||
+ l.currentLineNo() != startLine)
+ return rv;
- if (p == QLatin1String("library"))
- rv |= QDeclarativeParser::Object::ScriptBlock::Shared;
- else
- return rv;
+ QString pragmaValue = script.mid(l.tokenOffset(), l.tokenLength());
+ int endOffset = l.tokenLength() + l.tokenOffset();
- for (int jj = pragmaStatementIdx; jj < endIdx; ++jj) script[jj] = space;
+ token = l.lex();
+ if (l.currentLineNo() == startLine)
+ return rv;
+ if (pragmaValue == QLatin1String("library")) {
+ rv |= QDeclarativeParser::Object::ScriptBlock::Shared;
+ replaceWithSpace(script, startOffset, endOffset - startOffset);
} else {
return rv;
}
}
-
return rv;
}
diff --git a/src/declarative/qml/qdeclarativestringconverters.cpp b/src/declarative/qml/qdeclarativestringconverters.cpp
index 8bd2cf1c2c..7534a2c0c5 100644
--- a/src/declarative/qml/qdeclarativestringconverters.cpp
+++ b/src/declarative/qml/qdeclarativestringconverters.cpp
@@ -106,14 +106,14 @@ QVariant QDeclarativeStringConverters::variantFromString(const QString &s, int p
return QVariant(uint(qRound(s.toDouble(ok))));
case QMetaType::QColor:
return QVariant::fromValue(colorFromString(s, ok));
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
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));
-#endif // QT_NO_TEXTDATE
+#endif // QT_NO_DATESTRING
case QMetaType::QPointF:
return QVariant::fromValue(pointFFromString(s, ok));
case QMetaType::QPoint:
@@ -152,7 +152,7 @@ QColor QDeclarativeStringConverters::colorFromString(const QString &s, bool *ok)
}
}
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
QDate QDeclarativeStringConverters::dateFromString(const QString &s, bool *ok)
{
QDate d = QDate::fromString(s, Qt::ISODate);
@@ -173,7 +173,7 @@ QDateTime QDeclarativeStringConverters::dateTimeFromString(const QString &s, boo
if (ok) *ok = d.isValid();
return d;
}
-#endif // QT_NO_TEXTDATE
+#endif // QT_NO_DATESTRING
//expects input of "x,y"
QPointF QDeclarativeStringConverters::pointFFromString(const QString &s, bool *ok)
diff --git a/src/declarative/qml/qdeclarativestringconverters_p.h b/src/declarative/qml/qdeclarativestringconverters_p.h
index 842d1b3aa6..e6b0abeda4 100644
--- a/src/declarative/qml/qdeclarativestringconverters_p.h
+++ b/src/declarative/qml/qdeclarativestringconverters_p.h
@@ -73,7 +73,7 @@ namespace QDeclarativeStringConverters
QVariant Q_DECLARATIVE_EXPORT variantFromString(const QString &, int preferredType, bool *ok = 0);
QColor Q_DECLARATIVE_EXPORT colorFromString(const QString &, bool *ok = 0);
-#ifndef QT_NO_TEXTDATE
+#ifndef QT_NO_DATESTRING
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);
diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp
index c17ec950cc..98e9a585fb 100644
--- a/src/declarative/qml/qdeclarativevaluetype.cpp
+++ b/src/declarative/qml/qdeclarativevaluetype.cpp
@@ -74,7 +74,7 @@ int qmlRegisterValueTypeEnums(const char *qmlName)
0
};
- return QDeclarativePrivate::registerType(type);
+ return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type);
}
QDeclarativeValueTypeFactory::QDeclarativeValueTypeFactory()
@@ -973,7 +973,7 @@ qreal QDeclarativeFontValueType::letterSpacing() const
void QDeclarativeFontValueType::setLetterSpacing(qreal size)
{
- font.setLetterSpacing(QFont::PercentageSpacing, size);
+ font.setLetterSpacing(QFont::AbsoluteSpacing, size);
}
qreal QDeclarativeFontValueType::wordSpacing() const
diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp
index 3247f854f2..4e41c22c7c 100644
--- a/src/declarative/qml/qdeclarativevme.cpp
+++ b/src/declarative/qml/qdeclarativevme.cpp
@@ -621,14 +621,15 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack<QObject *> &stack,
case QDeclarativeInstruction::StoreSignal:
{
QObject *target = stack.top();
- QObject *context = stack.at(stack.count() - 1 - instr.assignBinding.context);
-
+ QObject *context = stack.at(stack.count() - 1 - instr.storeSignal.context);
+
QMetaMethod signal = target->metaObject()->method(instr.storeSignal.signalIndex);
QDeclarativeBoundSignal *bs = new QDeclarativeBoundSignal(target, signal, target);
QDeclarativeExpression *expr =
new QDeclarativeExpression(ctxt, context, primitives.at(instr.storeSignal.value));
expr->setSourceLocation(comp->name, instr.line);
+ static_cast<QDeclarativeExpressionPrivate *>(QObjectPrivate::get(expr))->name = datas.at(instr.storeSignal.name);
bs->setExpression(expr);
}
break;
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
index acd1f511eb..ff1a0e98ae 100644
--- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp
+++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp
@@ -58,6 +58,8 @@
#include <QtCore/qstack.h>
#include <QtCore/qdebug.h>
+#ifndef QT_NO_XMLSTREAMREADER
+
// From DOM-Level-3-Core spec
// http://www.w3.org/TR/DOM-Level-3-Core/core.html
#define INDEX_SIZE_ERR 1
@@ -1304,10 +1306,11 @@ QString QDeclarativeXMLHttpRequest::responseBody() const
{
QXmlStreamReader reader(m_responseEntityBody);
reader.readNext();
+#ifndef QT_NO_TEXTCODEC
QTextCodec *codec = QTextCodec::codecForName(reader.documentEncoding().toString().toUtf8());
if (codec)
return codec->toUnicode(m_responseEntityBody);
-
+#endif
return QString::fromUtf8(m_responseEntityBody);
}
@@ -1662,4 +1665,6 @@ void qt_add_qmlxmlhttprequest(QScriptEngine *engine)
QT_END_NAMESPACE
+#endif // QT_NO_XMLSTREAMREADER
+
#include <qdeclarativexmlhttprequest.moc>
diff --git a/src/declarative/qml/qdeclarativexmlhttprequest_p.h b/src/declarative/qml/qdeclarativexmlhttprequest_p.h
index 068cd0fb3e..f340c1c4e6 100644
--- a/src/declarative/qml/qdeclarativexmlhttprequest_p.h
+++ b/src/declarative/qml/qdeclarativexmlhttprequest_p.h
@@ -56,6 +56,8 @@
#include <QtCore/qglobal.h>
+#ifndef QT_NO_XMLSTREAMREADER
+
QT_BEGIN_NAMESPACE
class QScriptEngine;
@@ -63,5 +65,7 @@ void qt_add_qmlxmlhttprequest(QScriptEngine *engine);
QT_END_NAMESPACE
+#endif // QT_NO_XMLSTREAMREADER
+
#endif // QDECLARATIVEXMLHTTPREQUEST_P_H
diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp
index bdb9510549..6a9cf95834 100644
--- a/src/declarative/util/qdeclarativeanimation.cpp
+++ b/src/declarative/util/qdeclarativeanimation.cpp
@@ -632,15 +632,26 @@ QAbstractAnimation *QDeclarativePauseAnimation::qtAnimation()
\qmlclass ColorAnimation QDeclarativeColorAnimation
\since 4.7
\inherits PropertyAnimation
- \brief The ColorAnimation element allows you to animate color changes.
+ \brief The ColorAnimation element animates changes in color values.
- \code
- ColorAnimation { from: "white"; to: "#c0c0c0"; duration: 100 }
- \endcode
+ ColorAnimation is a specialized PropertyAnimation that defines an
+ animation to be applied when a color value changes.
+
+ Here is a ColorAnimation applied to the \c color property of a \l Rectangle
+ as a property value source. It animates the \c color property's value from
+ its current value to a value of "red", over 1000 milliseconds:
+
+ \snippet doc/src/snippets/declarative/coloranimation.qml 0
+
+ Like any other animation element, a ColorAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
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.
+ all properties of type color that have changed. If a \l{PropertyAnimation::}{property}
+ or \l{PropertyAnimation::}{properties} are explicitly set for the animation,
+ then those are used instead.
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -664,7 +675,24 @@ QDeclarativeColorAnimation::~QDeclarativeColorAnimation()
/*!
\qmlproperty color ColorAnimation::from
- This property holds the starting color.
+ This property holds the color value at which the animation should begin.
+
+ For example, the following animation is not applied until a color value
+ has reached "#c0c0c0":
+
+ \qml
+ Item {
+ states: [ ... ]
+
+ transition: Transition {
+ NumberAnimation { from: "#c0c0c0"; duration: 2000 }
+ }
+ }
+ \endqml
+
+ If this value is not set and the ColorAnimation is defined within
+ a \l Transition, it defaults to the value defined in the starting
+ state of the \l Transition.
*/
QColor QDeclarativeColorAnimation::from() const
{
@@ -679,7 +707,12 @@ void QDeclarativeColorAnimation::setFrom(const QColor &f)
/*!
\qmlproperty color ColorAnimation::to
- This property holds the ending color.
+
+ This property holds the color value at which the animation should end.
+
+ If this value is not set and the ColorAnimation is defined within
+ a \l Transition or \l Behavior, it defaults to the value defined in the end
+ state of the \l Transition or \l Behavior.
*/
QColor QDeclarativeColorAnimation::to() const
{
@@ -848,18 +881,27 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation()
\inherits Animation
\brief The PropertyAction element allows immediate property changes during animation.
- Explicitly set \c theimage.smooth=true during a transition:
+ PropertyAction is used to specify an immediate property change
+ during an animation. The property change is not animated.
+
+ For example, to explicitly set \c {theImage.smooth = true} during a \l Transition:
\code
- PropertyAction { target: theimage; property: "smooth"; value: true }
+ transitions: Transition {
+ ...
+ PropertyAction { target: theImage; property: "smooth"; value: true }
+ ...
+ }
\endcode
- Set \c thewebview.url to the value set for the destination state:
+ Or, to set \c theWebView.url to the value set for the destination state:
\code
- PropertyAction { target: thewebview; property: "url" }
+ transitions: Transition {
+ ...
+ PropertyAction { target: theWebView; property: "url" }
+ ...
+ }
\endcode
- The PropertyAction is immediate -
- the target property is not animated to the selected value in any way.
\sa QtDeclarative
*/
@@ -885,14 +927,6 @@ void QDeclarativePropertyActionPrivate::init()
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 {QML Animation} documentation for details.
-*/
-
QObject *QDeclarativePropertyAction::target() const
{
Q_D(const QDeclarativePropertyAction);
@@ -905,7 +939,7 @@ void QDeclarativePropertyAction::setTarget(QObject *o)
if (d->target == o)
return;
d->target = o;
- emit targetChanged(d->target, d->propertyName);
+ emit targetChanged();
}
QString QDeclarativePropertyAction::property() const
@@ -920,16 +954,16 @@ void QDeclarativePropertyAction::setProperty(const QString &n)
if (d->propertyName == n)
return;
d->propertyName = n;
- emit targetChanged(d->target, d->propertyName);
+ emit propertyChanged();
}
/*!
+ \qmlproperty Object PropertyAction::target
\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
+ These properties determine the items and their properties that are
affected by this action.
The details of how these properties are interpreted in different situations
@@ -961,7 +995,7 @@ QDeclarativeListProperty<QObject> QDeclarativePropertyAction::targets()
/*!
\qmlproperty list<Object> PropertyAction::exclude
- This property holds the objects not to be affected by this animation.
+ This property holds the objects that should not be affected by this action.
\sa targets
*/
@@ -1096,13 +1130,25 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions,
\qmlclass NumberAnimation QDeclarativeNumberAnimation
\since 4.7
\inherits PropertyAnimation
- \brief The NumberAnimation element allows you to animate changes in properties of type qreal.
+ \brief The NumberAnimation element animates changes in qreal-type values.
- For example, to 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
+ NumberAnimation is a specialized PropertyAnimation that defines an
+ animation to be applied when a numerical value changes.
+
+ Here is a NumberAnimation applied to the \c x property of a \l Rectangle
+ as a property value source. It animates the \c x value from its current
+ value to a value of 50, over 1000 milliseconds:
+
+ \snippet doc/src/snippets/declarative/numberanimation.qml 0
+
+ Like any other animation element, a NumberAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
+ Note that NumberAnimation may not animate smoothly if there are irregular
+ changes in the number value that it is tracking. If this is the case, use
+ SmoothedAnimation instead.
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1137,9 +1183,26 @@ void QDeclarativeNumberAnimation::init()
/*!
\qmlproperty real NumberAnimation::from
- This property holds the starting value.
- If not set, then the value defined in the start state of the transition.
+ This property holds the starting number value.
+
+ For example, the following animation is not applied until the \c x value
+ has reached 100:
+
+ \qml
+ Item {
+ states: [ ... ]
+
+ transition: Transition {
+ NumberAnimation { properties: "x"; from: 100; duration: 200 }
+ }
+ }
+ \endqml
+
+ If this value is not set and the NumberAnimation is defined within
+ a \l Transition, it defaults to the value defined in the start
+ state of the \l Transition.
*/
+
qreal QDeclarativeNumberAnimation::from() const
{
Q_D(const QDeclarativePropertyAnimation);
@@ -1153,8 +1216,11 @@ void QDeclarativeNumberAnimation::setFrom(qreal 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.
+ This property holds the ending number value.
+
+ If this value is not set and the NumberAnimation is defined within
+ a \l Transition or \l Behavior, it defaults to the value defined in the end
+ state of the \l Transition or \l Behavior.
*/
qreal QDeclarativeNumberAnimation::to() const
{
@@ -1173,7 +1239,10 @@ void QDeclarativeNumberAnimation::setTo(qreal t)
\qmlclass Vector3dAnimation QDeclarativeVector3dAnimation
\since 4.7
\inherits PropertyAnimation
- \brief The Vector3dAnimation element allows you to animate changes in properties of type QVector3d.
+ \brief The Vector3dAnimation element animates changes in QVector3d values.
+
+ Vector3dAnimation is a specialized PropertyAnimation that defines an
+ animation to be applied when a Vector3d value changes.
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1199,7 +1268,9 @@ 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.
+
+ If this value is not set, it defaults to the value defined in the start
+ state of the \l Transition.
*/
QVector3D QDeclarativeVector3dAnimation::from() const
{
@@ -1215,7 +1286,9 @@ void QDeclarativeVector3dAnimation::setFrom(QVector3D 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.
+
+ If this value is not set, it defaults to the value defined in the end
+ state of the \l Transition or \l Behavior.
*/
QVector3D QDeclarativeVector3dAnimation::to() const
{
@@ -1234,31 +1307,32 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t)
\qmlclass RotationAnimation QDeclarativeRotationAnimation
\since 4.7
\inherits PropertyAnimation
- \brief The RotationAnimation element allows you to animate rotations.
+ \brief The RotationAnimation element animates changes in rotation values.
RotationAnimation is a specialized PropertyAnimation that gives control
- over the direction of rotation. By default, it will rotate in the direction
+ over the direction of rotation during an animation.
+
+ By default, it rotates in the direction
of the numerical change; a rotation from 0 to 240 will rotate 220 degrees
clockwise, while a rotation from 240 to 0 will rotate 220 degrees
- counterclockwise.
+ counterclockwise. The \l direction property can be set to specify the
+ direction in which the rotation should occur.
- When used in a transition RotationAnimation will rotate all
+ In the following example we use RotationAnimation to animate the rotation
+ between states via the shortest path:
+
+ \snippet doc/src/snippets/declarative/rotationanimation.qml 0
+
+ Notice the RotationAnimation did not need to set a \l {RotationAnimation::}{target}
+ value. As a convenience, when used in a transition, RotationAnimation will rotate all
properties named "rotation" or "angle". You can override this by providing
your own properties via \l {PropertyAnimation::properties}{properties} or
\l {PropertyAnimation::property}{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 { direction: RotationAnimation.Shortest }
- }
- \endqml
+ Like any other animation element, a RotationAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1320,8 +1394,23 @@ 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.
+ This property holds the starting number value.
+
+ For example, the following animation is not applied until the \c angle value
+ has reached 100:
+
+ \qml
+ Item {
+ states: [ ... ]
+
+ transition: Transition {
+ RotationAnimation { properties: "angle"; from: 100; duration: 2000 }
+ }
+ }
+ \endqml
+
+ If this value is not set, it defaults to the value defined in the start
+ state of the \l Transition.
*/
qreal QDeclarativeRotationAnimation::from() const
{
@@ -1337,7 +1426,9 @@ void QDeclarativeRotationAnimation::setFrom(qreal 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.
+
+ If this value is not set, it defaults to the value defined in the end
+ state of the \l Transition or \l Behavior.
*/
qreal QDeclarativeRotationAnimation::to() const
{
@@ -1352,7 +1443,7 @@ void QDeclarativeRotationAnimation::setTo(qreal t)
/*!
\qmlproperty enumeration RotationAnimation::direction
- The direction in which to rotate.
+ This property holds the direction of the rotation.
Possible values are:
@@ -1445,20 +1536,31 @@ QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeAnimationGro
\qmlclass SequentialAnimation QDeclarativeSequentialAnimation
\since 4.7
\inherits Animation
- \brief The SequentialAnimation element allows you to run animations sequentially.
+ \brief The SequentialAnimation element allows animations to be run sequentially.
- Animations controlled in SequentialAnimation will be run one after the other.
+ The SequentialAnimation and ParallelAnimation elements allow multiple
+ animations to be run together. Animations defined in a SequentialAnimation
+ are run one after the other, while animations defined in a ParallelAnimation
+ are run at the same time.
- 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.
+ The following example runs two number animations in a sequence. The \l Rectangle
+ animates to a \c x position of 50, then to a \c y position of 50.
- \code
- SequentialAnimation {
- NumberAnimation { target: MyItem; property: "x"; to: 100 }
- NumberAnimation { target: MyItem; property: "x"; to: 0 }
- }
- \endcode
+ \snippet doc/src/snippets/declarative/sequentialanimation.qml 0
+
+ Animations defined within a \l Transition are automatically run in parallel,
+ so SequentialAnimation can be used to enclose the animations in a \l Transition
+ if this is the preferred behavior.
+ Like any other animation element, a SequentialAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
+ \note Once an animation has been grouped into a SequentialAnimation or
+ ParallelAnimation, it cannot be individually started and stopped; the
+ SequentialAnimation or ParallelAnimation must be started and stopped as a group.
+
\sa ParallelAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1507,19 +1609,26 @@ void QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actio
\qmlclass ParallelAnimation QDeclarativeParallelAnimation
\since 4.7
\inherits Animation
- \brief The ParallelAnimation element allows you to run animations in parallel.
+ \brief The ParallelAnimation element allows animations to be run in parallel.
- Animations contained in ParallelAnimation will be run at the same time.
+ The SequentialAnimation and ParallelAnimation elements allow multiple
+ animations to be run together. Animations defined in a SequentialAnimation
+ are run one after the other, while animations defined in a ParallelAnimation
+ are 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.
+ The following animation runs two number animations in parallel. The \l Rectangle
+ moves to (50,50) by animating its \c x and \c y properties at the same time.
- \code
- ParallelAnimation {
- NumberAnimation { target: MyItem; property: "x"; to: 100 }
- NumberAnimation { target: MyItem; property: "y"; to: 100 }
- }
- \endcode
+ \snippet doc/src/snippets/declarative/parallelanimation.qml 0
+
+ Like any other animation element, a ParallelAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
+ \note Once an animation has been grouped into a SequentialAnimation or
+ ParallelAnimation, it cannot be individually started and stopped; the
+ SequentialAnimation or ParallelAnimation must be started and stopped as a group.
\sa SequentialAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1618,59 +1727,60 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int
\qmlclass PropertyAnimation QDeclarativePropertyAnimation
\since 4.7
\inherits Animation
- \brief The PropertyAnimation element allows you to animate property changes.
+ \brief The PropertyAnimation element animates changes in property values.
+
+ PropertyAnimation provides a way to animate changes to a property's value.
- PropertyAnimation provides a way to animate changes to a property's value. It can
- be used in many different situations:
+ It can be used to define animations in a number of ways:
+
\list
- \o In a Transition
+ \o In a \l Transition
+
+ For example, to animate any objects that have changed their \c x or \c y properties
+ as a result of a state change, using an \c InOutQuad easing curve:
+
+ \snippet doc/src/snippets/declarative/propertyanimation.qml transition
+
+
+ \o In a \l Behavior
+
+ For example, to animate all changes to a rectangle's \c x property:
+
+ \snippet doc/src/snippets/declarative/propertyanimation.qml behavior
- 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: Easing.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 {
- loops: Animation.Infinite
- PropertyAnimation { to: 50 }
- PropertyAnimation { to: 0 }
- }
- }
- \endqml
+ For example, to repeatedly animate the rectangle's \c x property:
+
+ \snippet doc/src/snippets/declarative/propertyanimation.qml propertyvaluesource
+
+
\o In a signal handler
- Fade out \c theObject when clicked:
+ For example, to 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
+ For example, to animate \c rect's \c width property over 500ms, from its current width to 30:
+
+ \snippet doc/src/snippets/declarative/propertyanimation.qml standalone
+
\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.
+ Note that PropertyAnimation inherits the abstract \l Animation element.
+ This includes additional properties and methods for controlling the animation.
+
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -1827,15 +1937,15 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t)
\o \inlineimage qeasingcurve-inquart.png
\row
\o \c Easing.OutQuart
- \o Easing curve for a cubic (t^4) function: decelerating from zero velocity.
+ \o Easing curve for a quartic (t^4) function: decelerating from zero velocity.
\o \inlineimage qeasingcurve-outquart.png
\row
\o \c Easing.InOutQuart
- \o Easing curve for a cubic (t^4) function: acceleration until halfway, then deceleration.
+ \o Easing curve for a quartic (t^4) function: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutquart.png
\row
\o \c Easing.OutInQuart
- \o Easing curve for a cubic (t^4) function: deceleration until halfway, then acceleration.
+ \o Easing curve for a quartic (t^4) function: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outinquart.png
\row
\o \c Easing.InQuint
@@ -1843,15 +1953,15 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t)
\o \inlineimage qeasingcurve-inquint.png
\row
\o \c Easing.OutQuint
- \o Easing curve for a cubic (t^5) function: decelerating from zero velocity.
+ \o Easing curve for a quintic (t^5) function: decelerating from zero velocity.
\o \inlineimage qeasingcurve-outquint.png
\row
\o \c Easing.InOutQuint
- \o Easing curve for a cubic (t^5) function: acceleration until halfway, then deceleration.
+ \o Easing curve for a quintic (t^5) function: acceleration until halfway, then deceleration.
\o \inlineimage qeasingcurve-inoutquint.png
\row
\o \c Easing.OutInQuint
- \o Easing curve for a cubic (t^5) function: deceleration until halfway, then acceleration.
+ \o Easing curve for a quintic (t^5) function: deceleration until halfway, then acceleration.
\o \inlineimage qeasingcurve-outinquint.png
\row
\o \c Easing.InSine
@@ -1969,17 +2079,16 @@ void QDeclarativePropertyAnimation::setTo(const QVariant &t)
QEasingCurve QDeclarativePropertyAnimation::easing() const
{
Q_D(const QDeclarativePropertyAnimation);
- return d->easing;
+ return d->va->easingCurve();
}
void QDeclarativePropertyAnimation::setEasing(const QEasingCurve &e)
{
Q_D(QDeclarativePropertyAnimation);
- if (d->easing == e)
+ if (d->va->easingCurve() == e)
return;
- d->easing = e;
- d->va->setEasingCurve(d->easing);
+ d->va->setEasingCurve(e);
emit easingChanged(e);
}
@@ -1995,7 +2104,7 @@ void QDeclarativePropertyAnimation::setTarget(QObject *o)
if (d->target == o)
return;
d->target = o;
- emit targetChanged(d->target, d->propertyName);
+ emit targetChanged();
}
QString QDeclarativePropertyAnimation::property() const
@@ -2010,7 +2119,7 @@ void QDeclarativePropertyAnimation::setProperty(const QString &n)
if (d->propertyName == n)
return;
d->propertyName = n;
- emit targetChanged(d->target, d->propertyName);
+ emit propertyChanged();
}
QString QDeclarativePropertyAnimation::properties() const
@@ -2285,43 +2394,30 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions
\qmlclass ParentAnimation QDeclarativeParentAnimation
\since 4.7
\inherits Animation
- \brief The ParentAnimation element allows you to animate parent changes.
+ \brief The ParentAnimation element animates changes in parent values.
- 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.
+ ParentAnimation defines an animation to applied when a ParentChange
+ occurs. This allows parent changes to be smoothly animated.
- \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
+ For example, the following ParentChange changes \c blueRect to become
+ a child of \c redRect when it is clicked. The inclusion of the
+ ParentAnimation, which defines a NumberAnimation to be applied during
+ the transition, ensures the item animates smoothly as it moves to
+ its new parent:
- ParentAnimation can wrap any number of animations -- those animations will
- be run in parallel (like those in a ParallelAnimation group).
+ \snippet doc/src/snippets/declarative/parentanimation.qml 0
- In some cases, such as reparenting between items with clipping, it's useful
- to animate the parent change via another item with no clipping.
+ A ParentAnimation can contain any number of animations. These animations will
+ be run in parallel; to run them sequentially, define them within a
+ SequentialAnimation.
- When used in a transition, ParentAnimation will by default animate
- all ParentChanges.
+ In some cases, such as when reparenting between items with clipping enabled, it is useful
+ to animate the parent change via another item that does not have clipping
+ enabled. Such an item can be set using the \l via property.
+
+ By default, when used in a transition, ParentAnimation animates all parent
+ changes. This can be overridden by setting a specific target item using the
+ \l target property.
\sa {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
@@ -2358,8 +2454,8 @@ 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.
+ When used in a transition, if no target is specified, all
+ ParentChange occurrences are animated by the ParentAnimation.
*/
QDeclarativeItem *QDeclarativeParentAnimation::target() const
{
@@ -2402,7 +2498,7 @@ void QDeclarativeParentAnimation::setNewParent(QDeclarativeItem *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
+ when both the old parent and new parent are clipped.
\qml
ParentAnimation {
@@ -2652,28 +2748,14 @@ QAbstractAnimation *QDeclarativeParentAnimation::qtAnimation()
\qmlclass AnchorAnimation QDeclarativeAnchorAnimation
\since 4.7
\inherits Animation
- \brief The AnchorAnimation element allows you to animate anchor changes.
+ \brief The AnchorAnimation element animates changes in anchor values.
- AnchorAnimation will animated any changes specified by a state's AnchorChanges.
- In the following snippet we animate the addition of a right anchor to our item.
- \qml
- Item {
- id: myItem
- width: 100
- }
- ...
- State {
- AnchorChanges {
- target: myItem
- anchors.right: container.right
- }
- }
- ...
- Transition {
- //smoothly reanchor myItem and move into new position
- AnchorAnimation {}
- }
- \endqml
+ AnchorAnimation is used to animate an AnchorChange. It will anchor all
+ anchor changes specified in a \l State.
+
+ In the following snippet we animate the addition of a right anchor to a \l Rectangle:
+
+ \snippet doc/src/snippets/declarative/anchoranimation.qml 0
\sa AnchorChanges
*/
diff --git a/src/declarative/util/qdeclarativeanimation_p.h b/src/declarative/util/qdeclarativeanimation_p.h
index 59bd465f0f..481c36c224 100644
--- a/src/declarative/util/qdeclarativeanimation_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p.h
@@ -197,7 +197,7 @@ class QDeclarativePropertyAction : public QDeclarativeAbstractAnimation
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 property READ property WRITE setProperty NOTIFY propertyChanged)
Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
Q_PROPERTY(QDeclarativeListProperty<QObject> targets READ targets)
Q_PROPERTY(QDeclarativeListProperty<QObject> exclude READ exclude)
@@ -225,7 +225,8 @@ public:
Q_SIGNALS:
void valueChanged(const QVariant &);
void propertiesChanged(const QString &);
- void targetChanged(QObject *, const QString &);
+ void targetChanged();
+ void propertyChanged();
protected:
virtual void transition(QDeclarativeStateActions &actions,
@@ -246,7 +247,7 @@ class Q_AUTOTEST_EXPORT QDeclarativePropertyAnimation : public QDeclarativeAbstr
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 property READ property WRITE setProperty NOTIFY propertyChanged)
Q_PROPERTY(QString properties READ properties WRITE setProperties NOTIFY propertiesChanged)
Q_PROPERTY(QDeclarativeListProperty<QObject> targets READ targets)
Q_PROPERTY(QDeclarativeListProperty<QObject> exclude READ exclude)
@@ -292,7 +293,8 @@ Q_SIGNALS:
void toChanged(QVariant);
void easingChanged(const QEasingCurve &);
void propertiesChanged(const QString &);
- void targetChanged(QObject *, const QString &);
+ void targetChanged();
+ void propertyChanged();
};
class Q_AUTOTEST_EXPORT QDeclarativeColorAnimation : public QDeclarativePropertyAnimation
diff --git a/src/declarative/util/qdeclarativeanimation_p_p.h b/src/declarative/util/qdeclarativeanimation_p_p.h
index b6d6bbb795..e38580cc1f 100644
--- a/src/declarative/util/qdeclarativeanimation_p_p.h
+++ b/src/declarative/util/qdeclarativeanimation_p_p.h
@@ -311,8 +311,6 @@ public:
QVariant from;
QVariant to;
- QEasingCurve easing;
-
QObject *target;
QString propertyName;
QString properties;
diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp
index 2bb28c31bb..fadb2ae1ab 100644
--- a/src/declarative/util/qdeclarativebehavior.cpp
+++ b/src/declarative/util/qdeclarativebehavior.cpp
@@ -75,28 +75,21 @@ public:
\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.type: Easing.OutBounce
- easing.amplitude: 100
- duration: 200
- }
- }
- }
- \endcode
+ A Behavior defines the default animation to be applied whenever a
+ particular property value changes.
+
+ For example, the following Behavior defines a NumberAnimation to be run
+ whenever the \l Rectangle's \c width value changes. When the MouseArea
+ is clicked, the \c width is changed, triggering the behavior's animation:
+
+ \snippet doc/src/snippets/declarative/behavior.qml 0
- Currently only a single Behavior may be specified for a property;
- this Behavior can be enabled and disabled via the \l{enabled} property.
+ To run multiple animations within a Behavior, use ParallelAnimation or
+ SequentialAnimation.
- \sa {declarative/animation/behaviors}{Behavior example}, QtDeclarative
+ Note that a property cannot have more than one assigned Behavior.
+
+ \sa {Property Behaviors}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative
*/
@@ -113,7 +106,7 @@ QDeclarativeBehavior::~QDeclarativeBehavior()
\qmlproperty Animation Behavior::animation
\default
- The animation to use when the behavior is triggered.
+ This property holds the animation to run when the behavior is triggered.
*/
QDeclarativeAbstractAnimation *QDeclarativeBehavior::animation()
@@ -152,7 +145,9 @@ void QDeclarativeBehavior::qtAnimationStateChanged(QAbstractAnimation::State new
/*!
\qmlproperty bool Behavior::enabled
- Whether the Behavior will be triggered when the property it is tracking changes.
+
+ This property holds whether the behavior will be triggered when the tracked
+ property changes value.
By default a Behavior is enabled.
*/
@@ -182,7 +177,7 @@ void QDeclarativeBehavior::write(const QVariant &value)
return;
}
- if (value == d->targetValue)
+ if (d->animation->isRunning() && value == d->targetValue)
return;
d->currentValue = d->property.read();
diff --git a/src/declarative/util/qdeclarativeopenmetaobject.cpp b/src/declarative/util/qdeclarativeopenmetaobject.cpp
index ba5d5340ec..40485bd503 100644
--- a/src/declarative/util/qdeclarativeopenmetaobject.cpp
+++ b/src/declarative/util/qdeclarativeopenmetaobject.cpp
@@ -161,6 +161,12 @@ public:
prop.second = true;
}
+ inline bool hasData(int idx) const {
+ if (idx >= data.count())
+ return false;
+ return data[idx].second;
+ }
+
bool autoCreate;
QDeclarativeOpenMetaObject *q;
QAbstractDynamicMetaObject *parent;
@@ -295,6 +301,12 @@ void QDeclarativeOpenMetaObject::setValue(const QByteArray &name, const QVariant
activate(d->object, id + d->type->d->signalOffset, 0);
}
+// returns true if this value has been initialized by a call to either value() or setValue()
+bool QDeclarativeOpenMetaObject::hasValue(int id) const
+{
+ return d->hasData(id);
+}
+
void QDeclarativeOpenMetaObject::setCached(bool c)
{
if (c == d->cacheProperties || !d->type->d->engine)
diff --git a/src/declarative/util/qdeclarativeopenmetaobject_p.h b/src/declarative/util/qdeclarativeopenmetaobject_p.h
index 9bb4c34529..c18fa3d036 100644
--- a/src/declarative/util/qdeclarativeopenmetaobject_p.h
+++ b/src/declarative/util/qdeclarativeopenmetaobject_p.h
@@ -91,6 +91,7 @@ public:
void setValue(int, const QVariant &);
QVariant &operator[](const QByteArray &);
QVariant &operator[](int);
+ bool hasValue(int) const;
int count() const;
QByteArray name(int) const;
diff --git a/src/declarative/util/qdeclarativepixmapcache.cpp b/src/declarative/util/qdeclarativepixmapcache.cpp
index 00dd922c88..9ced14f5c7 100644
--- a/src/declarative/util/qdeclarativepixmapcache.cpp
+++ b/src/declarative/util/qdeclarativepixmapcache.cpp
@@ -70,6 +70,16 @@
QT_BEGIN_NAMESPACE
+// The cache limit describes the maximum "junk" in the cache.
+// These are the same defaults as QPixmapCache
+#if defined(Q_OS_SYMBIAN)
+static int cache_limit = 1024 * 1024; // 1048 KB cache limit for symbian
+#elif defined(Q_WS_QWS) || defined(Q_WS_WINCE)
+static int cache_limit = 2048 * 1024; // 2048 KB cache limit for embedded
+#else
+static int cache_limit = 10240 * 1024; // 10 MB cache limit for desktop
+#endif
+
class QDeclarativePixmapReader;
class QDeclarativePixmapData;
class QDeclarativePixmapReply : public QObject
@@ -114,6 +124,18 @@ public:
static int downloadProgressIndex;
};
+class QDeclarativePixmapReaderThreadObject : public QObject {
+ Q_OBJECT
+public:
+ QDeclarativePixmapReaderThreadObject(QDeclarativePixmapReader *);
+ void processJobs();
+ virtual bool event(QEvent *e);
+private slots:
+ void networkRequestDone();
+private:
+ QDeclarativePixmapReader *reader;
+};
+
class QDeclarativePixmapData;
class QDeclarativePixmapReader : public QThread
{
@@ -130,12 +152,11 @@ public:
protected:
void run();
-private slots:
- void networkRequestDone();
-
private:
+ friend class QDeclarativePixmapReaderThreadObject;
void processJobs();
void processJob(QDeclarativePixmapReply *);
+ void networkRequestDone(QNetworkReply *);
QList<QDeclarativePixmapReply*> jobs;
QList<QDeclarativePixmapReply*> cancelled;
@@ -143,14 +164,7 @@ private:
QObject *eventLoopQuitHack;
QMutex mutex;
- class ThreadObject : public QObject {
- public:
- ThreadObject(QDeclarativePixmapReader *);
- void processJobs();
- virtual bool event(QEvent *e);
- private:
- QDeclarativePixmapReader *reader;
- } *threadObject;
+ QDeclarativePixmapReaderThreadObject *threadObject;
QWaitCondition waitCondition;
QNetworkAccessManager *networkAccessManager();
@@ -161,7 +175,7 @@ private:
static int replyDownloadProgress;
static int replyFinished;
static int downloadProgress;
- static int thisNetworkRequestDone;
+ static int threadNetworkRequestDone;
static QHash<QDeclarativeEngine *,QDeclarativePixmapReader*> readers;
static QMutex readerMutex;
};
@@ -232,7 +246,7 @@ QMutex QDeclarativePixmapReader::readerMutex;
int QDeclarativePixmapReader::replyDownloadProgress = -1;
int QDeclarativePixmapReader::replyFinished = -1;
int QDeclarativePixmapReader::downloadProgress = -1;
-int QDeclarativePixmapReader::thisNetworkRequestDone = -1;
+int QDeclarativePixmapReader::threadNetworkRequestDone = -1;
void QDeclarativePixmapReply::postReply(ReadError error, const QString &errorString,
@@ -317,9 +331,8 @@ QDeclarativePixmapReader::~QDeclarativePixmapReader()
wait();
}
-void QDeclarativePixmapReader::networkRequestDone()
+void QDeclarativePixmapReader::networkRequestDone(QNetworkReply *reply)
{
- QNetworkReply *reply = static_cast<QNetworkReply *>(sender());
QDeclarativePixmapReply *job = replies.take(reply);
if (job) {
@@ -335,7 +348,7 @@ void QDeclarativePixmapReader::networkRequestDone()
reply = networkAccessManager()->get(req);
QMetaObject::connect(reply, replyDownloadProgress, job, downloadProgress);
- QMetaObject::connect(reply, replyFinished, this, thisNetworkRequestDone);
+ QMetaObject::connect(reply, replyFinished, threadObject, threadNetworkRequestDone);
replies.insert(reply, job);
return;
@@ -368,17 +381,17 @@ void QDeclarativePixmapReader::networkRequestDone()
threadObject->processJobs();
}
-QDeclarativePixmapReader::ThreadObject::ThreadObject(QDeclarativePixmapReader *i)
+QDeclarativePixmapReaderThreadObject::QDeclarativePixmapReaderThreadObject(QDeclarativePixmapReader *i)
: reader(i)
{
}
-void QDeclarativePixmapReader::ThreadObject::processJobs()
+void QDeclarativePixmapReaderThreadObject::processJobs()
{
QCoreApplication::postEvent(this, new QEvent(QEvent::User));
}
-bool QDeclarativePixmapReader::ThreadObject::event(QEvent *e)
+bool QDeclarativePixmapReaderThreadObject::event(QEvent *e)
{
if (e->type() == QEvent::User) {
reader->processJobs();
@@ -388,6 +401,12 @@ bool QDeclarativePixmapReader::ThreadObject::event(QEvent *e)
}
}
+void QDeclarativePixmapReaderThreadObject::networkRequestDone()
+{
+ QNetworkReply *reply = static_cast<QNetworkReply *>(sender());
+ reader->networkRequestDone(reply);
+}
+
void QDeclarativePixmapReader::processJobs()
{
QMutexLocker locker(&mutex);
@@ -469,7 +488,7 @@ void QDeclarativePixmapReader::processJob(QDeclarativePixmapReply *runningJob)
QNetworkReply *reply = networkAccessManager()->get(req);
QMetaObject::connect(reply, replyDownloadProgress, runningJob, downloadProgress);
- QMetaObject::connect(reply, replyFinished, this, thisNetworkRequestDone);
+ QMetaObject::connect(reply, replyFinished, threadObject, threadNetworkRequestDone);
replies.insert(reply, runningJob);
}
@@ -520,15 +539,15 @@ void QDeclarativePixmapReader::run()
if (replyDownloadProgress == -1) {
const QMetaObject *nr = &QNetworkReply::staticMetaObject;
const QMetaObject *pr = &QDeclarativePixmapReply::staticMetaObject;
- const QMetaObject *ir = &QDeclarativePixmapReader::staticMetaObject;
+ const QMetaObject *ir = &QDeclarativePixmapReaderThreadObject::staticMetaObject;
replyDownloadProgress = nr->indexOfSignal("downloadProgress(qint64,qint64)");
replyFinished = nr->indexOfSignal("finished()");
downloadProgress = pr->indexOfSignal("downloadProgress(qint64,qint64)");
- thisNetworkRequestDone = ir->indexOfSlot("networkRequestDone()");
+ threadNetworkRequestDone = ir->indexOfSlot("networkRequestDone()");
}
mutex.lock();
- threadObject = new ThreadObject(this);
+ threadObject = new QDeclarativePixmapReaderThreadObject(this);
mutex.unlock();
processJobs();
@@ -571,6 +590,8 @@ public:
QHash<QDeclarativePixmapKey, QDeclarativePixmapData *> m_cache;
private:
+ void shrinkCache(int remove);
+
QDeclarativePixmapData *m_unreferencedPixmaps;
QDeclarativePixmapData *m_lastUnreferencedPixmap;
@@ -604,8 +625,10 @@ void QDeclarativePixmapStore::unreferencePixmap(QDeclarativePixmapData *data)
m_unreferencedCost += data->cost();
- if (m_timerId == -1)
- startTimer(CACHE_EXPIRE_TIME * 1000);
+ shrinkCache(-1); // Shrink the cache incase it has become larger than cache_limit
+
+ if (m_timerId == -1 && m_unreferencedPixmaps)
+ m_timerId = startTimer(CACHE_EXPIRE_TIME * 1000);
}
void QDeclarativePixmapStore::referencePixmap(QDeclarativePixmapData *data)
@@ -627,11 +650,9 @@ void QDeclarativePixmapStore::referencePixmap(QDeclarativePixmapData *data)
m_unreferencedCost -= data->cost();
}
-void QDeclarativePixmapStore::timerEvent(QTimerEvent *)
+void QDeclarativePixmapStore::shrinkCache(int remove)
{
- int removalCost = m_unreferencedCost / CACHE_REMOVAL_FRACTION;
-
- while (removalCost > 0 && m_lastUnreferencedPixmap) {
+ while ((remove > 0 || m_unreferencedCost > cache_limit) && m_lastUnreferencedPixmap) {
QDeclarativePixmapData *data = m_lastUnreferencedPixmap;
Q_ASSERT(data->nextUnreferenced == 0);
@@ -640,10 +661,17 @@ void QDeclarativePixmapStore::timerEvent(QTimerEvent *)
data->prevUnreferencedPtr = 0;
data->prevUnreferenced = 0;
- removalCost -= data->cost();
+ remove -= data->cost();
data->removeFromCache();
delete data;
}
+}
+
+void QDeclarativePixmapStore::timerEvent(QTimerEvent *)
+{
+ int removalCost = m_unreferencedCost / CACHE_REMOVAL_FRACTION;
+
+ shrinkCache(removalCost);
if (m_unreferencedPixmaps == 0) {
killTimer(m_timerId);
@@ -693,7 +721,7 @@ bool QDeclarativePixmapReply::event(QEvent *event)
int QDeclarativePixmapData::cost() const
{
- return pixmap.width() * pixmap.height() * pixmap.depth();
+ return (pixmap.width() * pixmap.height() * pixmap.depth()) / 8;
}
void QDeclarativePixmapData::addref()
diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp
index 5d47c308aa..727f4278c2 100644
--- a/src/declarative/util/qdeclarativesmoothedanimation.cpp
+++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp
@@ -253,15 +253,22 @@ void QSmoothedAnimation::init()
\inherits NumberAnimation
\brief The SmoothedAnimation element allows a property to smoothly track a value.
- The SmoothedAnimation animates a property's value to a set target value
- using an ease in/out quad easing curve. If the animation is restarted
- with a different target value, the easing curves used to animate to the old
- and the new target values are smoothly spliced together to avoid any obvious
- visual glitches by maintaining the current velocity.
-
- 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
+ A SmoothedAnimation animates a property's value to a set target value
+ using an ease in/out quad easing curve. When the target value changes,
+ the easing curves used to animate between the old and new target values
+ are smoothly spliced together to create a smooth movement to the new
+ target value that maintains the current velocity.
+
+ The follow example shows one \l Rectangle tracking the position of another
+ using SmoothedAnimation. The green rectangle's \c x and \c y values are
+ bound to those of the red rectangle. Whenever these values change, the
+ green rectangle smoothly animates to its new position:
+
+ \snippet doc/src/snippets/declarative/smoothedanimation.qml 0
+
+ A SmoothedAnimation can be configured by setting the \l velocity at which the
+ animation should occur, or the \l duration that the animation should take.
+ If both the \l velocity and \l 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
@@ -271,35 +278,6 @@ void QSmoothedAnimation::init()
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.7
-
-Rectangle {
- width: 800; height: 600; color: "blue"
-
- Rectangle {
- color: "green"
- width: 60; height: 60;
- x: rect1.x - 5; y: rect1.y - 5;
- Behavior on x { SmoothedAnimation { velocity: 200 } }
- Behavior on y { SmoothedAnimation { 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 SmoothedAnimation 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.
@@ -307,7 +285,12 @@ Rectangle {
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 {QML Animation}, {declarative/animation/basics}{Animation basics example}
+ Like any other animation element, a SmoothedAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
+ \sa SpringAnimation, NumberAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}
*/
QDeclarativeSmoothedAnimation::QDeclarativeSmoothedAnimation(QObject *parent)
@@ -388,11 +371,13 @@ void QDeclarativeSmoothedAnimation::transition(QDeclarativeStateActions &actions
Sets how the SmoothedAnimation behaves if an animation direction is reversed.
- If reversing mode is \c SmoothedAnimation.Eased, the animation will smoothly decelerate, and
- then reverse direction. If the reversing mode is \c SmoothedAnimation.Immediate, the
- animation will immediately begin accelerating in the reverse direction,
- begining with a velocity of 0. If the reversing mode is \c SmoothedAnimation.Sync, the
- property is immediately set to the target value.
+ Possible values are:
+
+ \list
+ \o SmoothedAnimation.Eased (default) - the animation will smoothly decelerate, and then reverse direction
+ \o SmoothedAnimation.Immediate - the animation will immediately begin accelerating in the reverse direction, beginning with a velocity of 0
+ \o SmoothedAnimation.Sync - the property is immediately set to the target value
+ \endlist
*/
QDeclarativeSmoothedAnimation::ReversingMode QDeclarativeSmoothedAnimation::reversingMode() const
{
diff --git a/src/declarative/util/qdeclarativespringanimation.cpp b/src/declarative/util/qdeclarativespringanimation.cpp
index 4cf2fc0db1..8ce4832556 100644
--- a/src/declarative/util/qdeclarativespringanimation.cpp
+++ b/src/declarative/util/qdeclarativespringanimation.cpp
@@ -207,14 +207,26 @@ void QDeclarativeSpringAnimationPrivate::updateMode()
\qmlclass SpringAnimation QDeclarativeSpringAnimation
\since 4.7
- \brief The SpringAnimation element allows a property to track a value in a spring-like motion
+ \brief The SpringAnimation element allows a property to track a value in a spring-like motion.
SpringAnimation mimics the oscillatory behavior of a spring, with the appropriate \l spring constant to
control the acceleration and the \l damping to control how quickly the effect dies away.
You can also limit the maximum \l velocity of the animation.
+ The following \l Rectangle moves to the position of the mouse using a
+ SpringAnimation when the mouse is clicked. The use of the \l Behavior
+ on the \c x and \c y values indicates that whenever these values are
+ changed, a SpringAnimation should be applied.
+ \snippet doc/src/snippets/declarative/springanimation.qml 0
+
+ Like any other animation element, a SpringAnimation can be applied in a
+ number of ways, including transitions, behaviors and property value
+ sources. The \l PropertyAnimation documentation shows a variety of methods
+ for creating animations.
+
+ \sa SmoothedAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}, {declarative/toys/clocks}{Clocks example}
*/
QDeclarativeSpringAnimation::QDeclarativeSpringAnimation(QObject *parent)
@@ -244,6 +256,11 @@ qreal QDeclarativeSpringAnimation::to() const
/*!
\qmlproperty real SpringAnimation::to
+
+ This property holds the value at which the animation will end.
+
+ If not set, the animation will continue until it reaches the
+ value that is being tracked.
*/
void QDeclarativeSpringAnimation::setTo(qreal value)
@@ -266,6 +283,11 @@ qreal QDeclarativeSpringAnimation::from() const
/*!
\qmlproperty real SpringAnimation::from
+
+ This property holds the value from which the animation will begin.
+
+ If not set, the animation will start whenever the tracked value has
+ changed, regardless of its value.
*/
void QDeclarativeSpringAnimation::setFrom(qreal value)
@@ -283,7 +305,10 @@ void QDeclarativeSpringAnimation::setFrom(qreal value)
/*!
\qmlproperty real SpringAnimation::velocity
+
This property holds the maximum velocity allowed when tracking the source.
+
+ The default value is 0 (no maximum velocity).
*/
qreal QDeclarativeSpringAnimation::velocity() const
@@ -302,13 +327,14 @@ void QDeclarativeSpringAnimation::setVelocity(qreal velocity)
/*!
\qmlproperty real SpringAnimation::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
+ This property describes how strongly the target is pulled towards the
+ source. The default value is 0 (that is, the spring-like motion is disabled).
+
+ The useful value range is 0 - 5.0.
- When a spring constant is set and the velocity property is greater than 0,
- velocity limits the maximum speed.
+ When this property is set and the \l velocity value is greater than 0,
+ the \l velocity limits the maximum speed.
*/
qreal QDeclarativeSpringAnimation::spring() const
{
@@ -325,10 +351,13 @@ void QDeclarativeSpringAnimation::setSpring(qreal spring)
/*!
\qmlproperty real SpringAnimation::damping
- This property holds the spring damping constant
+ This property holds the spring damping value.
+
+ This value describes how quickly the spring-like motion comes to rest.
+ The default value is 0.
- The damping constant describes how quickly a sprung follower comes to rest.
- Useful range is 0 - 1.0
+ The useful value range is 0 - 1.0. The lower the value, the faster it
+ comes to rest.
*/
qreal QDeclarativeSpringAnimation::damping() const
{
@@ -348,7 +377,7 @@ void QDeclarativeSpringAnimation::setDamping(qreal damping)
/*!
\qmlproperty real SpringAnimation::epsilon
- This property holds the spring 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.
@@ -370,7 +399,7 @@ void QDeclarativeSpringAnimation::setEpsilon(qreal epsilon)
/*!
\qmlproperty real SpringAnimation::modulus
- This property holds the modulus value.
+ This property holds the modulus value. The default value is 0.
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.
@@ -395,8 +424,10 @@ void QDeclarativeSpringAnimation::setModulus(qreal modulus)
\qmlproperty real SpringAnimation::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.
+ The value is 1.0 by default.
+
+ A greater mass causes slower movement and a greater spring-like
+ motion when an item comes to rest.
*/
qreal QDeclarativeSpringAnimation::mass() const
{
diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp
index ae19a9ce15..0d43d21433 100644
--- a/src/declarative/util/qdeclarativestate.cpp
+++ b/src/declarative/util/qdeclarativestate.cpp
@@ -144,7 +144,7 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
can, for example, be used to apply different sets of property values or execute
different scripts.
- The following example displays a single Rectangle. In the default state, the rectangle
+ The following example displays a single \l Rectangle. In the default state, the rectangle
is colored black. In the "clicked" state, a PropertyChanges element changes the
rectangle's color to red. Clicking within the MouseArea toggles the rectangle's state
between the default state and the "clicked" state, thus toggling the color of the
@@ -157,7 +157,7 @@ QDeclarativeStateOperation::QDeclarativeStateOperation(QObjectPrivate &dd, QObje
States are commonly used together with \l {state-transitions}{Transitions} to provide
animations when state changes occur.
- \note setting the state of an object from within another state of the same object is
+ \note Setting the state of an object from within another state of the same object is
not allowed.
\sa {declarative/animation/states}{states example}, {qmlstates}{States}, {state-transitions}{Transitions}, QtDeclarative
@@ -194,7 +194,7 @@ QDeclarativeState::~QDeclarativeState()
\qmlproperty string State::name
This property holds the name of the state.
- Each state should have a unique name.
+ Each state should have a unique name within its item.
*/
QString QDeclarativeState::name() const
{
@@ -226,7 +226,10 @@ bool QDeclarativeState::isWhenKnown() const
This property holds when the state should be applied.
This should be set to an expression that evaluates to \c true when you want the state to
- be applied.
+ be applied. For example, the following \l Rectangle changes in and out of the "hidden"
+ state when the \l MouseArea is pressed:
+
+ \snippet doc/src/snippets/declarative/state-when.qml 0
If multiple states in a group have \c when clauses that evaluate to \c true at the same time,
the first matching state will be applied. For example, in the following snippet
@@ -342,8 +345,10 @@ QDeclarativeStatePrivate::generateActionList(QDeclarativeStateGroup *group) cons
if (!extends.isEmpty()) {
QList<QDeclarativeState *> states = group->states();
for (int ii = 0; ii < states.count(); ++ii)
- if (states.at(ii)->name() == extends)
+ if (states.at(ii)->name() == extends) {
+ qmlExecuteDeferred(states.at(ii));
applyList = static_cast<QDeclarativeStatePrivate*>(states.at(ii)->d_func())->generateActionList(group);
+ }
}
foreach(QDeclarativeStateOperation *op, operations)
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp
index 55904495b6..2291c16f6d 100644
--- a/src/declarative/util/qdeclarativestateoperations.cpp
+++ b/src/declarative/util/qdeclarativestateoperations.cpp
@@ -1501,8 +1501,12 @@ void QDeclarativeAnchorChanges::rewind()
d->target->setX(d->rewindX);
d->target->setY(d->rewindY);
- d->target->setWidth(d->rewindWidth);
- d->target->setHeight(d->rewindHeight);
+ if (targetPrivate->widthValid) {
+ d->target->setWidth(d->rewindWidth);
+ }
+ if (targetPrivate->heightValid) {
+ d->target->setHeight(d->rewindHeight);
+ }
}
void QDeclarativeAnchorChanges::saveCurrentValues()
diff --git a/src/declarative/util/qdeclarativetimeline.cpp b/src/declarative/util/qdeclarativetimeline.cpp
index 0258b3ce63..378c539e57 100644
--- a/src/declarative/util/qdeclarativetimeline.cpp
+++ b/src/declarative/util/qdeclarativetimeline.cpp
@@ -524,7 +524,7 @@ int QDeclarativeTimeLine::duration() const
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:
+ pseudo-code this is equivalent to:
\code
QDeclarativeTimeLine::pause(timeLineValue, min(0, length_of(syncTo) - length_of(timeLineValue)))
\endcode
@@ -549,7 +549,7 @@ void QDeclarativeTimeLine::sync(QDeclarativeTimeLineValue &timeLineValue, QDecla
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:
+ In pseudo-code, this is equivalent to:
\code
QDeclarativeTimeLine::pause(timeLineValue, length_of(timeline) - length_of(timeLineValue))
\endcode
diff --git a/src/declarative/util/qdeclarativetimer.cpp b/src/declarative/util/qdeclarativetimer.cpp
index 576995f4d7..838a8f3677 100644
--- a/src/declarative/util/qdeclarativetimer.cpp
+++ b/src/declarative/util/qdeclarativetimer.cpp
@@ -73,11 +73,12 @@ public:
\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
+ 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:
+ Here is a Timer that shows the current date and time, and updates
+ the text every 500 milliseconds. It uses the JavaScript \c Date
+ object to access the current time.
\qml
import Qt 4.7
@@ -88,9 +89,7 @@ public:
onTriggered: time.text = Date().toString()
}
- Text {
- id: time
- }
+ Text { id: time }
}
\endqml
diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp
index 38ed97ecbd..582191bc71 100644
--- a/src/declarative/util/qdeclarativetransition.cpp
+++ b/src/declarative/util/qdeclarativetransition.cpp
@@ -56,6 +56,28 @@ QT_BEGIN_NAMESPACE
\since 4.7
\brief The Transition element defines animated transitions that occur on state changes.
+ A Transition defines the animations to be applied when a \l State change occurs.
+
+ For example, the following \l Rectangle has two states: the default state, and
+ an added "moved" state. In the "moved state, the rectangle's position changes
+ to (50, 50). The added \l Transition specifies that when the rectangle
+ changes between the default and the "moved" state, any changes
+ to the \c x and \c y properties should be animated, using an \c Easing.InOutQuad.
+
+ \snippet doc/src/snippets/declarative/transition.qml 0
+
+ To define multiple transitions, specify \l Item::transitions as a list:
+
+ \qml
+ Item {
+ ...
+ transitions: [
+ Transition { ... },
+ Transition { ... }
+ ]
+ }
+ \endqml
+
\sa {declarative/animation/states}{states example}, {qmlstates}{States}, {state-transitions}{Transitions}, {QtDeclarative}
*/
@@ -171,18 +193,31 @@ void QDeclarativeTransition::prepare(QDeclarativeStateOperation::ActionList &act
/*!
\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"
- ...
+ These properties indicate the state changes that trigger the transition.
+
+ The default values for these properties is "*" (that is, any state).
+
+ For example, the following transition has not set the \c to and \c from
+ properties, so the animation is always applied when changing between
+ the two states (i.e. when the mouse is pressed and released).
+
+ \snippet doc/src/snippets/declarative/transition-from-to.qml 0
+
+ If the transition was changed to this:
+
+ \qml
+ transitions: Transition {
+ to: "brighter"
+ ColorAnimation { duration: 1000 }
+ }
}
- \endcode
+ \endqml
+
+ The animation would only be applied when changing from the default state to
+ the "brighter" state (i.e. when the mouse is pressed, but not on release).
+
+ \sa reversible
*/
QString QDeclarativeTransition::fromState() const
{
@@ -205,6 +240,24 @@ void QDeclarativeTransition::setFromState(const QString &f)
This property holds whether the transition should be automatically reversed when the conditions that triggered this transition are reversed.
The default value is false.
+
+ By default, transitions run in parallel and are applied to all state
+ changes if the \l from and \l to states have not been set. In this
+ situation, the transition is automatically applied when a state change
+ is reversed, and it is not necessary to set this property to reverse
+ the transition.
+
+ However, if a SequentialAnimation is used, or if the \l from or \l to
+ properties have been set, this property will need to be set to reverse
+ a transition when a state change is reverted. For example, the following
+ transition applies a sequential animation when the mouse is pressed,
+ and reverses the sequence of the animation when the mouse is released:
+
+ \snippet doc/src/snippets/declarative/transition-reversible.qml 0
+
+ If the transition did not set the \c to and \c reversible values, then
+ on the mouse release, the transition would play the PropertyAnimation
+ before the ColorAnimation instead of reversing the sequence.
*/
bool QDeclarativeTransition::reversible() const
{
@@ -241,12 +294,27 @@ void QDeclarativeTransition::setToState(const QString &t)
/*!
\qmlproperty list<Animation> Transition::animations
\default
+
This property holds a list of the animations to be run for this transition.
+ \qml
+ Transition {
+ PropertyAnimation { ... }
+ NumberAnimation { ... }
+ }
+ \endqml
+
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
+ define them within a SequentialAnimation:
+
+ \qml
+ Transition {
+ SequentialAnimation {
+ PropertyAnimation { ... }
+ NumberAnimation { ... }
+ }
+ }
+ \endqml
*/
QDeclarativeListProperty<QDeclarativeAbstractAnimation> QDeclarativeTransition::animations()
{
diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp
index 496f2ad502..8f06858c5d 100644
--- a/src/declarative/util/qdeclarativeview.cpp
+++ b/src/declarative/util/qdeclarativeview.cpp
@@ -132,7 +132,7 @@ class QDeclarativeViewPrivate : public QGraphicsViewPrivate, public QDeclarative
public:
QDeclarativeViewPrivate()
: root(0), declarativeItemRoot(0), graphicsWidgetRoot(0), component(0), resizeMode(QDeclarativeView::SizeViewToRootObject), initialSize(0,0) {}
- ~QDeclarativeViewPrivate() { delete root; }
+ ~QDeclarativeViewPrivate() { delete root; delete engine; }
void execute();
void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry);
void initResize();
@@ -145,7 +145,7 @@ public:
QUrl source;
- QDeclarativeEngine engine;
+ QDeclarativeEngine* engine;
QDeclarativeComponent *component;
QBasicTimer resizetimer;
@@ -170,7 +170,7 @@ void QDeclarativeViewPrivate::execute()
component = 0;
}
if (!source.isEmpty()) {
- component = new QDeclarativeComponent(&engine, source, q);
+ component = new QDeclarativeComponent(engine, source, q);
if (!component->isLoading()) {
q->continueExecute();
} else {
@@ -275,6 +275,7 @@ QDeclarativeView::QDeclarativeView(const QUrl &source, QWidget *parent)
void QDeclarativeViewPrivate::init()
{
Q_Q(QDeclarativeView);
+ engine = new QDeclarativeEngine();
q->setScene(&scene);
q->setOptimizationFlags(QGraphicsView::DontSavePainterState);
@@ -338,10 +339,10 @@ QUrl QDeclarativeView::source() const
Returns a pointer to the QDeclarativeEngine used for instantiating
QML Components.
*/
-QDeclarativeEngine* QDeclarativeView::engine()
+QDeclarativeEngine* QDeclarativeView::engine() const
{
- Q_D(QDeclarativeView);
- return &d->engine;
+ Q_D(const QDeclarativeView);
+ return d->engine;
}
/*!
@@ -351,10 +352,10 @@ QDeclarativeEngine* QDeclarativeView::engine()
arranged hierarchically and this hierarchy is managed by the
QDeclarativeEngine.
*/
-QDeclarativeContext* QDeclarativeView::rootContext()
+QDeclarativeContext* QDeclarativeView::rootContext() const
{
- Q_D(QDeclarativeView);
- return d->engine.rootContext();
+ Q_D(const QDeclarativeView);
+ return d->engine->rootContext();
}
/*!
@@ -364,7 +365,7 @@ QDeclarativeContext* QDeclarativeView::rootContext()
\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. Call errorDescription() to retrieve a description.
+ \value Error An error has occurred. Call errorDescription() to retrieve a description.
*/
/*! \enum QDeclarativeView::ResizeMode
@@ -390,7 +391,7 @@ QDeclarativeView::Status QDeclarativeView::status() const
}
/*!
- Return the list of errors that occured during the last compile or create
+ Return the list of errors that occurred during the last compile or create
operation. An empty list is returned if isError() is not set.
*/
QList<QDeclarativeError> QDeclarativeView::errors() const
diff --git a/src/declarative/util/qdeclarativeview.h b/src/declarative/util/qdeclarativeview.h
index cdcf134aa4..d3e49484fc 100644
--- a/src/declarative/util/qdeclarativeview.h
+++ b/src/declarative/util/qdeclarativeview.h
@@ -75,8 +75,8 @@ public:
QUrl source() const;
void setSource(const QUrl&);
- QDeclarativeEngine* engine();
- QDeclarativeContext* rootContext();
+ QDeclarativeEngine* engine() const;
+ QDeclarativeContext* rootContext() const;
QGraphicsObject *rootObject() const;
diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp
index 9895ff2b84..7c1e1fd1a3 100644
--- a/src/declarative/util/qdeclarativexmllistmodel.cpp
+++ b/src/declarative/util/qdeclarativexmllistmodel.cpp
@@ -567,7 +567,7 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
\image qml-xmllistmodel-example.png
The XmlListModel data is loaded asynchronously, and \l status
- is set to \l XmlListModel::Ready when loading is complete.
+ is set to \c XmlListModel.Ready when loading is complete.
Note this means when XmlListModel is used for a view, the view is not
populated until the model is loaded.
@@ -596,7 +596,7 @@ void QDeclarativeXmlListModelPrivate::clear_role(QDeclarativeListProperty<QDecla
with a combined value of all key roles that is not already present in
the model.
- \sa {demos/declarative/rssnews}{RSS News demo}
+ \sa {RSS News}
*/
QDeclarativeXmlListModel::QDeclarativeXmlListModel(QObject *parent)
diff --git a/src/declarative/util/qlistmodelinterface.cpp b/src/declarative/util/qlistmodelinterface.cpp
index 98d6a5b4fa..acf4dd6c0c 100644
--- a/src/declarative/util/qlistmodelinterface.cpp
+++ b/src/declarative/util/qlistmodelinterface.cpp
@@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE
*/
/*! \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.
+ Returns the data at the given \a index for the specified \a roles.
*/
/*! \fn bool QListModelInterface::setData(int index, const QHash<int,QVariant>& values)
diff --git a/src/gui/dialogs/qfiledialog_mac.mm b/src/gui/dialogs/qfiledialog_mac.mm
index f1afaa9874..64fc0ee0fa 100644
--- a/src/gui/dialogs/qfiledialog_mac.mm
+++ b/src/gui/dialogs/qfiledialog_mac.mm
@@ -782,9 +782,11 @@ void QFileDialogPrivate::qt_mac_filedialog_event_proc(const NavEventCallbackMess
const QtMacFilterName &fn = fileDialogPrivate->filterInfo.filters.at(
fileDialogPrivate->filterInfo.currentSelection);
QStringList reg = fn.regexp.split(QLatin1String(";"), QString::SkipEmptyParts);
- QString r = reg.first();
- r = r.right(r.length()-1); // Strip the *
- base += r; //"." + QString::number(s->menuType);
+ if (reg.count()) {
+ QString r = reg.first();
+ r = r.right(r.length()-1); // Strip the *
+ base += r; //"." + QString::number(s->menuType);
+ }
NavDialogSetSaveFileName(p->context, QCFString::toCFStringRef(base));
}
#ifdef DEBUG_FILEDIALOG_FILTERS
diff --git a/src/gui/dialogs/qwizard_win.cpp b/src/gui/dialogs/qwizard_win.cpp
index e406cba159..ad8801a094 100644
--- a/src/gui/dialogs/qwizard_win.cpp
+++ b/src/gui/dialogs/qwizard_win.cpp
@@ -180,7 +180,8 @@ QVistaBackButton::QVistaBackButton(QWidget *widget)
QSize QVistaBackButton::sizeHint() const
{
ensurePolished();
- int width = 32, height = 32;
+ int size = int(QStyleHelper::dpiScaled(32));
+ int width = size, height = size;
/*
HANDLE theme = pOpenThemeData(0, L"Navigation");
SIZE size;
@@ -213,8 +214,8 @@ void QVistaBackButton::paintEvent(QPaintEvent *)
HANDLE theme = pOpenThemeData(0, L"Navigation");
//RECT rect;
RECT clipRect;
- int xoffset = QWidget::mapToParent(r.topLeft()).x();
- int yoffset = QWidget::mapToParent(r.topLeft()).y();
+ int xoffset = QWidget::mapToParent(r.topLeft()).x() - 1;
+ int yoffset = QWidget::mapToParent(r.topLeft()).y() - 1;
clipRect.top = r.top() + yoffset;
clipRect.bottom = r.bottom() + yoffset;
@@ -245,6 +246,11 @@ QVistaHelper::QVistaHelper(QWizard *wizard)
is_vista = resolveSymbols();
if (is_vista)
backButton_ = new QVistaBackButton(wizard);
+
+ // Handle diff between Windows 7 and Vista
+ iconSpacing = QStyleHelper::dpiScaled(7);
+ textSpacing = QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS7 ?
+ iconSpacing : QStyleHelper::dpiScaled(20);
}
QVistaHelper::~QVistaHelper()
@@ -308,18 +314,15 @@ bool QVistaHelper::setDWMTitleBar(TitleBarChangeType type)
void QVistaHelper::drawTitleBar(QPainter *painter)
{
- if (vistaState() == VistaAero)
- drawBlackRect(
- QRect(0, 0, wizard->width(), titleBarSize() + topOffset()),
- painter->paintEngine()->getDC());
+ HDC hdc = painter->paintEngine()->getDC();
+ if (vistaState() == VistaAero)
+ drawBlackRect(QRect(0, 0, wizard->width(),
+ titleBarSize() + topOffset()), hdc);
Q_ASSERT(backButton_);
const int btnTop = backButton_->mapToParent(QPoint()).y();
const int btnHeight = backButton_->size().height();
- const int verticalCenter = (btnTop + btnHeight / 2);
-
- wizard->windowIcon().paint(
- painter, QRect(leftMargin(), verticalCenter - iconSize() / 2, iconSize(), iconSize()));
+ const int verticalCenter = (btnTop + btnHeight / 2) - 1;
const QString text = wizard->window()->windowTitle();
const QFont font = QApplication::font("QWorkspaceTitleBar");
@@ -327,14 +330,25 @@ void QVistaHelper::drawTitleBar(QPainter *painter)
const QRect brect = fontMetrics.boundingRect(text);
int textHeight = brect.height();
int textWidth = brect.width();
+ int glowOffset = 0;
+
if (vistaState() == VistaAero) {
textHeight += 2 * glowSize();
textWidth += 2 * glowSize();
+ glowOffset = glowSize();
}
+
drawTitleText(
painter, text,
- QRect(titleOffset(), verticalCenter - textHeight / 2, textWidth, textHeight),
- painter->paintEngine()->getDC());
+ QRect(titleOffset() - glowOffset, verticalCenter - textHeight / 2, textWidth, textHeight),
+ hdc);
+
+ if (!wizard->windowIcon().isNull()) {
+ QRect rect(leftMargin(), verticalCenter - iconSize() / 2, iconSize(), iconSize());
+ HICON hIcon = wizard->windowIcon().pixmap(iconSize()).toWinHICON();
+ DrawIconEx(hdc, rect.left(), rect.top(), hIcon, 0, 0, 0, NULL, DI_NORMAL | DI_COMPAT);
+ DestroyIcon(hIcon);
+ }
}
void QVistaHelper::setTitleBarIconAndCaptionVisible(bool visible)
@@ -734,7 +748,7 @@ bool QVistaHelper::resolveSymbols()
int QVistaHelper::titleOffset()
{
- int iconOffset = wizard ->windowIcon().isNull() ? 0 : iconSize() + padding();
+ int iconOffset = wizard ->windowIcon().isNull() ? 0 : iconSize() + textSpacing;
return leftMargin() + iconOffset;
}
diff --git a/src/gui/dialogs/qwizard_win_p.h b/src/gui/dialogs/qwizard_win_p.h
index 5f3b6c2bcb..caf018d0e7 100644
--- a/src/gui/dialogs/qwizard_win_p.h
+++ b/src/gui/dialogs/qwizard_win_p.h
@@ -61,6 +61,7 @@
#include <qwidget.h>
#include <qabstractbutton.h>
#include <QtGui/private/qwidget_p.h>
+#include <QtGui/private/qstylehelper_p.h>
QT_BEGIN_NAMESPACE
@@ -100,9 +101,14 @@ public:
enum VistaState { VistaAero, VistaBasic, Classic, Dirty };
static VistaState vistaState();
static int titleBarSize() { return frameSize() + captionSize(); }
- static int topPadding() { return 8; }
- static int topOffset() { return titleBarSize() + (vistaState() == VistaAero ? 13 : 3); }
-
+ static int topPadding() { // padding under text
+ return int(QStyleHelper::dpiScaled(
+ QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS7 ? 4 : 6));
+ }
+ static int topOffset() {
+ static int aeroOffset = QSysInfo::WindowsVersion >= QSysInfo::WV_WINDOWS7 ?
+ QStyleHelper::dpiScaled(4) : QStyleHelper::dpiScaled(13);
+ return (titleBarSize() + (vistaState() == VistaAero ? aeroOffset : 3)); }
private:
static HFONT getCaptionFont(HANDLE hTheme);
bool drawTitleText(QPainter *painter, const QString &text, const QRect &rect, HDC hdc);
@@ -111,11 +117,10 @@ private:
static int frameSize() { return GetSystemMetrics(SM_CYSIZEFRAME); }
static int captionSize() { return GetSystemMetrics(SM_CYCAPTION); }
- static int backButtonSize() { return 31; } // ### should be queried from back button itself
+ static int backButtonSize() { return int(QStyleHelper::dpiScaled(30)); }
static int iconSize() { return 16; } // Standard Aero
- static int padding() { return 7; } // Standard Aero
- static int leftMargin() { return backButtonSize() + padding(); }
static int glowSize() { return 10; }
+ int leftMargin() { return backButton_->isVisible() ? backButtonSize() + iconSpacing : 0; }
int titleOffset();
bool resolveSymbols();
@@ -139,6 +144,10 @@ private:
QRect rtTitle;
QWizard *wizard;
QVistaBackButton *backButton_;
+
+ int titleBarOffset; // Extra spacing above the text
+ int iconSpacing; // Space between button and icon
+ int textSpacing; // Space between icon and text
};
diff --git a/src/gui/graphicsview/qgraphicsgridlayout.cpp b/src/gui/graphicsview/qgraphicsgridlayout.cpp
index 83db3ec124..062b5ac5f9 100644
--- a/src/gui/graphicsview/qgraphicsgridlayout.cpp
+++ b/src/gui/graphicsview/qgraphicsgridlayout.cpp
@@ -94,14 +94,13 @@ public:
#endif
};
+Q_GLOBAL_STATIC(QWidget, globalStyleInfoWidget);
+
QLayoutStyleInfo QGraphicsGridLayoutPrivate::styleInfo() const
{
- static QWidget *wid = 0;
- if (!wid)
- wid = new QWidget;
QGraphicsItem *item = parentItem();
QStyle *style = (item && item->isWidget()) ? static_cast<QGraphicsWidget*>(item)->style() : QApplication::style();
- return QLayoutStyleInfo(style, wid);
+ return QLayoutStyleInfo(style, globalStyleInfoWidget());
}
/*!
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index fe2a84ea4f..1626d83971 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -133,7 +133,8 @@
\img graphicsview-parentchild.png
- \section1 Transformation
+ \target Transformations
+ \section1 Transformations
QGraphicsItem supports projective transformations in addition to its base
position, pos(). There are several ways to change an item's transformation.
@@ -1149,6 +1150,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
if (q_ptr == fsi || q_ptr->isAncestorOf(fsi)) {
parentFocusScopeItem = fsi;
p->d_ptr->focusScopeItem = 0;
+ fsi->d_ptr->focusScopeItemChange(false);
}
break;
}
@@ -1181,6 +1183,7 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
while (p) {
if (p->d_ptr->flags & QGraphicsItem::ItemIsFocusScope) {
p->d_ptr->focusScopeItem = newFocusScopeItem;
+ newFocusScopeItem->d_ptr->focusScopeItemChange(true);
// Ensure the new item is no longer the subFocusItem. The
// only way to set focus on a child of a focus scope is
// by setting focus on the scope itself.
@@ -1269,8 +1272,14 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q
Returns the bounding rect of this item's children (excluding itself).
*/
-void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rect)
+void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rect, bool doClip)
{
+ Q_Q(QGraphicsItem);
+
+ QRectF childrenRect;
+ QRectF *result = rect;
+ rect = &childrenRect;
+
for (int i = 0; i < children.size(); ++i) {
QGraphicsItem *child = children.at(i);
QGraphicsItemPrivate *childd = child->d_ptr.data();
@@ -1292,6 +1301,15 @@ void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rec
childd->childrenBoundingRectHelper(x, rect);
}
}
+
+ if (doClip && (flags & QGraphicsItem::ItemClipsChildrenToShape)){
+ if (x)
+ *rect &= x->mapRect(q->boundingRect());
+ else
+ *rect &= q->boundingRect();
+ }
+
+ *result |= *rect;
}
void QGraphicsItemPrivate::initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform,
@@ -1435,9 +1453,10 @@ QGraphicsItem::~QGraphicsItem()
#ifndef QT_NO_GESTURES
if (d_ptr->isObject && !d_ptr->gestureContext.isEmpty()) {
QGraphicsObject *o = static_cast<QGraphicsObject *>(this);
- QGestureManager *manager = QGestureManager::instance();
- foreach (Qt::GestureType type, d_ptr->gestureContext.keys())
- manager->cleanupCachedGestures(o, type);
+ if (QGestureManager *manager = QGestureManager::instance()) {
+ foreach (Qt::GestureType type, d_ptr->gestureContext.keys())
+ manager->cleanupCachedGestures(o, type);
+ }
}
#endif
@@ -3912,7 +3931,7 @@ void QGraphicsItem::setScale(qreal factor)
Returns a list of graphics transforms that currently apply to this item.
QGraphicsTransform is for applying and controlling a chain of individual
- transformation operations on an item. It's particularily useful in
+ transformation operations on an item. It's particularly useful in
animations, where each transform operation needs to be interpolated
independently, or differently.
@@ -3939,7 +3958,7 @@ QList<QGraphicsTransform *> QGraphicsItem::transformations() const
an item, you can call setTransform().
QGraphicsTransform is for applying and controlling a chain of individual
- transformation operations on an item. It's particularily useful in
+ transformation operations on an item. It's particularly useful in
animations, where each transform operation needs to be interpolated
independently, or differently.
@@ -5133,7 +5152,7 @@ QPainterPath QGraphicsItem::opaqueArea() const
The bounding region describes a coarse outline of the item's visual
contents. Although it's expensive to calculate, it's also more precise
than boundingRect(), and it can help to avoid unnecessary repainting when
- an item is updated. This is particularily efficient for thin items (e.g.,
+ an item is updated. This is particularly efficient for thin items (e.g.,
lines or simple polygons). You can tune the granularity for the bounding
region by calling setBoundingRegionGranularity(). The default granularity
is 0; in which the item's bounding region is the same as its bounding
@@ -5571,6 +5590,16 @@ void QGraphicsItemPrivate::subFocusItemChange()
/*!
\internal
+ Subclasses can reimplement this function to be notified when an item
+ becomes a focusScopeItem (or is no longer a focusScopeItem).
+*/
+void QGraphicsItemPrivate::focusScopeItemChange(bool isSubFocusItem)
+{
+}
+
+/*!
+ \internal
+
Subclasses can reimplement this function to be notified when its
siblingIndex order is changed.
*/
@@ -7929,6 +7958,7 @@ void QGraphicsItemPrivate::resetHeight()
/*!
\property QGraphicsObject::effect
+ \since 4.7
\brief the effect attached to this item
\sa QGraphicsItem::setGraphicsEffect(), QGraphicsItem::graphicsEffect()
@@ -11110,8 +11140,14 @@ QRectF QGraphicsItemEffectSourcePrivate::boundingRect(Qt::CoordinateSystem syste
}
QRectF rect = item->boundingRect();
- if (!item->d_ptr->children.isEmpty())
- rect |= item->childrenBoundingRect();
+ if (!item->d_ptr->children.isEmpty()) {
+ if (dirtyChildrenBoundingRect) {
+ childrenBoundingRect = QRectF();
+ item->d_ptr->childrenBoundingRectHelper(0, &childrenBoundingRect, true);
+ dirtyChildrenBoundingRect = false;
+ }
+ rect |= childrenBoundingRect;
+ }
if (deviceCoordinates) {
Q_ASSERT(info->painter);
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index f9f5d3de18..d60dffb38c 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -300,7 +300,7 @@ public:
QDeclarativeListProperty<QGraphicsObject> childrenList();
void setParentItemHelper(QGraphicsItem *parent, const QVariant *newParentVariant,
const QVariant *thisPointerVariant);
- void childrenBoundingRectHelper(QTransform *x, QRectF *rect);
+ void childrenBoundingRectHelper(QTransform *x, QRectF *rect, bool doClip = true);
void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform,
const QRegion &exposedRegion, bool allItems = false) const;
QRectF effectiveBoundingRect() const;
@@ -482,6 +482,7 @@ public:
void clearSubFocus(QGraphicsItem *rootItem = 0);
void resetFocusProxy();
virtual void subFocusItemChange();
+ virtual void focusScopeItemChange(bool isSubFocusItem);
static void children_append(QDeclarativeListProperty<QGraphicsObject> *list, QGraphicsObject *item);
static int children_count(QDeclarativeListProperty<QGraphicsObject> *list);
@@ -659,7 +660,7 @@ class QGraphicsItemEffectSourcePrivate : public QGraphicsEffectSourcePrivate
{
public:
QGraphicsItemEffectSourcePrivate(QGraphicsItem *i)
- : QGraphicsEffectSourcePrivate(), item(i), info(0)
+ : QGraphicsEffectSourcePrivate(), dirtyChildrenBoundingRect(true), item(i), info(0)
{}
inline void detach()
@@ -710,6 +711,9 @@ public:
QGraphicsEffect::PixmapPadMode mode) const;
QRect paddedEffectRect(Qt::CoordinateSystem system, QGraphicsEffect::PixmapPadMode mode, const QRectF &sourceRect, bool *unpadded = 0) const;
+ mutable bool dirtyChildrenBoundingRect;
+ mutable QRectF childrenBoundingRect;
+
QGraphicsItem *item;
QGraphicsItemPaintInfo *info;
QTransform lastEffectTransform;
@@ -867,9 +871,12 @@ inline void QGraphicsItemPrivate::markParentDirty(bool updateBoundingRect)
#ifndef QT_NO_GRAPHICSEFFECT
if (parentp->graphicsEffect) {
if (updateBoundingRect) {
+ QGraphicsItemEffectSourcePrivate *sourcep =
+ static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()
+ ->source->d_func());
+ parentp->dirtyChildrenBoundingRect = 1;
parentp->notifyInvalidated = 1;
- static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()
- ->source->d_func())->invalidateCache();
+ sourcep->invalidateCache();
}
if (parentp->scene && parentp->graphicsEffect->isEnabled()) {
parentp->dirty = 1;
diff --git a/src/gui/graphicsview/qgraphicslinearlayout.cpp b/src/gui/graphicsview/qgraphicslinearlayout.cpp
index b82872240c..37408efc69 100644
--- a/src/gui/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/gui/graphicsview/qgraphicslinearlayout.cpp
@@ -171,14 +171,13 @@ int QGraphicsLinearLayoutPrivate::gridColumn(int index) const
return int(qMin(uint(index), uint(engine.columnCount())));
}
+Q_GLOBAL_STATIC(QWidget, globalStyleInfoWidget)
+
QLayoutStyleInfo QGraphicsLinearLayoutPrivate::styleInfo() const
{
- static QWidget *wid = 0;
- if (!wid)
- wid = new QWidget;
QGraphicsItem *item = parentItem();
QStyle *style = (item && item->isWidget()) ? static_cast<QGraphicsWidget*>(item)->style() : QApplication::style();
- return QLayoutStyleInfo(style, wid);
+ return QLayoutStyleInfo(style, globalStyleInfoWidget());
}
/*!
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 4bc7f4c9e0..48a00937cf 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -5178,7 +5178,12 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool
// Process children.
if (itemHasChildren && item->d_ptr->dirtyChildren) {
const bool itemClipsChildrenToShape = item->d_ptr->flags & QGraphicsItem::ItemClipsChildrenToShape;
- if (itemClipsChildrenToShape) {
+ // Items with no content are threated as 'dummy' items which means they are never drawn and
+ // 'processed', so the painted view bounding rect is never up-to-date. This means that whenever
+ // such an item changes geometry, its children have to take care of the update regardless
+ // of whether the item clips children to shape or not.
+ const bool bypassUpdateClip = !itemHasContents && wasDirtyParentViewBoundingRects;
+ if (itemClipsChildrenToShape && !bypassUpdateClip) {
// Make sure child updates are clipped to the item's bounding rect.
for (int i = 0; i < views.size(); ++i)
views.at(i)->d_func()->setUpdateClip(item);
diff --git a/src/gui/graphicsview/qgraphicstransform.cpp b/src/gui/graphicsview/qgraphicstransform.cpp
index 4ab69750b9..986bee6aad 100644
--- a/src/gui/graphicsview/qgraphicstransform.cpp
+++ b/src/gui/graphicsview/qgraphicstransform.cpp
@@ -267,6 +267,7 @@ void QGraphicsScale::setXScale(qreal scale)
return;
d->xScale = scale;
update();
+ emit xScaleChanged();
emit scaleChanged();
}
@@ -293,6 +294,7 @@ void QGraphicsScale::setYScale(qreal scale)
return;
d->yScale = scale;
update();
+ emit yScaleChanged();
emit scaleChanged();
}
@@ -319,6 +321,7 @@ void QGraphicsScale::setZScale(qreal scale)
return;
d->zScale = scale;
update();
+ emit zScaleChanged();
emit scaleChanged();
}
diff --git a/src/gui/graphicsview/qgraphicstransform.h b/src/gui/graphicsview/qgraphicstransform.h
index 58b201a79a..d8c9654f19 100644
--- a/src/gui/graphicsview/qgraphicstransform.h
+++ b/src/gui/graphicsview/qgraphicstransform.h
@@ -85,9 +85,9 @@ class Q_GUI_EXPORT QGraphicsScale : public QGraphicsTransform
Q_OBJECT
Q_PROPERTY(QVector3D origin READ origin WRITE setOrigin NOTIFY originChanged)
- Q_PROPERTY(qreal xScale READ xScale WRITE setXScale NOTIFY scaleChanged)
- Q_PROPERTY(qreal yScale READ yScale WRITE setYScale NOTIFY scaleChanged)
- Q_PROPERTY(qreal zScale READ zScale WRITE setZScale NOTIFY scaleChanged)
+ Q_PROPERTY(qreal xScale READ xScale WRITE setXScale NOTIFY xScaleChanged)
+ Q_PROPERTY(qreal yScale READ yScale WRITE setYScale NOTIFY yScaleChanged)
+ Q_PROPERTY(qreal zScale READ zScale WRITE setZScale NOTIFY zScaleChanged)
public:
QGraphicsScale(QObject *parent = 0);
~QGraphicsScale();
@@ -108,6 +108,9 @@ public:
Q_SIGNALS:
void originChanged();
+ void xScaleChanged();
+ void yScaleChanged();
+ void zScaleChanged();
void scaleChanged();
private:
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index e942f528bf..41de3f23d9 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -84,6 +84,11 @@ contains(QMAKE_MAC_XARCH, no) {
3dnow:DEFINES += QT_HAVE_3DNOW
sse:DEFINES += QT_HAVE_SSE QT_HAVE_MMXEXT
sse2:DEFINES += QT_HAVE_SSE2
+ sse3:DEFINES += QT_HAVE_SSE3
+ ssse3:DEFINES += QT_HAVE_SSSE3
+ sse4_1:DEFINES += QT_HAVE_SSE4_1
+ sse4_2:DEFINES += QT_HAVE_SSE4_2
+ avx:DEFINES += QT_HAVE_AVX
iwmmxt:DEFINES += QT_HAVE_IWMMXT
win32-g++*|!win32:!*-icc* {
@@ -182,6 +187,25 @@ contains(QMAKE_MAC_XARCH, no) {
silent:sse2_compiler.commands = @echo compiling[sse2] ${QMAKE_FILE_IN} && $$sse2_compiler.commands
QMAKE_EXTRA_COMPILERS += sse2_compiler
}
+ ssse3 {
+ ssse3_compiler.commands = $$QMAKE_CXX -c -Winline
+
+ mac {
+ ssse3_compiler.commands += -Xarch_i386 -mssse3
+ ssse3_compiler.commands += -Xarch_x86_64 -mssse3
+ } else {
+ ssse3_compiler.commands += -mssse3
+ }
+
+ ssse3_compiler.commands += $(CXXFLAGS) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT}
+ ssse3_compiler.dependency_type = TYPE_C
+ ssse3_compiler.output = ${QMAKE_VAR_OBJECTS_DIR}${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)}
+ ssse3_compiler.input = SSSE3_SOURCES
+ ssse3_compiler.variable_out = OBJECTS
+ ssse3_compiler.name = compiling[ssse3] ${QMAKE_FILE_IN}
+ silent:ssse3_compiler.commands = @echo compiling[ssse3] ${QMAKE_FILE_IN} && $$ssse3_compiler.commands
+ QMAKE_EXTRA_COMPILERS += ssse3_compiler
+ }
iwmmxt {
iwmmxt_compiler.commands = $$QMAKE_CXX -c -Winline
iwmmxt_compiler.commands += -mcpu=iwmmxt
@@ -200,6 +224,7 @@ contains(QMAKE_MAC_XARCH, no) {
3dnow:sse: SOURCES += $$SSE3DNOW_SOURCES
sse: SOURCES += $$SSE_SOURCES
sse2: SOURCES += $$SSE2_SOURCES
+ ssse3: SOURCES += $$SSSE3_SOURCES
iwmmxt: SOURCES += $$IWMMXT_SOURCES
}
}
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index ef0c18e4f1..1d89a680e7 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -100,3 +100,4 @@ contains(QT_CONFIG, gif):include($$PWD/qgifhandler.pri)
# SIMD
SSE2_SOURCES += image/qimage_sse2.cpp
+SSSE3_SOURCES += image/qimage_ssse3.cpp
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index e5930acda3..30cf758036 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -2343,8 +2343,15 @@ static bool convert_indexed8_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConve
data->colortable.resize(256);
for (int i = 0; i < 256; ++i)
data->colortable[i] = qRgb(i, i, i);
+ } else {
+ for (int i = 0; i < data->colortable.size(); ++i)
+ data->colortable[i] = PREMUL(data->colortable.at(i));
+
+ // Fill the rest of the table in case src_data > colortable.size()
+ const int oldSize = data->colortable.size();
+ const QRgb lastColor = data->colortable.at(oldSize - 1);
+ data->colortable.insert(oldSize, 256 - oldSize, lastColor);
}
- const int tableSize = data->colortable.size() - 1;
for (int i = 0; i < data->height; ++i) {
src_data -= src_pad;
@@ -2352,11 +2359,11 @@ static bool convert_indexed8_to_ARGB_PM_inplace(QImageData *data, Qt::ImageConve
for (int pixI = 0; pixI < width; ++pixI) {
--src_data;
--dest_data;
- const uint pixel = data->colortable[qMin<int>(tableSize, *src_data)];
- *dest_data = (quint32) PREMUL(pixel);
+ *dest_data = data->colortable.at(*src_data);
}
}
+ data->colortable = QVector<QRgb>();
data->format = QImage::Format_ARGB32_Premultiplied;
data->bytes_per_line = dst_bytes_per_line;
data->depth = depth;
@@ -2388,8 +2395,12 @@ static bool convert_indexed8_to_RGB_inplace(QImageData *data, Qt::ImageConversio
data->colortable.resize(256);
for (int i = 0; i < 256; ++i)
data->colortable[i] = qRgb(i, i, i);
+ } else {
+ // Fill the rest of the table in case src_data > colortable.size()
+ const int oldSize = data->colortable.size();
+ const QRgb lastColor = data->colortable.at(oldSize - 1);
+ data->colortable.insert(oldSize, 256 - oldSize, lastColor);
}
- const int tableSize = data->colortable.size() - 1;
for (int i = 0; i < data->height; ++i) {
src_data -= src_pad;
@@ -2397,10 +2408,11 @@ static bool convert_indexed8_to_RGB_inplace(QImageData *data, Qt::ImageConversio
for (int pixI = 0; pixI < width; ++pixI) {
--src_data;
--dest_data;
- *dest_data = (quint32) data->colortable[qMin<int>(tableSize, *src_data)];
+ *dest_data = (quint32) data->colortable.at(*src_data);
}
}
+ data->colortable = QVector<QRgb>();
data->format = QImage::Format_RGB32;
data->bytes_per_line = dst_bytes_per_line;
data->depth = depth;
@@ -2428,12 +2440,23 @@ static bool convert_indexed8_to_RGB16_inplace(QImageData *data, Qt::ImageConvers
const int width = data->width;
const int src_pad = data->bytes_per_line - width;
const int dest_pad = (dst_bytes_per_line >> 1) - width;
- if (data->colortable.size() == 0) {
- data->colortable.resize(256);
+
+ quint16 colorTableRGB16[256];
+ if (data->colortable.isEmpty()) {
for (int i = 0; i < 256; ++i)
- data->colortable[i] = qRgb(i, i, i);
+ colorTableRGB16[i] = qt_colorConvert<quint16, quint32>(qRgb(i, i, i), 0);
+ } else {
+ // 1) convert the existing colors to RGB16
+ const int tableSize = data->colortable.size();
+ for (int i = 0; i < tableSize; ++i)
+ colorTableRGB16[i] = qt_colorConvert<quint16, quint32>(data->colortable.at(i), 0);
+ data->colortable = QVector<QRgb>();
+
+ // 2) fill the rest of the table in case src_data > colortable.size()
+ const quint16 lastColor = colorTableRGB16[tableSize - 1];
+ for (int i = tableSize; i < 256; ++i)
+ colorTableRGB16[i] = lastColor;
}
- const int tableSize = data->colortable.size() - 1;
for (int i = 0; i < data->height; ++i) {
src_data -= src_pad;
@@ -2441,8 +2464,7 @@ static bool convert_indexed8_to_RGB16_inplace(QImageData *data, Qt::ImageConvers
for (int pixI = 0; pixI < width; ++pixI) {
--src_data;
--dest_data;
- const uint pixel = data->colortable[qMin<int>(tableSize, *src_data)];
- *dest_data = qt_colorConvert<quint16, quint32>(pixel, 0);
+ *dest_data = colorTableRGB16[*src_data];
}
}
@@ -3332,7 +3354,7 @@ CONVERT_DECL(qargb4444, quint32)
// first index source, second dest
-static const Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormats] =
+static Image_Converter converter_map[QImage::NImageFormats][QImage::NImageFormats] =
{
{
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
@@ -3739,6 +3761,14 @@ void qInitImageConversions()
inplace_converter_map[QImage::Format_ARGB32][QImage::Format_ARGB32_Premultiplied] = convert_ARGB_to_ARGB_PM_inplace_sse2;
}
#endif
+#ifdef QT_HAVE_SSSE3
+ if (features & SSSE3) {
+ extern void convert_RGB888_to_RGB32_ssse3(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags);
+ converter_map[QImage::Format_RGB888][QImage::Format_RGB32] = convert_RGB888_to_RGB32_ssse3;
+ converter_map[QImage::Format_RGB888][QImage::Format_ARGB32] = convert_RGB888_to_RGB32_ssse3;
+ converter_map[QImage::Format_RGB888][QImage::Format_ARGB32_Premultiplied] = convert_RGB888_to_RGB32_ssse3;
+ }
+#endif
}
/*!
diff --git a/src/gui/image/qimage_ssse3.cpp b/src/gui/image/qimage_ssse3.cpp
new file mode 100644
index 0000000000..1c664f236d
--- /dev/null
+++ b/src/gui/image/qimage_ssse3.cpp
@@ -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 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 <qimage.h>
+#include <private/qimage_p.h>
+#include <private/qsimd_p.h>
+
+#ifdef QT_HAVE_SSSE3
+
+#include <stdio.h>
+QT_BEGIN_NAMESPACE
+
+// Convert a scanline of RGB888 (src) to RGB32 (dst)
+// src must be at least len * 3 bytes
+// dst must be at least len * 4 bytes
+inline void convert_rgb888_to_rgb32_ssse3(quint32 *dst, const uchar *src, int len)
+{
+ quint32 *const end = dst + len;
+
+ // Prologue, align dst to 16 bytes. The alignement is done on dst because it has 4 store()
+ // for each 3 load() of src.
+ const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;
+ const int prologLength = qMin(len, offsetToAlignOn16Bytes);
+
+ for (int i = 0; i < prologLength; ++i) {
+ *dst++ = qRgb(src[0], src[1], src[2]);
+ src += 3;
+ }
+
+ // Mask the 4 first colors of the RGB888 vector
+ const __m128i shuffleMask = _mm_set_epi8(0xff, 9, 10, 11, 0xff, 6, 7, 8, 0xff, 3, 4, 5, 0xff, 0, 1, 2);
+
+ // Mask the 4 last colors of a RGB888 vector with an offset of 1 (so the last 3 bytes are RGB)
+ const __m128i shuffleMaskEnd = _mm_set_epi8(0xff, 13, 14, 15, 0xff, 10, 11, 12, 0xff, 7, 8, 9, 0xff, 4, 5, 6);
+
+ // Mask to have alpha = 0xff
+ const __m128i alphaMask = _mm_set1_epi32(0xff000000);
+
+ __m128i *inVectorPtr = (__m128i *)src;
+ __m128i *dstVectorPtr = (__m128i *)dst;
+
+ const int simdRoundCount = (len - prologLength) / 16; // one iteration in the loop converts 16 pixels
+ for (int i = 0; i < simdRoundCount; ++i) {
+ /*
+ RGB888 has 5 pixels per vector, + 1 byte from the next pixel. The idea here is
+ to load vectors of RGB888 and use palignr to select a vector out of two vectors.
+
+ After 3 loads of RGB888 and 3 stores of RGB32, we have 4 pixels left in the last
+ vector of RGB888, we can mask it directly to get a last store or RGB32. After that,
+ the first next byte is a R, and we can loop for the next 16 pixels.
+
+ The conversion itself is done with a byte permutation (pshufb).
+ */
+ __m128i firstSrcVector = _mm_lddqu_si128(inVectorPtr);
+ __m128i outputVector = _mm_shuffle_epi8(firstSrcVector, shuffleMask);
+ _mm_store_si128(dstVectorPtr, _mm_or_si128(outputVector, alphaMask));
+ ++inVectorPtr;
+ ++dstVectorPtr;
+
+ // There are 4 unused bytes left in srcVector, we need to load the next 16 bytes
+ // and load the next input with palignr
+ __m128i secondSrcVector = _mm_lddqu_si128(inVectorPtr);
+ __m128i srcVector = _mm_alignr_epi8(secondSrcVector, firstSrcVector, 12);
+ outputVector = _mm_shuffle_epi8(srcVector, shuffleMask);
+ _mm_store_si128(dstVectorPtr, _mm_or_si128(outputVector, alphaMask));
+ ++inVectorPtr;
+ ++dstVectorPtr;
+ firstSrcVector = secondSrcVector;
+
+ // We now have 8 unused bytes left in firstSrcVector
+ secondSrcVector = _mm_lddqu_si128(inVectorPtr);
+ srcVector = _mm_alignr_epi8(secondSrcVector, firstSrcVector, 8);
+ outputVector = _mm_shuffle_epi8(srcVector, shuffleMask);
+ _mm_store_si128(dstVectorPtr, _mm_or_si128(outputVector, alphaMask));
+ ++inVectorPtr;
+ ++dstVectorPtr;
+
+ // There are now 12 unused bytes in firstSrcVector.
+ // We can mask them directly, almost there.
+ outputVector = _mm_shuffle_epi8(secondSrcVector, shuffleMaskEnd);
+ _mm_store_si128(dstVectorPtr, _mm_or_si128(outputVector, alphaMask));
+ ++dstVectorPtr;
+ }
+ src = (uchar *)inVectorPtr;
+ dst = (quint32 *)dstVectorPtr;
+
+ while (dst != end) {
+ *dst++ = qRgb(src[0], src[1], src[2]);
+ src += 3;
+ }
+}
+
+void convert_RGB888_to_RGB32_ssse3(QImageData *dest, const QImageData *src, Qt::ImageConversionFlags)
+{
+ Q_ASSERT(src->format == QImage::Format_RGB888);
+ Q_ASSERT(dest->format == QImage::Format_RGB32 || dest->format == QImage::Format_ARGB32 || dest->format == QImage::Format_ARGB32_Premultiplied);
+ Q_ASSERT(src->width == dest->width);
+ Q_ASSERT(src->height == dest->height);
+
+ const uchar *src_data = (uchar *) src->data;
+ quint32 *dest_data = (quint32 *) dest->data;
+
+ for (int i = 0; i < src->height; ++i) {
+ convert_rgb888_to_rgb32_ssse3(dest_data, src_data, src->width);
+ src_data += src->bytes_per_line;
+ dest_data = (quint32 *)((uchar*)dest_data + dest->bytes_per_line);
+ }
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_HAVE_SSSE3
diff --git a/src/gui/image/qpixmap_s60.cpp b/src/gui/image/qpixmap_s60.cpp
index a13c8c82e9..9d571b518d 100644
--- a/src/gui/image/qpixmap_s60.cpp
+++ b/src/gui/image/qpixmap_s60.cpp
@@ -157,10 +157,10 @@ class QSymbianBitmapDataAccess
{
public:
- bool heapWasLocked;
+ static int heapRefCount;
QSysInfo::SymbianVersion symbianVersion;
- explicit QSymbianBitmapDataAccess() : heapWasLocked(false)
+ explicit QSymbianBitmapDataAccess()
{
symbianVersion = QSysInfo::symbianVersion();
};
@@ -169,16 +169,22 @@ public:
inline void beginDataAccess(CFbsBitmap *bitmap)
{
- if (symbianVersion == QSysInfo::SV_9_2)
- heapWasLocked = qt_symbianFbsClient()->lockHeap();
- else
+ if (symbianVersion == QSysInfo::SV_9_2) {
+ if (heapRefCount == 0)
+ qt_symbianFbsClient()->lockHeap();
+ } else {
bitmap->LockHeap(ETrue);
+ }
+
+ heapRefCount++;
}
inline void endDataAccess(CFbsBitmap *bitmap)
{
+ heapRefCount--;
+
if (symbianVersion == QSysInfo::SV_9_2) {
- if (!heapWasLocked)
+ if (heapRefCount == 0)
qt_symbianFbsClient()->unlockHeap();
} else {
bitmap->UnlockHeap(ETrue);
@@ -186,6 +192,8 @@ public:
}
};
+int QSymbianBitmapDataAccess::heapRefCount = 0;
+
#define UPDATE_BUFFER() \
{ \
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 2cf8222de5..dc5431367c 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -389,7 +389,7 @@ bool Q_INTERNAL_WIN_NO_THROW QPngHandlerPrivate::readPngHeader()
while (num_text--) {
QString key, value;
-#if defined(PNG_iTXt_SUPPORTED)
+#if defined(PNG_iTXt_SUPPORTED) && !defined(QT_NO_TEXTCODEC)
if (text_ptr->lang) {
QTextCodec *codec = QTextCodec::codecForName(text_ptr->lang);
if (codec) {
diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
index 4cdc4adb82..394d3748f3 100644
--- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
+++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp
@@ -297,6 +297,10 @@ void QCoeFepInputContext::commitTemporaryPreeditString()
return;
commitCurrentString(false);
+
+ //update cursor position, now this pre-edit text has been committed.
+ //this prevents next keypress overwriting it (QTBUG-11673)
+ m_cursorPos = focusWidget()->inputMethodQuery(Qt::ImCursorPosition).toInt();
}
void QCoeFepInputContext::mouseHandler( int x, QMouseEvent *event)
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 4fb93fc2c4..97499f3c82 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -1363,7 +1363,7 @@ bool QAbstractItemView::dragEnabled() const
Note that the model used needs to provide support for drag and drop operations.
- \sa setDragDropMode() {Using Drag and Drop with Item Views}
+ \sa setDragDropMode() {Using drag & drop with item views}
*/
/*!
diff --git a/src/gui/itemviews/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp
index 5dbd1f08b8..4748f89eb7 100644
--- a/src/gui/itemviews/qfileiconprovider.cpp
+++ b/src/gui/itemviews/qfileiconprovider.cpp
@@ -100,69 +100,80 @@ public:
QIcon getMacIcon(const QFileInfo &fi) const;
#endif
QFileIconProvider *q_ptr;
- QString homePath;
+ const QString homePath;
private:
- QIcon file;
- QIcon fileLink;
- QIcon directory;
- QIcon directoryLink;
- QIcon harddisk;
- QIcon floppy;
- QIcon cdrom;
- QIcon ram;
- QIcon network;
- QIcon computer;
- QIcon desktop;
- QIcon trashcan;
- QIcon generic;
- QIcon home;
+ mutable QIcon file;
+ mutable QIcon fileLink;
+ mutable QIcon directory;
+ mutable QIcon directoryLink;
+ mutable QIcon harddisk;
+ mutable QIcon floppy;
+ mutable QIcon cdrom;
+ mutable QIcon ram;
+ mutable QIcon network;
+ mutable QIcon computer;
+ mutable QIcon desktop;
+ mutable QIcon trashcan;
+ mutable QIcon generic;
+ mutable QIcon home;
};
-QFileIconProviderPrivate::QFileIconProviderPrivate()
+QFileIconProviderPrivate::QFileIconProviderPrivate() :
+ homePath(QDir::home().absolutePath())
{
- QStyle *style = QApplication::style();
- file = style->standardIcon(QStyle::SP_FileIcon);
- directory = style->standardIcon(QStyle::SP_DirIcon);
- fileLink = style->standardIcon(QStyle::SP_FileLinkIcon);
- directoryLink = style->standardIcon(QStyle::SP_DirLinkIcon);
- harddisk = style->standardIcon(QStyle::SP_DriveHDIcon);
- floppy = style->standardIcon(QStyle::SP_DriveFDIcon);
- cdrom = style->standardIcon(QStyle::SP_DriveCDIcon);
- network = style->standardIcon(QStyle::SP_DriveNetIcon);
- computer = style->standardIcon(QStyle::SP_ComputerIcon);
- desktop = style->standardIcon(QStyle::SP_DesktopIcon);
- trashcan = style->standardIcon(QStyle::SP_TrashIcon);
- home = style->standardIcon(QStyle::SP_DirHomeIcon);
- homePath = QDir::home().absolutePath();
}
QIcon QFileIconProviderPrivate::getIcon(QStyle::StandardPixmap name) const
{
switch (name) {
case QStyle::SP_FileIcon:
+ if (file.isNull())
+ file = QApplication::style()->standardIcon(name);
return file;
case QStyle::SP_FileLinkIcon:
+ if (fileLink.isNull())
+ fileLink = QApplication::style()->standardIcon(name);
return fileLink;
case QStyle::SP_DirIcon:
+ if (directory.isNull())
+ directory = QApplication::style()->standardIcon(name);
return directory;
case QStyle::SP_DirLinkIcon:
+ if (directoryLink.isNull())
+ directoryLink = QApplication::style()->standardIcon(name);
return directoryLink;
case QStyle::SP_DriveHDIcon:
+ if (harddisk.isNull())
+ harddisk = QApplication::style()->standardIcon(name);
return harddisk;
case QStyle::SP_DriveFDIcon:
+ if (floppy.isNull())
+ floppy = QApplication::style()->standardIcon(name);
return floppy;
case QStyle::SP_DriveCDIcon:
+ if (cdrom.isNull())
+ cdrom = QApplication::style()->standardIcon(name);
return cdrom;
case QStyle::SP_DriveNetIcon:
+ if (network.isNull())
+ network = QApplication::style()->standardIcon(name);
return network;
case QStyle::SP_ComputerIcon:
+ if (computer.isNull())
+ computer = QApplication::style()->standardIcon(name);
return computer;
case QStyle::SP_DesktopIcon:
+ if (desktop.isNull())
+ desktop = QApplication::style()->standardIcon(name);
return desktop;
case QStyle::SP_TrashIcon:
+ if (trashcan.isNull())
+ trashcan = QApplication::style()->standardIcon(name);
return trashcan;
case QStyle::SP_DirHomeIcon:
+ if (home.isNull())
+ home = QApplication::style()->standardIcon(name);
return home;
default:
return QIcon();
diff --git a/src/gui/itemviews/qheaderview.cpp b/src/gui/itemviews/qheaderview.cpp
index cd9ee15168..67854a3f9e 100644
--- a/src/gui/itemviews/qheaderview.cpp
+++ b/src/gui/itemviews/qheaderview.cpp
@@ -1871,7 +1871,7 @@ void QHeaderViewPrivate::_q_layoutChanged()
for (int i = 0; i < oldSectionHidden.count(); ++i) {
if (oldSectionHidden.testBit(i))
- q->setSectionHidden(logicalIndex(i), false);
+ q->setSectionHidden(i, false);
}
// the number of sections changed; we need to reread the state of the model
diff --git a/src/gui/itemviews/qlistview.cpp b/src/gui/itemviews/qlistview.cpp
index 186909377a..76d76426dd 100644
--- a/src/gui/itemviews/qlistview.cpp
+++ b/src/gui/itemviews/qlistview.cpp
@@ -2782,7 +2782,10 @@ QPoint QIconModeViewBase::initDynamicLayout(const QListViewLayoutInfo &info)
y = info.bounds.y() + info.spacing;
items.reserve(rowCount() - hiddenCount());
} else {
- const QListViewItem item = items.at(info.first - 1);
+ int idx = info.first - 1;
+ while (idx > 0 && !items.at(idx).isValid())
+ --idx;
+ const QListViewItem &item = items.at(idx);
x = item.x;
y = item.y;
if (info.flow == QListView::LeftToRight)
@@ -2913,6 +2916,8 @@ void QIconModeViewBase::doDynamicLayout(const QListViewLayoutInfo &info)
else
contentsSize.rwidth() += info.spacing;
}
+ if (rect.size().isEmpty())
+ return;
// resize tree
int insertFrom = info.first;
if (done || info.first == 0) {
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 052da6a101..08852afb23 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -5313,6 +5313,7 @@ bool QApplication::keypadNavigationEnabled()
\sa QCoreApplication::instance()
*/
+#ifndef QT_NO_IM
// ************************************************************************
// Input Method support
// ************************************************************************
@@ -5378,6 +5379,7 @@ QInputContext *QApplication::inputContext() const
#endif
return d->inputContext;
}
+#endif // QT_NO_IM
//Returns the current platform used by keyBindings
uint QApplicationPrivate::currentPlatform(){
@@ -5808,10 +5810,12 @@ Q_GUI_EXPORT void qt_translateRawTouchEvent(QWidget *window,
#ifndef QT_NO_GESTURES
QGestureManager* QGestureManager::instance()
{
- QApplicationPrivate *qAppPriv = QApplicationPrivate::instance();
- if (!qAppPriv->gestureManager)
- qAppPriv->gestureManager = new QGestureManager(qApp);
- return qAppPriv->gestureManager;
+ if (QApplicationPrivate *qAppPriv = QApplicationPrivate::instance()) {
+ if (!qAppPriv->gestureManager)
+ qAppPriv->gestureManager = new QGestureManager(qApp);
+ return qAppPriv->gestureManager;
+ }
+ return 0;
}
#endif // QT_NO_GESTURES
diff --git a/src/gui/kernel/qapplication.h b/src/gui/kernel/qapplication.h
index d31d9e518a..799d4c2935 100644
--- a/src/gui/kernel/qapplication.h
+++ b/src/gui/kernel/qapplication.h
@@ -267,8 +267,11 @@ public:
virtual void commitData(QSessionManager& sm);
virtual void saveState(QSessionManager& sm);
#endif
+
+#ifndef QT_NO_IM
void setInputContext(QInputContext *);
QInputContext *inputContext() const;
+#endif
static QLocale keyboardInputLocale();
static Qt::LayoutDirection keyboardInputDirection();
diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h
index 933e0ab967..44aa20a2dd 100644
--- a/src/gui/kernel/qapplication_p.h
+++ b/src/gui/kernel/qapplication_p.h
@@ -645,7 +645,7 @@ private:
#endif
#ifdef Q_OS_SYMBIAN
- static QHash<TInt, TUint> scanCodeCache;
+ QHash<TInt, TUint> scanCodeCache;
#endif
static QApplicationPrivate *self;
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 0d65811380..f8734b2b31 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -112,6 +112,25 @@ QS60Data* qGlobalS60Data()
return qt_s60Data();
}
+#ifdef Q_WS_S60
+void QS60Data::setStatusPaneAndButtonGroupVisibility(bool statusPaneVisible, bool buttonGroupVisible)
+{
+ bool buttonGroupVisibilityChanged = false;
+ if (CEikButtonGroupContainer *const b = buttonGroupContainer()) {
+ buttonGroupVisibilityChanged = (b->IsVisible() != buttonGroupVisible);
+ b->MakeVisible(buttonGroupVisible);
+ }
+ bool statusPaneVisibilityChanged = false;
+ if (CEikStatusPane *const s = statusPane()) {
+ statusPaneVisibilityChanged = (s->IsVisible() != statusPaneVisible);
+ s->MakeVisible(statusPaneVisible);
+ }
+ if (buttonGroupVisibilityChanged && !statusPaneVisibilityChanged)
+ // Ensure that control rectangle is updated
+ static_cast<QSymbianControl *>(QApplication::activeWindow()->winId())->handleClientAreaChange();
+}
+#endif
+
bool qt_nograb() // application no-grab option
{
#if defined(QT_DEBUG)
@@ -207,8 +226,6 @@ void QS60Beep::MatoPlayComplete(TInt aError)
}
-QHash<TInt, TUint> QApplicationPrivate::scanCodeCache;
-
static Qt::KeyboardModifiers mapToQtModifiers(TUint s60Modifiers)
{
Qt::KeyboardModifiers result = Qt::NoModifier;
@@ -382,6 +399,10 @@ void QSymbianControl::ConstructL(bool isWindowOwning, bool desktop)
QSymbianControl::~QSymbianControl()
{
+ // Ensure backing store is deleted before the top-level
+ // window is destroyed
+ qt_widget_private(qwidget)->topData()->backingStore.destroy();
+
if (S60->curWin == this)
S60->curWin = 0;
if (!QApplicationPrivate::is_app_closing) {
@@ -621,251 +642,302 @@ TKeyResponse QSymbianControl::OfferKeyEventL(const TKeyEvent& keyEvent, TEventCo
TKeyResponse QSymbianControl::OfferKeyEvent(const TKeyEvent& keyEvent, TEventCode type)
{
- switch (type) {
- //case EEventKeyDown: // <-- Intentionally left out. See below.
- case EEventKeyUp:
- case EEventKey:
- {
+ /*
+ S60 has a confusing way of delivering key events. There are three types of
+ events: EEventKey, EEventKeyDown and EEventKeyUp. When a key is pressed,
+ EEventKeyDown is first generated, followed by EEventKey. Then, when the key is
+ released, EEventKeyUp is generated.
+ However, it is possible that only the EEventKey is generated alone, typically
+ in relation to virtual keyboards. In that case we need to take care to
+ generate both press and release events in Qt, since applications expect that.
+ We do this by having three states for each used scan code, depending on the
+ events received. See the switch below for what happens in each state
+ transition.
+ */
+
+ if (type != EEventKeyDown)
+ if (handleVirtualMouse(keyEvent, type) == EKeyWasConsumed)
+ return EKeyWasConsumed;
+
+ TKeyResponse ret = EKeyWasNotConsumed;
+#define GET_RETURN(x) (ret = ((x) == EKeyWasConsumed) ? EKeyWasConsumed : ret)
+
+ // This top level switch corresponds to the states, and the inner switches
+ // correspond to the transitions.
+ QS60Data::ScanCodeState &scanCodeState = S60->scanCodeStates[keyEvent.iScanCode];
+ switch (scanCodeState) {
+ case QS60Data::Unpressed:
+ switch (type) {
+ case EEventKeyDown:
+ scanCodeState = QS60Data::KeyDown;
+ break;
+ case EEventKey:
+ GET_RETURN(sendSymbianKeyEvent(keyEvent, QEvent::KeyPress));
+ GET_RETURN(sendSymbianKeyEvent(keyEvent, QEvent::KeyRelease));
+ break;
+ case EEventKeyUp:
+ // No action.
+ break;
+ }
+ break;
+ case QS60Data::KeyDown:
+ switch (type) {
+ case EEventKeyDown:
+ // This should never happen, just stay in this state to be safe.
+ break;
+ case EEventKey:
+ GET_RETURN(sendSymbianKeyEvent(keyEvent, QEvent::KeyPress));
+ scanCodeState = QS60Data::KeyDownAndKey;
+ break;
+ case EEventKeyUp:
+ scanCodeState = QS60Data::Unpressed;
+ break;
+ }
+ break;
+ case QS60Data::KeyDownAndKey:
+ switch (type) {
+ case EEventKeyDown:
+ // This should never happen, just stay in this state to be safe.
+ break;
+ case EEventKey:
+ GET_RETURN(sendSymbianKeyEvent(keyEvent, QEvent::KeyRelease));
+ GET_RETURN(sendSymbianKeyEvent(keyEvent, QEvent::KeyPress));
+ break;
+ case EEventKeyUp:
+ GET_RETURN(sendSymbianKeyEvent(keyEvent, QEvent::KeyRelease));
+ scanCodeState = QS60Data::Unpressed;
+ break;
+ }
+ break;
+ }
+ return ret;
+
+#undef GET_RETURN
+}
+
+TKeyResponse QSymbianControl::sendSymbianKeyEvent(const TKeyEvent &keyEvent, QEvent::Type type)
+{
+ // Because S60 does not generate keysyms for EKeyEventDown and EKeyEventUp
+ // events, we need to cache the keysyms from the EKeyEvent events. This is what
+ // resolveS60ScanCode does.
+ TUint s60Keysym = QApplicationPrivate::resolveS60ScanCode(keyEvent.iScanCode,
+ keyEvent.iCode);
+ int keyCode;
+ if (s60Keysym == EKeyNull){ //some key events have 0 in iCode, for them iScanCode should be used
+ keyCode = qt_keymapper_private()->mapS60ScanCodesToQt(keyEvent.iScanCode);
+ } else if (s60Keysym >= 0x20 && s60Keysym < ENonCharacterKeyBase) {
+ // Normal characters keys.
+ keyCode = s60Keysym;
+ } else {
+ // Special S60 keys.
+ keyCode = qt_keymapper_private()->mapS60KeyToQt(s60Keysym);
+ }
+
+ Qt::KeyboardModifiers mods = mapToQtModifiers(keyEvent.iModifiers);
+ QKeyEventEx qKeyEvent(type, keyCode, mods, qt_keymapper_private()->translateKeyEvent(keyCode, mods),
+ (keyEvent.iRepeats != 0), 1, keyEvent.iScanCode, s60Keysym, keyEvent.iModifiers);
+ QWidget *widget;
+ widget = QWidget::keyboardGrabber();
+ if (!widget) {
+ if (QApplicationPrivate::popupWidgets != 0) {
+ widget = QApplication::activePopupWidget()->focusWidget();
+ if (!widget) {
+ widget = QApplication::activePopupWidget();
+ }
+ } else {
+ widget = QApplicationPrivate::focus_widget;
+ if (!widget) {
+ widget = qwidget;
+ }
+ }
+ }
+
+ QEventDispatcherS60 *dispatcher;
+ // It is theoretically possible for someone to install a different event dispatcher.
+ if ((dispatcher = qobject_cast<QEventDispatcherS60 *>(widget->d_func()->threadData->eventDispatcher)) != 0) {
+ if (dispatcher->excludeUserInputEvents()) {
+ dispatcher->saveInputEvent(this, widget, new QKeyEventEx(qKeyEvent));
+ return EKeyWasConsumed;
+ }
+ }
+ return sendKeyEvent(widget, &qKeyEvent);
+}
+
+TKeyResponse QSymbianControl::handleVirtualMouse(const TKeyEvent& keyEvent,TEventCode type)
+{
#ifndef QT_NO_CURSOR
- if (S60->mouseInteractionEnabled && S60->virtualMouseRequired) {
- //translate keys to pointer
- if ((keyEvent.iScanCode >= EStdKeyLeftArrow && keyEvent.iScanCode <= EStdKeyDownArrow) ||
+ if (S60->mouseInteractionEnabled && S60->virtualMouseRequired) {
+ //translate keys to pointer
+ if ((keyEvent.iScanCode >= EStdKeyLeftArrow && keyEvent.iScanCode <= EStdKeyDownArrow) ||
(keyEvent.iScanCode >= EStdKeyDevice10 && keyEvent.iScanCode <= EStdKeyDevice13) ||
keyEvent.iScanCode == EStdKeyDevice3) {
- QPoint pos = QCursor::pos();
- TPointerEvent fakeEvent;
- fakeEvent.iType = (TPointerEvent::TType)(-1);
- fakeEvent.iModifiers = keyEvent.iModifiers;
- TInt x = pos.x();
- TInt y = pos.y();
- if (type == EEventKeyUp) {
- S60->virtualMouseAccelTimeout.start();
- switch (keyEvent.iScanCode) {
- case EStdKeyLeftArrow:
- S60->virtualMousePressedKeys &= ~QS60Data::Left;
- break;
- case EStdKeyRightArrow:
- S60->virtualMousePressedKeys &= ~QS60Data::Right;
- break;
- case EStdKeyUpArrow:
- S60->virtualMousePressedKeys &= ~QS60Data::Up;
- break;
- case EStdKeyDownArrow:
- S60->virtualMousePressedKeys &= ~QS60Data::Down;
- break;
- // diagonal keys (named aliases don't exist in 3.1 SDK)
- case EStdKeyDevice10:
- S60->virtualMousePressedKeys &= ~QS60Data::LeftUp;
- break;
- case EStdKeyDevice11:
- S60->virtualMousePressedKeys &= ~QS60Data::RightUp;
- break;
- case EStdKeyDevice12:
- S60->virtualMousePressedKeys &= ~QS60Data::RightDown;
- break;
- case EStdKeyDevice13:
- S60->virtualMousePressedKeys &= ~QS60Data::LeftDown;
- break;
- case EStdKeyDevice3: //select
- if (S60->virtualMousePressedKeys & QS60Data::Select)
- fakeEvent.iType = TPointerEvent::EButton1Up;
- S60->virtualMousePressedKeys &= ~QS60Data::Select;
- break;
- }
+ QPoint pos = QCursor::pos();
+ TPointerEvent fakeEvent;
+ fakeEvent.iType = (TPointerEvent::TType)(-1);
+ fakeEvent.iModifiers = keyEvent.iModifiers;
+ TInt x = pos.x();
+ TInt y = pos.y();
+ if (type == EEventKeyUp) {
+ S60->virtualMouseAccelTimeout.start();
+ switch (keyEvent.iScanCode) {
+ case EStdKeyLeftArrow:
+ S60->virtualMousePressedKeys &= ~QS60Data::Left;
+ break;
+ case EStdKeyRightArrow:
+ S60->virtualMousePressedKeys &= ~QS60Data::Right;
+ break;
+ case EStdKeyUpArrow:
+ S60->virtualMousePressedKeys &= ~QS60Data::Up;
+ break;
+ case EStdKeyDownArrow:
+ S60->virtualMousePressedKeys &= ~QS60Data::Down;
+ break;
+ // diagonal keys (named aliases don't exist in 3.1 SDK)
+ case EStdKeyDevice10:
+ S60->virtualMousePressedKeys &= ~QS60Data::LeftUp;
+ break;
+ case EStdKeyDevice11:
+ S60->virtualMousePressedKeys &= ~QS60Data::RightUp;
+ break;
+ case EStdKeyDevice12:
+ S60->virtualMousePressedKeys &= ~QS60Data::RightDown;
+ break;
+ case EStdKeyDevice13:
+ S60->virtualMousePressedKeys &= ~QS60Data::LeftDown;
+ break;
+ case EStdKeyDevice3: //select
+ if (S60->virtualMousePressedKeys & QS60Data::Select)
+ fakeEvent.iType = TPointerEvent::EButton1Up;
+ S60->virtualMousePressedKeys &= ~QS60Data::Select;
+ break;
}
- else if (type == EEventKey) {
- int dx = 0;
- int dy = 0;
- if (keyEvent.iScanCode != EStdKeyDevice3) {
- m_doubleClickTimer.invalidate();
- //reset mouse accelleration after a short time with no moves
- const int maxTimeBetweenKeyEventsMs = 500;
- if (S60->virtualMouseAccelTimeout.isValid() &&
+ }
+ else if (type == EEventKey) {
+ int dx = 0;
+ int dy = 0;
+ if (keyEvent.iScanCode != EStdKeyDevice3) {
+ m_doubleClickTimer.invalidate();
+ //reset mouse accelleration after a short time with no moves
+ const int maxTimeBetweenKeyEventsMs = 500;
+ if (S60->virtualMouseAccelTimeout.isValid() &&
S60->virtualMouseAccelTimeout.hasExpired(maxTimeBetweenKeyEventsMs)) {
- S60->virtualMouseAccelDX = 0;
- S60->virtualMouseAccelDY = 0;
- }
- S60->virtualMouseAccelTimeout.invalidate();
+ S60->virtualMouseAccelDX = 0;
+ S60->virtualMouseAccelDY = 0;
}
- switch (keyEvent.iScanCode) {
- case EStdKeyLeftArrow:
- S60->virtualMousePressedKeys |= QS60Data::Left;
- dx = -1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyRightArrow:
- S60->virtualMousePressedKeys |= QS60Data::Right;
- dx = 1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyUpArrow:
- S60->virtualMousePressedKeys |= QS60Data::Up;
- dy = -1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyDownArrow:
- S60->virtualMousePressedKeys |= QS60Data::Down;
- dy = 1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyDevice10:
- S60->virtualMousePressedKeys |= QS60Data::LeftUp;
- dx = -1;
- dy = -1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyDevice11:
- S60->virtualMousePressedKeys |= QS60Data::RightUp;
- dx = 1;
- dy = -1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyDevice12:
- S60->virtualMousePressedKeys |= QS60Data::RightDown;
- dx = 1;
- dy = 1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyDevice13:
- S60->virtualMousePressedKeys |= QS60Data::LeftDown;
- dx = -1;
- dy = 1;
- fakeEvent.iType = TPointerEvent::EMove;
- break;
- case EStdKeyDevice3:
- // Platform bug. If you start pressing several keys simultaneously (for
- // example for drag'n'drop), Symbian starts producing spurious up and
- // down messages for some keys. Therefore, make sure we have a clean slate
- // of pressed keys before starting a new button press.
- if (S60->virtualMousePressedKeys & QS60Data::Select) {
- return EKeyWasConsumed;
- } else {
- S60->virtualMousePressedKeys |= QS60Data::Select;
- fakeEvent.iType = TPointerEvent::EButton1Down;
- if (m_doubleClickTimer.isValid()
+ S60->virtualMouseAccelTimeout.invalidate();
+ }
+ switch (keyEvent.iScanCode) {
+ case EStdKeyLeftArrow:
+ S60->virtualMousePressedKeys |= QS60Data::Left;
+ dx = -1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyRightArrow:
+ S60->virtualMousePressedKeys |= QS60Data::Right;
+ dx = 1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyUpArrow:
+ S60->virtualMousePressedKeys |= QS60Data::Up;
+ dy = -1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDownArrow:
+ S60->virtualMousePressedKeys |= QS60Data::Down;
+ dy = 1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice10:
+ S60->virtualMousePressedKeys |= QS60Data::LeftUp;
+ dx = -1;
+ dy = -1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice11:
+ S60->virtualMousePressedKeys |= QS60Data::RightUp;
+ dx = 1;
+ dy = -1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice12:
+ S60->virtualMousePressedKeys |= QS60Data::RightDown;
+ dx = 1;
+ dy = 1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice13:
+ S60->virtualMousePressedKeys |= QS60Data::LeftDown;
+ dx = -1;
+ dy = 1;
+ fakeEvent.iType = TPointerEvent::EMove;
+ break;
+ case EStdKeyDevice3:
+ // Platform bug. If you start pressing several keys simultaneously (for
+ // example for drag'n'drop), Symbian starts producing spurious up and
+ // down messages for some keys. Therefore, make sure we have a clean slate
+ // of pressed keys before starting a new button press.
+ if (S60->virtualMousePressedKeys & QS60Data::Select) {
+ return EKeyWasConsumed;
+ } else {
+ S60->virtualMousePressedKeys |= QS60Data::Select;
+ fakeEvent.iType = TPointerEvent::EButton1Down;
+ if (m_doubleClickTimer.isValid()
&& !m_doubleClickTimer.hasExpired(QApplication::doubleClickInterval())) {
- fakeEvent.iModifiers |= EModifierDoubleClick;
- m_doubleClickTimer.invalidate();
- } else {
- m_doubleClickTimer.start();
- }
+ fakeEvent.iModifiers |= EModifierDoubleClick;
+ m_doubleClickTimer.invalidate();
+ } else {
+ m_doubleClickTimer.start();
}
- break;
- }
- if (dx) {
- int cdx = S60->virtualMouseAccelDX;
- //reset accel on change of sign, else double accel
- if (dx * cdx <= 0)
- cdx = dx;
- else
- cdx *= 4;
- //cap accelleration
- if (dx * cdx > S60->virtualMouseMaxAccel)
- cdx = dx * S60->virtualMouseMaxAccel;
- //move mouse position
- x += cdx;
- S60->virtualMouseAccelDX = cdx;
}
-
- if (dy) {
- int cdy = S60->virtualMouseAccelDY;
- if (dy * cdy <= 0)
- cdy = dy;
- else
- cdy *= 4;
- if (dy * cdy > S60->virtualMouseMaxAccel)
- cdy = dy * S60->virtualMouseMaxAccel;
- y += cdy;
- S60->virtualMouseAccelDY = cdy;
- }
- }
- //clip to screen size (window server allows a sprite hotspot to be outside the screen)
- if (x < 0)
- x = 0;
- else if (x >= S60->screenWidthInPixels)
- x = S60->screenWidthInPixels - 1;
- if (y < 0)
- y = 0;
- else if (y >= S60->screenHeightInPixels)
- y = S60->screenHeightInPixels - 1;
- TPoint epos(x, y);
- TPoint cpos = epos - PositionRelativeToScreen();
- fakeEvent.iPosition = cpos;
- fakeEvent.iParentPosition = epos;
- if(fakeEvent.iType != -1)
- HandlePointerEvent(fakeEvent);
- return EKeyWasConsumed;
- }
- }
-#endif
- // S60 has a confusing way of delivering key events. There are three types of
- // events: EKeyEvent, EKeyEventDown and EKeyEventUp. When a key is pressed, the
- // two first events are generated. When releasing the key, the last one is
- // generated.
- // Because S60 does not generate keysyms for EKeyEventDown and EKeyEventUp events,
- // we need to do some special tricks to map it to the Qt way. First, we completely
- // discard EKeyEventDown events, since they are redundant. Second, since
- // EKeyEventUp does not give us a keysym, we need to cache the keysyms from
- // the EKeyEvent events. This is what resolveS60ScanCode does.
-
-
- // ### hackish way to send Qt application to background when pressing right softkey
- /*
- if( keyEvent.iScanCode == EStdKeyDevice1 ) {
- S60->window_group->SetOrdinalPosition(-1);
- qApp->setActiveWindow(0);
- return EKeyWasNotConsumed;
- }
- */
-
- TUint s60Keysym = QApplicationPrivate::resolveS60ScanCode(keyEvent.iScanCode,
- keyEvent.iCode);
- int keyCode;
- if (s60Keysym == EKeyNull){ //some key events have 0 in iCode, for them iScanCode should be used
- keyCode = qt_keymapper_private()->mapS60ScanCodesToQt(keyEvent.iScanCode);
- } else if (s60Keysym >= 0x20 && s60Keysym < ENonCharacterKeyBase) {
- // Normal characters keys.
- keyCode = s60Keysym;
- } else {
- // Special S60 keys.
- keyCode = qt_keymapper_private()->mapS60KeyToQt(s60Keysym);
- }
-
- Qt::KeyboardModifiers mods = mapToQtModifiers(keyEvent.iModifiers);
- QKeyEventEx qKeyEvent(type == EEventKeyUp ? QEvent::KeyRelease : QEvent::KeyPress, keyCode,
- mods, qt_keymapper_private()->translateKeyEvent(keyCode, mods),
- (keyEvent.iRepeats != 0), 1, keyEvent.iScanCode, s60Keysym, keyEvent.iModifiers);
-// WId wid = reinterpret_cast<RWindowGroup *>(keyEvent.Handle())->Child();
-// if (!wid)
-// Could happen if window isn't shown yet.
-// return EKeyWasNotConsumed;
- QWidget *widget;
- widget = QWidget::keyboardGrabber();
- if (!widget) {
- if (QApplicationPrivate::popupWidgets != 0) {
- widget = QApplication::activePopupWidget()->focusWidget();
- if (!widget) {
- widget = QApplication::activePopupWidget();
+ break;
}
- } else {
- widget = QApplicationPrivate::focus_widget;
- if (!widget) {
- widget = qwidget;
+ if (dx) {
+ int cdx = S60->virtualMouseAccelDX;
+ //reset accel on change of sign, else double accel
+ if (dx * cdx <= 0)
+ cdx = dx;
+ else
+ cdx *= 4;
+ //cap accelleration
+ if (dx * cdx > S60->virtualMouseMaxAccel)
+ cdx = dx * S60->virtualMouseMaxAccel;
+ //move mouse position
+ x += cdx;
+ S60->virtualMouseAccelDX = cdx;
}
- }
- }
- QEventDispatcherS60 *dispatcher;
- // It is theoretically possible for someone to install a different event dispatcher.
- if ((dispatcher = qobject_cast<QEventDispatcherS60 *>(widget->d_func()->threadData->eventDispatcher)) != 0) {
- if (dispatcher->excludeUserInputEvents()) {
- dispatcher->saveInputEvent(this, widget, new QKeyEventEx(qKeyEvent));
- return EKeyWasConsumed;
+ if (dy) {
+ int cdy = S60->virtualMouseAccelDY;
+ if (dy * cdy <= 0)
+ cdy = dy;
+ else
+ cdy *= 4;
+ if (dy * cdy > S60->virtualMouseMaxAccel)
+ cdy = dy * S60->virtualMouseMaxAccel;
+ y += cdy;
+ S60->virtualMouseAccelDY = cdy;
+ }
}
+ //clip to screen size (window server allows a sprite hotspot to be outside the screen)
+ if (x < 0)
+ x = 0;
+ else if (x >= S60->screenWidthInPixels)
+ x = S60->screenWidthInPixels - 1;
+ if (y < 0)
+ y = 0;
+ else if (y >= S60->screenHeightInPixels)
+ y = S60->screenHeightInPixels - 1;
+ TPoint epos(x, y);
+ TPoint cpos = epos - PositionRelativeToScreen();
+ fakeEvent.iPosition = cpos;
+ fakeEvent.iParentPosition = epos;
+ if(fakeEvent.iType != -1)
+ HandlePointerEvent(fakeEvent);
+ return EKeyWasConsumed;
}
- return sendKeyEvent(widget, &qKeyEvent);
- }
}
+#endif
+
return EKeyWasNotConsumed;
}
@@ -1096,17 +1168,12 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle());
#ifdef Q_WS_S60
// If widget is fullscreen/minimized, hide status pane and button container otherwise show them.
- CEikStatusPane *statusPane = S60->statusPane();
- CEikButtonGroupContainer *buttonGroup = S60->buttonGroupContainer();
- TBool visible = !(qwidget->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
- if (statusPane)
- statusPane->MakeVisible(visible);
- if (buttonGroup) {
- // Visibility
- const TBool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen;
- const TBool cbaVisibilityHint = qwidget->windowFlags() & Qt::WindowSoftkeysVisibleHint;
- buttonGroup->MakeVisible(visible || (isFullscreen && cbaVisibilityHint));
- }
+ const bool visible = !(qwidget->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ const bool statusPaneVisibility = visible;
+ const bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen;
+ const bool cbaVisibilityHint = qwidget->windowFlags() & Qt::WindowSoftkeysVisibleHint;
+ const bool buttonGroupVisibility = (visible || (isFullscreen && cbaVisibilityHint));
+ S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
#endif
} else if (QApplication::activeWindow() == qwidget->window()) {
if (CCoeEnv::Static()->AppUi()->IsDisplayingMenuOrDialog() || S60->menuBeingConstructed) {
@@ -1456,6 +1523,8 @@ void qt_cleanup()
qt_S60Beep = 0;
}
QFontCache::cleanup(); // Has to happen now, since QFontEngineS60 has FBS handles
+ QPixmapCache::clear(); // Has to happen now, since QS60PixmapData has FBS handles
+
qt_cleanup_symbianFontDatabaseExtras();
// S60 structure and window server session are freed in eventdispatcher destructor as they are needed there
@@ -2076,13 +2145,18 @@ void QApplication::setEffectEnabled(Qt::UIEffect /* effect */, bool /* enable */
TUint QApplicationPrivate::resolveS60ScanCode(TInt scanCode, TUint keysym)
{
+ if (!scanCode)
+ return keysym;
+
+ QApplicationPrivate *d = QApplicationPrivate::instance();
+
if (keysym) {
// If keysym is specified, cache it.
- scanCodeCache.insert(scanCode, keysym);
+ d->scanCodeCache.insert(scanCode, keysym);
return keysym;
} else {
// If not, retrieve the cached version.
- return scanCodeCache[scanCode];
+ return d->scanCodeCache[scanCode];
}
}
diff --git a/src/gui/kernel/qapplication_win.cpp b/src/gui/kernel/qapplication_win.cpp
index 9e8a128676..ec26e812f4 100644
--- a/src/gui/kernel/qapplication_win.cpp
+++ b/src/gui/kernel/qapplication_win.cpp
@@ -2485,7 +2485,7 @@ extern "C" LRESULT QT_WIN_CALLBACK QtWndProc(HWND hwnd, UINT message, WPARAM wPa
if (OkCommand)
QApplication::postEvent(widget, new QEvent(QEvent::OkRequest));
if (CancelCommand)
- QApplication::postEvent(widget, new QEvent(QEvent::Close));
+ widget->showMinimized();
else
#ifndef QT_NO_MENUBAR
QMenuBar::wceCommands(LOWORD(wParam));
diff --git a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
index 5dcf613d63..7a9dc70a78 100644
--- a/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
+++ b/src/gui/kernel/qcocoaapplicationdelegate_mac.mm
@@ -196,7 +196,6 @@ static void cleanupCocoaApplicationDelegate()
qAppInstance()->quit();
startedQuit = false;
}
- return NSTerminateNow;
}
if (qtPrivate->threadData->eventLoops.size() == 0) {
diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
index 86528160eb..679514946c 100644
--- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
+++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h
@@ -85,6 +85,8 @@ QT_END_NAMESPACE
- (BOOL)canBecomeKeyWindow
{
QWidget *widget = [self QT_MANGLE_NAMESPACE(qt_qwidget)];
+ if (!widget)
+ return NO; // This should happen only for qt_root_win
bool isToolTip = (widget->windowType() == Qt::ToolTip);
bool isPopup = (widget->windowType() == Qt::Popup);
@@ -94,6 +96,8 @@ QT_END_NAMESPACE
- (BOOL)canBecomeMainWindow
{
QWidget *widget = [self QT_MANGLE_NAMESPACE(qt_qwidget)];
+ if (!widget)
+ return NO; // This should happen only for qt_root_win
bool isToolTip = (widget->windowType() == Qt::ToolTip);
bool isPopup = (widget->windowType() == Qt::Popup);
diff --git a/src/gui/kernel/qcocoaview_mac.mm b/src/gui/kernel/qcocoaview_mac.mm
index 5c90e2ece5..a552ce7f6f 100644
--- a/src/gui/kernel/qcocoaview_mac.mm
+++ b/src/gui/kernel/qcocoaview_mac.mm
@@ -269,6 +269,28 @@ static int qCocoaViewCount = 0;
dropData = new QCocoaDropData(dropPasteboard);
}
+- (void)changeDraggingCursor:(NSDragOperation)newOperation
+{
+ static SEL action = nil;
+ static bool operationSupported = false;
+ if (action == nil) {
+ action = NSSelectorFromString(@"operationNotAllowedCursor");
+ if ([NSCursor respondsToSelector:action]) {
+ operationSupported = true;
+ }
+ }
+ if (operationSupported) {
+ NSCursor *notAllowedCursor = [NSCursor performSelector:action];
+ bool isNotAllowedCursor = ([NSCursor currentCursor] == notAllowedCursor);
+ if (newOperation == NSDragOperationNone && !isNotAllowedCursor) {
+ [notAllowedCursor push];
+ } else if (newOperation != NSDragOperationNone && isNotAllowedCursor) {
+ [notAllowedCursor pop];
+ }
+
+ }
+}
+
- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender
{
// NB: This function is called from QCoocaWindow/QCocoaPanel rather than directly
@@ -300,6 +322,7 @@ static int qCocoaViewCount = 0;
if (!qDEEvent.isAccepted()) {
// widget is not interested in this drag, so ignore this drop data.
[self removeDropData];
+ [self changeDraggingCursor:NSDragOperationNone];
return NSDragOperationNone;
} else {
// save the mouse position, used by draggingExited handler.
@@ -321,6 +344,7 @@ static int qCocoaViewCount = 0;
nsActions = QT_PREPEND_NAMESPACE(qt_mac_mapDropAction)(qDMEvent.dropAction());
}
QT_PREPEND_NAMESPACE(qt_mac_copy_answer_rect)(qDMEvent);
+ [self changeDraggingCursor:nsActions];
return nsActions;
}
}
@@ -335,16 +359,21 @@ static int qCocoaViewCount = 0;
if (dragEnterSequence != [sender draggingSequenceNumber])
[self draggingEntered:sender];
// drag enter event was rejected, so ignore the move event.
- if (dropData == 0)
+ if (dropData == 0) {
+ [self changeDraggingCursor:NSDragOperationNone];
return NSDragOperationNone;
+ }
// return last value, if we are still in the answerRect.
NSPoint globalPoint = [[sender draggingDestinationWindow] convertBaseToScreen:windowPoint];
NSPoint localPoint = [self convertPoint:windowPoint fromView:nil];
NSDragOperation nsActions = [sender draggingSourceOperationMask];
QPoint posDrag(localPoint.x, localPoint.y);
if (qt_mac_mouse_inside_answer_rect(posDrag)
- && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) == nsActions)
- return QT_PREPEND_NAMESPACE(qt_mac_mapDropActions)(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastAction));
+ && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) == nsActions) {
+ NSDragOperation operation = QT_PREPEND_NAMESPACE(qt_mac_mapDropActions)(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastAction));
+ [self changeDraggingCursor:operation];
+ return operation;
+ }
// send drag move event to the widget
QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec.lastOperation) = nsActions;
Qt::DropActions qtAllowed = QT_PREPEND_NAMESPACE(qt_mac_mapNSDragOperations)(nsActions);
@@ -361,7 +390,10 @@ static int qCocoaViewCount = 0;
if (QDragManager::self()->source())
mimeData = QDragManager::self()->dragPrivate()->data;
QDragMoveEvent qDMEvent(posDrag, qtAllowed, mimeData, QApplication::mouseButtons(), modifiers);
- qDMEvent.setDropAction(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).lastAction);
+ if (QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).lastAction != Qt::IgnoreAction
+ && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).buttons == qDMEvent.mouseButtons()
+ && QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).modifiers == qDMEvent.keyboardModifiers())
+ qDMEvent.setDropAction(QT_PREPEND_NAMESPACE(qt_mac_dnd_answer_rec).lastAction);
qDMEvent.accept();
QApplication::sendEvent(qwidget, &qDMEvent);
@@ -373,6 +405,7 @@ static int qCocoaViewCount = 0;
qDMEvent.setDropAction(Qt::IgnoreAction);
}
qt_mac_copy_answer_rect(qDMEvent);
+ [self changeDraggingCursor:operation];
return operation;
}
@@ -388,6 +421,8 @@ static int qCocoaViewCount = 0;
QApplication::sendEvent(qwidget, &de);
[self removeDropData];
}
+ [self changeDraggingCursor:NSDragOperationEvery];
+
}
- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender
diff --git a/src/gui/kernel/qcocoaview_mac_p.h b/src/gui/kernel/qcocoaview_mac_p.h
index 33aaa24f8b..b6b63ca3ca 100644
--- a/src/gui/kernel/qcocoaview_mac_p.h
+++ b/src/gui/kernel/qcocoaview_mac_p.h
@@ -106,6 +106,7 @@ Q_GUI_EXPORT
- (void) qt_clearQWidget;
- (BOOL)qt_leftButtonIsRightButton;
- (void)qt_setLeftButtonIsRightButton:(BOOL)isSwapped;
+- (void)changeDraggingCursor:(NSDragOperation)newOperation;
+ (DnDParams*)currentMouseEvent;
@end
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac.mm b/src/gui/kernel/qcocoawindowdelegate_mac.mm
index 2b9cf8517b..ffba6c2569 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac.mm
+++ b/src/gui/kernel/qcocoawindowdelegate_mac.mm
@@ -394,5 +394,25 @@ static void cleanupCocoaWindowDelegate()
}
return NO;
}
+
+- (void)syncContentViewFrame: (NSNotification *)notification
+{
+ NSView *cView = [notification object];
+ if (cView) {
+ NSWindow *window = [cView window];
+ QWidget *qwidget = m_windowHash->value(window);
+ if (qwidget) {
+ QWidgetData *widgetData = qt_qwidget_data(qwidget);
+ NSRect rect = [cView frame];
+ const QSize newSize(rect.size.width, rect.size.height);
+ const QSize &oldSize = widgetData->crect.size();
+ if (newSize != oldSize) {
+ [self syncSizeForWidget:qwidget toSize:newSize fromSize:oldSize];
+ }
+ }
+
+ }
+}
+
@end
#endif// QT_MAC_USE_COCOA
diff --git a/src/gui/kernel/qcocoawindowdelegate_mac_p.h b/src/gui/kernel/qcocoawindowdelegate_mac_p.h
index de9c946169..2ca9b13e84 100644
--- a/src/gui/kernel/qcocoawindowdelegate_mac_p.h
+++ b/src/gui/kernel/qcocoawindowdelegate_mac_p.h
@@ -105,5 +105,6 @@ QT_FORWARD_DECLARE_CLASS(QWidgetData)
- (NSSize)closestAcceptableSizeForWidget:(QWidget *)qwidget
window:(NSWindow *)window withNewSize:(NSSize)proposedSize;
- (QWidget *)qt_qwidgetForWindow:(NSWindow *)window;
+- (void)syncContentViewFrame: (NSNotification *)notification;
@end
#endif
diff --git a/src/gui/kernel/qdesktopwidget_s60.cpp b/src/gui/kernel/qdesktopwidget_s60.cpp
index e4d0bf3538..a07f4a7e16 100644
--- a/src/gui/kernel/qdesktopwidget_s60.cpp
+++ b/src/gui/kernel/qdesktopwidget_s60.cpp
@@ -103,6 +103,10 @@ void QDesktopWidgetPrivate::init(QDesktopWidget *that)
rects->resize(QDesktopWidgetPrivate::screenCount);
workrects->resize(QDesktopWidgetPrivate::screenCount);
+
+ (*rects)[0].setRect(0, 0, S60->screenWidthInPixels, S60->screenHeightInPixels);
+ QRect wr = qt_TRect2QRect(static_cast<CEikAppUi*>(S60->appUi())->ClientRect());
+ (*workrects)[0].setRect(wr.x(), wr.y(), wr.width(), wr.height());
}
void QDesktopWidgetPrivate::cleanup()
@@ -146,17 +150,23 @@ QWidget *QDesktopWidget::screen(int /* screen */)
return this;
}
-const QRect QDesktopWidget::availableGeometry(int /* screen */) const
+const QRect QDesktopWidget::availableGeometry(int screen) const
{
- TRect clientRect = static_cast<CEikAppUi*>(S60->appUi())->ClientRect();
- return qt_TRect2QRect(clientRect);
+ Q_D(const QDesktopWidget);
+ if (screen < 0 || screen >= d->screenCount)
+ screen = d->primaryScreen;
+
+ return d->workrects->at(screen);
}
-const QRect QDesktopWidget::screenGeometry(int /* screen */) const
+const QRect QDesktopWidget::screenGeometry(int screen) const
{
Q_D(const QDesktopWidget);
- return QRect(0, 0, S60->screenWidthInPixels, S60->screenHeightInPixels);
- }
+ if (screen < 0 || screen >= d->screenCount)
+ screen = d->primaryScreen;
+
+ return d->rects->at(screen);
+}
int QDesktopWidget::screenNumber(const QWidget * /* widget */) const
{
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 92eed33f59..bbc9e0b067 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -3627,7 +3627,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
\brief The QTouchEvent class contains parameters that describe a touch event.
\since 4.6
\ingroup events
- \ingroup multitouch
+ \ingroup touch
\section1 Enabling Touch Events
@@ -3641,7 +3641,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
Similarly to QMouseEvent, Qt automatically grabs each touch point on the first press inside a
widget, and the widget will receive all updates for the touch point until it is released.
- Note that it is possible for a widget to receive events for multiple touch points, and that
+ Note that it is possible for a widget to receive events for numerous touch points, and that
multiple widgets may be receiving touch events at the same time.
\section1 Event Handling
@@ -3717,7 +3717,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
\i As mentioned above, enabling touch events means multiple widgets can be receiving touch
events simultaneously. Combined with the default QWidget::event() handling for QTouchEvents,
- this gives you great flexibility in designing multi-touch user interfaces. Be aware of the
+ this gives you great flexibility in designing touch user interfaces. Be aware of the
implications. For example, it is possible that the user is moving a QSlider with one finger and
pressing a QPushButton with another. The signals emitted by these widgets will be
interleaved.
@@ -3729,7 +3729,7 @@ QMenubarUpdatedEvent::QMenubarUpdatedEvent(QMenuBar * const menuBar)
\i QTouchEvents are not affected by a \l{QWidget::grabMouse()}{mouse grab} or an
\l{QApplication::activePopupWidget()}{active pop-up widget}. The behavior of QTouchEvents is
- undefined when opening a pop-up or grabbing the mouse while there are multiple active touch
+ undefined when opening a pop-up or grabbing the mouse while there are more than one active touch
points.
\endlist
diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp
index f5688f4f64..4a4452ab07 100644
--- a/src/gui/kernel/qgesture.cpp
+++ b/src/gui/kernel/qgesture.cpp
@@ -41,6 +41,7 @@
#include "qgesture.h"
#include "private/qgesture_p.h"
+#include "private/qstandardgestures_p.h"
#ifndef QT_NO_GESTURES
@@ -305,10 +306,10 @@ void QPanGesture::setAcceleration(qreal value)
\class QPinchGesture
\since 4.6
\brief The QPinchGesture class describes a pinch gesture made my the user.
- \ingroup multitouch
+ \ingroup touch
\ingroup gestures
- A pinch gesture is a form of multitouch user input in which the user typically
+ A pinch gesture is a form of touch user input in which the user typically
touches two points on the input device with a thumb and finger, before moving
them closer together or further apart to change the scale factor, zoom, or level
of detail of the user interface.
@@ -388,7 +389,7 @@ void QPanGesture::setAcceleration(qreal value)
\brief the current scale factor
The scale factor measures the scale factor associated with the distance
- between two of the user's inputs on a multitouch device.
+ between two of the user's inputs on a touch device.
\sa totalScaleFactor, lastScaleFactor
*/
@@ -726,6 +727,34 @@ void QTapAndHoldGesture::setPosition(const QPointF &value)
d_func()->position = value;
}
+/*!
+ Set the timeout, in milliseconds, before the gesture triggers.
+
+ The recognizer will detect a touch down and and if \a msecs
+ later the touch is still down, it will trigger the QTapAndHoldGesture.
+ The default value is 700 milliseconds.
+*/
+// static
+void QTapAndHoldGesture::setTimeout(int msecs)
+{
+ QTapAndHoldGesturePrivate::Timeout = msecs;
+}
+
+/*!
+ Gets the timeout, in milliseconds, before the gesture triggers.
+
+ The recognizer will detect a touch down and and if timeout()
+ later the touch is still down, it will trigger the QTapAndHoldGesture.
+ The default value is 700 milliseconds.
+*/
+// static
+int QTapAndHoldGesture::timeout()
+{
+ return QTapAndHoldGesturePrivate::Timeout;
+}
+
+int QTapAndHoldGesturePrivate::Timeout = 700; // in ms
+
QT_END_NAMESPACE
#endif // QT_NO_GESTURES
diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h
index 8c10895140..dcb02648a1 100644
--- a/src/gui/kernel/qgesture.h
+++ b/src/gui/kernel/qgesture.h
@@ -134,6 +134,7 @@ class Q_GUI_EXPORT QPinchGesture : public QGesture
{
Q_OBJECT
Q_DECLARE_PRIVATE(QPinchGesture)
+ Q_FLAGS(ChangeFlags ChangeFlag)
public:
enum ChangeFlag {
@@ -191,6 +192,8 @@ public:
friend class QPinchGestureRecognizer;
};
+Q_DECLARE_OPERATORS_FOR_FLAGS(QPinchGesture::ChangeFlags)
+
QT_END_NAMESPACE
Q_DECLARE_METATYPE(QPinchGesture::ChangeFlags)
@@ -252,6 +255,9 @@ public:
QPointF position() const;
void setPosition(const QPointF &pos);
+ static void setTimeout(int msecs);
+ static int timeout();
+
friend class QTapAndHoldGestureRecognizer;
};
diff --git a/src/gui/kernel/qgesture_p.h b/src/gui/kernel/qgesture_p.h
index f5474c1fe4..29b923e156 100644
--- a/src/gui/kernel/qgesture_p.h
+++ b/src/gui/kernel/qgesture_p.h
@@ -177,6 +177,7 @@ public:
QPointF position;
int timerId;
+ static int Timeout;
};
QT_END_NAMESPACE
diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp
index e43a560503..fe9dd8af6c 100644
--- a/src/gui/kernel/qgesturemanager.cpp
+++ b/src/gui/kernel/qgesturemanager.cpp
@@ -71,7 +71,7 @@
QT_BEGIN_NAMESPACE
QGestureManager::QGestureManager(QObject *parent)
- : QObject(parent), state(NotGesture), m_lastCustomGestureId(0)
+ : QObject(parent), state(NotGesture), m_lastCustomGestureId(Qt::CustomGesture)
{
qRegisterMetaType<Qt::GestureState>();
@@ -119,7 +119,7 @@ Qt::GestureType QGestureManager::registerGestureRecognizer(QGestureRecognizer *r
if (type == Qt::CustomGesture) {
// generate a new custom gesture id
++m_lastCustomGestureId;
- type = Qt::GestureType(Qt::CustomGesture + m_lastCustomGestureId);
+ type = Qt::GestureType(m_lastCustomGestureId);
}
m_recognizers.insertMulti(type, recognizer);
delete dummy;
diff --git a/src/gui/kernel/qguifunctions_wince.cpp b/src/gui/kernel/qguifunctions_wince.cpp
index f5004b09ff..377dfe3187 100644
--- a/src/gui/kernel/qguifunctions_wince.cpp
+++ b/src/gui/kernel/qguifunctions_wince.cpp
@@ -76,6 +76,10 @@ struct AygSIPINFO
#define SHIDIF_SIZEDLGFULLSCREEN 0x0004
#endif
+#ifndef SHDB_HIDE
+#define SHDB_HIDE 0x0002
+#endif
+
#ifndef SHFS_SHOWTASKBAR
#define SHFS_SHOWTASKBAR 0x0001
#endif
@@ -112,10 +116,12 @@ struct AygSIPINFO
typedef BOOL (*AygInitDialog)(AygSHINITDLGINFO*);
typedef BOOL (*AygFullScreen)(HWND, DWORD);
typedef BOOL (*AygSHSipInfo)(UINT, UINT, PVOID, UINT);
+typedef BOOL (*AygSHDoneButton)(HWND, DWORD);
static AygInitDialog ptrAygInitDialog = 0;
static AygFullScreen ptrAygFullScreen = 0;
static AygSHSipInfo ptrAygSHSipInfo = 0;
+static AygSHDoneButton ptrAygSHDoneButton = 0;
static bool aygResolved = false;
static void resolveAygLibs()
@@ -128,18 +134,10 @@ static void resolveAygLibs()
ptrAygInitDialog = (AygInitDialog) ayglib.resolve("SHInitDialog");
ptrAygFullScreen = (AygFullScreen) ayglib.resolve("SHFullScreen");
ptrAygSHSipInfo = (AygSHSipInfo) ayglib.resolve("SHSipInfo");
+ ptrAygSHDoneButton = (AygSHDoneButton) ayglib.resolve("SHDoneButton");
}
}
-struct DIBINFO : public BITMAPINFO
-{
- RGBQUAD arColors[255];
-
- operator LPBITMAPINFO() { return (LPBITMAPINFO) this; }
- operator LPBITMAPINFOHEADER() { return &bmiHeader; }
- RGBQUAD* ColorTable() { return bmiColors; }
-};
-
int qt_wince_GetDIBits(HDC /*hdc*/ , HBITMAP hSourceBitmap, uint, uint, LPVOID lpvBits, LPBITMAPINFO, uint)
{
if (!lpvBits) {
@@ -323,6 +321,8 @@ void qt_wince_maximize(QWidget *widget)
shidi.dwFlags |= SHIDIF_CANCELBUTTON;
if (widget->windowFlags() & Qt::WindowOkButtonHint)
shidi.dwFlags |= SHIDIF_DONEBUTTON;
+ if (!(widget->windowFlags() & (Qt::WindowCancelButtonHint | Qt::WindowOkButtonHint)))
+ shidi.dwFlags |= SHIDIF_CANCELBUTTON;
resolveAygLibs();
if (ptrAygInitDialog)
ptrAygInitDialog(&shidi);
@@ -334,6 +334,16 @@ void qt_wince_maximize(QWidget *widget)
}
}
+void qt_wince_unmaximize(QWidget *widget)
+{
+ if (ptrAygSHDoneButton && qt_wince_is_mobile()
+ && !(widget->windowFlags() & (Qt::WindowCancelButtonHint | Qt::WindowOkButtonHint)))
+ {
+ // Hide the [X] button, we've added in qt_wince_maximize.
+ ptrAygSHDoneButton(widget->winId(), SHDB_HIDE);
+ }
+}
+
void qt_wince_minimize(HWND hwnd)
{
#ifdef Q_OS_WINCE_WM
diff --git a/src/gui/kernel/qpalette.cpp b/src/gui/kernel/qpalette.cpp
index 98e8f66d74..38ec806327 100644
--- a/src/gui/kernel/qpalette.cpp
+++ b/src/gui/kernel/qpalette.cpp
@@ -868,11 +868,21 @@ void QPalette::detach()
Returns true (slowly) if this palette is different from \a p;
otherwise returns false (usually quickly).
+
+ \note The current ColorGroup is not taken into account when
+ comparing palettes
+
+ \sa operator==
*/
/*!
Returns true (usually quickly) if this palette is equal to \a p;
otherwise returns false (slowly).
+
+ \note The current ColorGroup is not taken into account when
+ comparing palettes
+
+ \sa operator!=
*/
bool QPalette::operator==(const QPalette &p) const
{
diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp
index 62d8a5390d..127e150979 100644
--- a/src/gui/kernel/qstandardgestures.cpp
+++ b/src/gui/kernel/qstandardgestures.cpp
@@ -515,34 +515,39 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
const QTouchEvent *ev = static_cast<const QTouchEvent *>(event);
const QMouseEvent *me = static_cast<const QMouseEvent *>(event);
+#ifndef QT_NO_GRAPHICSVIEW
const QGraphicsSceneMouseEvent *gsme = static_cast<const QGraphicsSceneMouseEvent *>(event);
+#endif
- enum { TimerInterval = 2000 };
enum { TapRadius = 40 };
switch (event->type()) {
+#ifndef QT_NO_GRAPHICSVIEW
case QEvent::GraphicsSceneMousePress:
d->position = gsme->screenPos();
q->setHotSpot(d->position);
if (d->timerId)
q->killTimer(d->timerId);
- d->timerId = q->startTimer(TimerInterval);
+ d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
+#endif
case QEvent::MouseButtonPress:
d->position = me->globalPos();
q->setHotSpot(d->position);
if (d->timerId)
q->killTimer(d->timerId);
- d->timerId = q->startTimer(TimerInterval);
+ d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
case QEvent::TouchBegin:
d->position = ev->touchPoints().at(0).startScreenPos();
q->setHotSpot(d->position);
if (d->timerId)
q->killTimer(d->timerId);
- d->timerId = q->startTimer(TimerInterval);
+ d->timerId = q->startTimer(QTapAndHoldGesturePrivate::Timeout);
return QGestureRecognizer::MayBeGesture; // we don't show a sign of life until the timeout
+#ifndef QT_NO_GRAPHICSVIEW
case QEvent::GraphicsSceneMouseRelease:
+#endif
case QEvent::MouseButtonRelease:
case QEvent::TouchEnd:
return QGestureRecognizer::CancelGesture; // get out of the MayBeGesture state
@@ -560,12 +565,14 @@ QTapAndHoldGestureRecognizer::recognize(QGesture *state, QObject *object,
return QGestureRecognizer::MayBeGesture;
return QGestureRecognizer::CancelGesture;
}
+#ifndef QT_NO_GRAPHICSVIEW
case QEvent::GraphicsSceneMouseMove: {
QPoint delta = gsme->screenPos() - d->position.toPoint();
if (d->timerId && delta.manhattanLength() <= TapRadius)
return QGestureRecognizer::MayBeGesture;
return QGestureRecognizer::CancelGesture;
}
+#endif
default:
return QGestureRecognizer::Ignore;
}
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index d8ef67d387..7f0c99e4d5 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -143,6 +143,14 @@ public:
int menuBeingConstructed : 1;
int memoryLimitForHwRendering;
QApplication::QS60MainApplicationFactory s60ApplicationFactory; // typedef'ed pointer type
+
+ enum ScanCodeState {
+ Unpressed,
+ KeyDown,
+ KeyDownAndKey
+ };
+ QHash<TInt, ScanCodeState> scanCodeStates;
+
static inline void updateScreenSize();
inline RWsSession& wsSession();
static inline RWindowGroup& windowGroup();
@@ -155,6 +163,7 @@ public:
static inline CAknTitlePane* titlePane();
static inline CAknContextPane* contextPane();
static inline CEikButtonGroupContainer* buttonGroupContainer();
+ static void setStatusPaneAndButtonGroupVisibility(bool statusPaneVisible, bool buttonGroupVisible);
#endif
#ifdef Q_OS_SYMBIAN
@@ -223,7 +232,9 @@ protected:
private:
void HandlePointerEvent(const TPointerEvent& aPointerEvent);
TKeyResponse OfferKeyEvent(const TKeyEvent& aKeyEvent,TEventCode aType);
+ TKeyResponse sendSymbianKeyEvent(const TKeyEvent &keyEvent, QEvent::Type type);
TKeyResponse sendKeyEvent(QWidget *widget, QKeyEvent *keyEvent);
+ TKeyResponse handleVirtualMouse(const TKeyEvent& keyEvent,TEventCode type);
bool sendMouseEvent(QWidget *widget, QMouseEvent *mEvent);
void sendMouseEvent(
QWidget *receiver,
@@ -236,6 +247,8 @@ private:
#ifdef QT_SYMBIAN_SUPPORTS_ADVANCED_POINTER
void translateAdvancedPointerEvent(const TAdvancedPointerEvent *event);
#endif
+
+public:
void handleClientAreaChange();
private:
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index c236c60dbd..9946d5df61 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -343,8 +343,10 @@ QInputContext *QWidgetPrivate::inputContext() const
#ifndef QT_NO_IM
if (ic)
return ic;
-#endif
return qApp->inputContext();
+#else
+ return 0;
+#endif
}
/*!
@@ -12071,8 +12073,8 @@ void QWidget::ungrabGesture(Qt::GestureType gesture)
{
Q_D(QWidget);
if (d->gestureContext.remove(gesture)) {
- QGestureManager *manager = QGestureManager::instance();
- manager->cleanupCachedGestures(this, gesture);
+ if (QGestureManager *manager = QGestureManager::instance())
+ manager->cleanupCachedGestures(this, gesture);
}
}
#endif // QT_NO_GESTURES
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index e57ec77177..8ae6a9948a 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -1599,12 +1599,14 @@ void QWidgetPrivate::toggleDrawers(bool visible)
continue;
QWidget *widget = static_cast<QWidget*>(object);
if(qt_mac_is_macdrawer(widget)) {
+ bool oldState = widget->testAttribute(Qt::WA_WState_ExplicitShowHide);
if(visible) {
if (!widget->testAttribute(Qt::WA_WState_ExplicitShowHide))
widget->show();
} else {
widget->hide();
- widget->setAttribute(Qt::WA_WState_ExplicitShowHide, false);
+ if(!oldState)
+ widget->setAttribute(Qt::WA_WState_ExplicitShowHide, false);
}
}
}
@@ -4389,6 +4391,13 @@ void QWidgetPrivate::setGeometry_sys_helper(int x, int y, int w, int h, bool isM
data.window_state = data.window_state & ~Qt::WindowMaximized;
const bool visible = q->isVisible();
+ // Apply size restrictions, applicable for Windows & Widgets.
+ if (QWExtra *extra = extraData()) {
+ w = qMin(w, extra->maxw);
+ h = qMin(h, extra->maxh);
+ w = qMax(w, extra->minw);
+ h = qMax(h, extra->minh);
+ }
data.crect = QRect(x, y, w, h);
if (realWindow) {
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index 2818d8827c..56349ad6d5 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -1113,15 +1113,10 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
// The window decoration visibility has to be changed before doing actual window state
// change since in that order the availableGeometry will return directly the right size and
// we will avoid unnecessarty redraws
- CEikStatusPane *statusPane = S60->statusPane();
- CEikButtonGroupContainer *buttonGroup = S60->buttonGroupContainer();
- TBool visible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized));
- if (statusPane)
- statusPane->MakeVisible(visible);
- if (buttonGroup) {
- // Visibility
- buttonGroup->MakeVisible(visible || (isFullscreen && cbaRequested));
- }
+ const bool visible = !(newstate & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ const bool statusPaneVisibility = visible;
+ const bool buttonGroupVisibility = (visible || (isFullscreen && cbaRequested));
+ S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
#endif // Q_WS_S60
// Ensure the initial size is valid, since we store it as normalGeometry below.
@@ -1133,8 +1128,10 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
const bool cbaVisibilityHint = windowFlags() & Qt::WindowSoftkeysVisibleHint;
if (newstate & Qt::WindowFullScreen && !cbaVisibilityHint) {
+ setAttribute(Qt::WA_OutsideWSRange, false);
window->SetExtentToWholeScreen();
} else if (newstate & Qt::WindowMaximized || ((newstate & Qt::WindowFullScreen) && cbaVisibilityHint)) {
+ setAttribute(Qt::WA_OutsideWSRange, false);
TRect maxExtent = qt_QRect2TRect(qApp->desktop()->availableGeometry(this));
window->SetExtent(maxExtent.iTl, maxExtent.Size());
} else {
@@ -1143,7 +1140,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
// accurate because it did not consider the status pane. This means that when returning
// normal mode after showing the status pane, the geometry would overlap so we should
// move it if it never had an explicit position.
- if (!wasMoved && statusPane && visible) {
+ if (!wasMoved && S60->statusPane() && visible) {
TPoint tl = static_cast<CEikAppUi*>(S60->appUi())->ClientRect().iTl;
normalGeometry.setTopLeft(QPoint(tl.iX, tl.iY));
}
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 0f05c6b694..23f57dad24 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -70,6 +70,7 @@
#include "qguifunctions_wince.h"
QT_USE_NAMESPACE
extern void qt_wince_maximize(QWidget *widget); //defined in qguifunctions_wince.cpp
+extern void qt_wince_unmaximize(QWidget *widget); //defined in qguifunctions_wince.cpp
extern void qt_wince_minimize(HWND hwnd); //defined in qguifunctions_wince.cpp
extern void qt_wince_full_screen(HWND hwnd, bool fullScreen, UINT swpf); //defined in qguifunctions_wince.cpp
extern bool qt_wince_is_mobile(); //defined in qguifunctions_wince.cpp
diff --git a/src/gui/kernel/qwidget_wince.cpp b/src/gui/kernel/qwidget_wince.cpp
index fc1e52caf9..76532ed791 100644
--- a/src/gui/kernel/qwidget_wince.cpp
+++ b/src/gui/kernel/qwidget_wince.cpp
@@ -498,6 +498,7 @@ void QWidget::setWindowState(Qt::WindowStates newstate)
int style = GetWindowLong(internalWinId(), GWL_STYLE) | WS_BORDER | WS_POPUP | WS_CAPTION;
SetWindowLong(internalWinId(), GWL_STYLE, style);
SetWindowLong(internalWinId(), GWL_EXSTYLE, GetWindowLong (internalWinId(), GWL_EXSTYLE) & ~ WS_EX_NODRAG);
+ qt_wince_unmaximize(this);
}
if (isVisible() && newstate & Qt::WindowMaximized)
qt_wince_maximize(this);
diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp
index ca9556b282..4ce2beece8 100644
--- a/src/gui/painting/qdrawhelper.cpp
+++ b/src/gui/painting/qdrawhelper.cpp
@@ -1314,7 +1314,7 @@ static void QT_FASTCALL comp_func_solid_Clear(uint *dest, int length, uint, uint
comp_func_Clear_impl(dest, length, const_alpha);
}
-static void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha)
{
comp_func_Clear_impl(dest, length, const_alpha);
}
@@ -1338,7 +1338,7 @@ static void QT_FASTCALL comp_func_solid_Source(uint *dest, int length, uint colo
}
}
-static void QT_FASTCALL comp_func_Source(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Source(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255) {
::memcpy(dest, src, length * sizeof(uint));
@@ -1356,7 +1356,7 @@ static void QT_FASTCALL comp_func_solid_Destination(uint *, int, uint, uint)
{
}
-static void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint)
+void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint)
{
}
@@ -1381,7 +1381,7 @@ static void QT_FASTCALL comp_func_solid_SourceOver(uint *dest, int length, uint
}
}
-static void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1419,7 +1419,7 @@ static void QT_FASTCALL comp_func_solid_DestinationOver(uint *dest, int length,
}
}
-static void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1461,7 +1461,7 @@ static void QT_FASTCALL comp_func_solid_SourceIn(uint *dest, int length, uint co
}
}
-static void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1498,7 +1498,7 @@ static void QT_FASTCALL comp_func_solid_DestinationIn(uint *dest, int length, ui
}
}
-static void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1540,7 +1540,7 @@ static void QT_FASTCALL comp_func_solid_SourceOut(uint *dest, int length, uint c
}
}
-static void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1576,7 +1576,7 @@ static void QT_FASTCALL comp_func_solid_DestinationOut(uint *dest, int length, u
}
}
-static void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1613,7 +1613,7 @@ static void QT_FASTCALL comp_func_solid_SourceAtop(uint *dest, int length, uint
}
}
-static void QT_FASTCALL comp_func_SourceAtop(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SourceAtop(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1653,7 +1653,7 @@ static void QT_FASTCALL comp_func_solid_DestinationAtop(uint *dest, int length,
}
}
-static void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1695,7 +1695,7 @@ static void QT_FASTCALL comp_func_solid_XOR(uint *dest, int length, uint color,
}
}
-static void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, uint const_alpha)
{
PRELOAD_INIT2(dest, src)
if (const_alpha == 255) {
@@ -1715,11 +1715,6 @@ static void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, u
}
}
-static const uint AMASK = 0xff000000;
-static const uint RMASK = 0x00ff0000;
-static const uint GMASK = 0x0000ff00;
-static const uint BMASK = 0x000000ff;
-
struct QFullCoverage {
inline void store(uint *dest, const uint src) const
{
@@ -1794,7 +1789,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Plus_impl(uint *dest, const uin
}
}
-static void QT_FASTCALL comp_func_Plus(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Plus(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Plus_impl(dest, src, length, QFullCoverage());
@@ -1866,7 +1861,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Multiply_impl(uint *dest, const
}
}
-static void QT_FASTCALL comp_func_Multiply(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Multiply(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Multiply_impl(dest, src, length, QFullCoverage());
@@ -1934,7 +1929,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Screen_impl(uint *dest, const u
}
}
-static void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Screen_impl(dest, src, length, QFullCoverage());
@@ -2013,7 +2008,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Overlay_impl(uint *dest, const
}
}
-static void QT_FASTCALL comp_func_Overlay(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Overlay(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Overlay_impl(dest, src, length, QFullCoverage());
@@ -2086,7 +2081,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Darken_impl(uint *dest, const u
}
}
-static void QT_FASTCALL comp_func_Darken(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Darken(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Darken_impl(dest, src, length, QFullCoverage());
@@ -2159,7 +2154,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Lighten_impl(uint *dest, const
}
}
-static void QT_FASTCALL comp_func_Lighten(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Lighten(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Lighten_impl(dest, src, length, QFullCoverage());
@@ -2242,7 +2237,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorDodge_impl(uint *dest, con
}
}
-static void QT_FASTCALL comp_func_ColorDodge(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_ColorDodge(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_ColorDodge_impl(dest, src, length, QFullCoverage());
@@ -2325,7 +2320,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_ColorBurn_impl(uint *dest, cons
}
}
-static void QT_FASTCALL comp_func_ColorBurn(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_ColorBurn(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_ColorBurn_impl(dest, src, length, QFullCoverage());
@@ -2405,7 +2400,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_HardLight_impl(uint *dest, cons
}
}
-static void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_HardLight_impl(dest, src, length, QFullCoverage());
@@ -2496,7 +2491,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_SoftLight_impl(uint *dest, cons
}
}
-static void QT_FASTCALL comp_func_SoftLight(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_SoftLight(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_SoftLight_impl(dest, src, length, QFullCoverage());
@@ -2569,7 +2564,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Difference_impl(uint *dest, con
}
}
-static void QT_FASTCALL comp_func_Difference(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Difference(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Difference_impl(dest, src, length, QFullCoverage());
@@ -2636,7 +2631,7 @@ Q_STATIC_TEMPLATE_FUNCTION inline void comp_func_Exclusion_impl(uint *dest, cons
}
}
-static void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, uint const_alpha)
+void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, uint const_alpha)
{
if (const_alpha == 255)
comp_func_Exclusion_impl(dest, src, length, QFullCoverage());
@@ -2659,10 +2654,10 @@ static void QT_FASTCALL rasterop_solid_SourceOrDestination(uint *dest,
*dest++ |= color;
}
-static void QT_FASTCALL rasterop_SourceOrDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_SourceOrDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--)
@@ -2680,10 +2675,10 @@ static void QT_FASTCALL rasterop_solid_SourceAndDestination(uint *dest,
*dest++ &= color;
}
-static void QT_FASTCALL rasterop_SourceAndDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_SourceAndDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -2703,10 +2698,10 @@ static void QT_FASTCALL rasterop_solid_SourceXorDestination(uint *dest,
*dest++ ^= color;
}
-static void QT_FASTCALL rasterop_SourceXorDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_SourceXorDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -2728,10 +2723,10 @@ static void QT_FASTCALL rasterop_solid_NotSourceAndNotDestination(uint *dest,
}
}
-static void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -2753,10 +2748,10 @@ static void QT_FASTCALL rasterop_solid_NotSourceOrNotDestination(uint *dest,
}
}
-static void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -2778,10 +2773,10 @@ static void QT_FASTCALL rasterop_solid_NotSourceXorDestination(uint *dest,
}
}
-static void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -2797,8 +2792,8 @@ static void QT_FASTCALL rasterop_solid_NotSource(uint *dest, int length,
qt_memfill(dest, ~color | 0xff000000, length);
}
-static void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src,
- int length, uint const_alpha)
+void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src,
+ int length, uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--)
@@ -2818,10 +2813,10 @@ static void QT_FASTCALL rasterop_solid_NotSourceAndDestination(uint *dest,
}
}
-static void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -2842,10 +2837,10 @@ static void QT_FASTCALL rasterop_solid_SourceAndNotDestination(uint *dest,
}
}
-static void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest,
- const uint *src,
- int length,
- uint const_alpha)
+void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest,
+ const uint *src,
+ int length,
+ uint const_alpha)
{
Q_UNUSED(const_alpha);
while (length--) {
@@ -7775,6 +7770,7 @@ void qInitDrawhelperAsm()
#ifdef QT_HAVE_MMX
if (features & MMX) {
functionForModeAsm = qt_functionForMode_MMX;
+
functionForModeSolidAsm = qt_functionForModeSolid_MMX;
qDrawHelper[QImage::Format_ARGB32_Premultiplied].blendColor = qt_blend_color_argb_mmx;
#ifdef QT_HAVE_3DNOW
@@ -7823,8 +7819,10 @@ void qInitDrawhelperAsm()
int length,
uint const_alpha);
extern void QT_FASTCALL comp_func_solid_SourceOver_sse2(uint *destPixels, int length, uint color, uint const_alpha);
+ extern void QT_FASTCALL comp_func_Plus_sse2(uint *dst, const uint *src, int length, uint const_alpha);
functionForModeAsm[0] = comp_func_SourceOver_sse2;
+ functionForModeAsm[QPainter::CompositionMode_Plus] = comp_func_Plus_sse2;
functionForModeSolidAsm[0] = comp_func_solid_SourceOver_sse2;
extern void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
@@ -7919,17 +7917,8 @@ void qInitDrawhelperAsm()
functionForModeSolid = functionForModeSolidAsm;
}
- if (functionForModeAsm) {
- const int destinationMode = QPainter::CompositionMode_Destination;
- functionForModeAsm[destinationMode] = functionForMode_C[destinationMode];
-
- // use the default qdrawhelper implementation for the
- // extended composition modes
- for (int mode = 12; mode < numCompositionFunctions; ++mode)
- functionForModeAsm[mode] = functionForMode_C[mode];
-
+ if (functionForModeAsm)
functionForMode = functionForModeAsm;
- }
qt_build_pow_tables();
}
diff --git a/src/gui/painting/qdrawhelper_iwmmxt.cpp b/src/gui/painting/qdrawhelper_iwmmxt.cpp
index 80b2c04864..d99045d347 100644
--- a/src/gui/painting/qdrawhelper_iwmmxt.cpp
+++ b/src/gui/painting/qdrawhelper_iwmmxt.cpp
@@ -106,14 +106,35 @@ CompositionFunction qt_functionForMode_IWMMXT[] = {
comp_func_DestinationOver<QIWMMXTIntrinsics>,
comp_func_Clear<QIWMMXTIntrinsics>,
comp_func_Source<QIWMMXTIntrinsics>,
- 0,
+ comp_func_Destination,
comp_func_SourceIn<QIWMMXTIntrinsics>,
comp_func_DestinationIn<QIWMMXTIntrinsics>,
comp_func_SourceOut<QIWMMXTIntrinsics>,
comp_func_DestinationOut<QIWMMXTIntrinsics>,
comp_func_SourceAtop<QIWMMXTIntrinsics>,
comp_func_DestinationAtop<QIWMMXTIntrinsics>,
- comp_func_XOR<QIWMMXTIntrinsics>
+ comp_func_XOR<QIWMMXTIntrinsics>,
+ comp_func_Plus,
+ comp_func_Multiply,
+ comp_func_Screen,
+ comp_func_Overlay,
+ comp_func_Darken,
+ comp_func_Lighten,
+ comp_func_ColorDodge,
+ comp_func_ColorBurn,
+ comp_func_HardLight,
+ comp_func_SoftLight,
+ comp_func_Difference,
+ comp_func_Exclusion,
+ rasterop_SourceOrDestination,
+ rasterop_SourceAndDestination,
+ rasterop_SourceXorDestination,
+ rasterop_NotSourceAndNotDestination,
+ rasterop_NotSourceOrNotDestination,
+ rasterop_NotSourceXorDestination,
+ rasterop_NotSource,
+ rasterop_NotSourceAndDestination,
+ rasterop_SourceAndNotDestination
};
void qt_blend_color_argb_iwmmxt(int count, const QSpan *spans, void *userData)
diff --git a/src/gui/painting/qdrawhelper_mmx.cpp b/src/gui/painting/qdrawhelper_mmx.cpp
index d49c5a12d2..ba92554ef9 100644
--- a/src/gui/painting/qdrawhelper_mmx.cpp
+++ b/src/gui/painting/qdrawhelper_mmx.cpp
@@ -77,7 +77,7 @@ CompositionFunction qt_functionForMode_MMX[numCompositionFunctions] = {
comp_func_DestinationOver<QMMXIntrinsics>,
comp_func_Clear<QMMXIntrinsics>,
comp_func_Source<QMMXIntrinsics>,
- 0,
+ comp_func_Destination,
comp_func_SourceIn<QMMXIntrinsics>,
comp_func_DestinationIn<QMMXIntrinsics>,
comp_func_SourceOut<QMMXIntrinsics>,
@@ -85,6 +85,27 @@ CompositionFunction qt_functionForMode_MMX[numCompositionFunctions] = {
comp_func_SourceAtop<QMMXIntrinsics>,
comp_func_DestinationAtop<QMMXIntrinsics>,
comp_func_XOR<QMMXIntrinsics>,
+ comp_func_Plus,
+ comp_func_Multiply,
+ comp_func_Screen,
+ comp_func_Overlay,
+ comp_func_Darken,
+ comp_func_Lighten,
+ comp_func_ColorDodge,
+ comp_func_ColorBurn,
+ comp_func_HardLight,
+ comp_func_SoftLight,
+ comp_func_Difference,
+ comp_func_Exclusion,
+ rasterop_SourceOrDestination,
+ rasterop_SourceAndDestination,
+ rasterop_SourceXorDestination,
+ rasterop_NotSourceAndNotDestination,
+ rasterop_NotSourceOrNotDestination,
+ rasterop_NotSourceXorDestination,
+ rasterop_NotSource,
+ rasterop_NotSourceAndDestination,
+ rasterop_SourceAndNotDestination
};
void qt_blend_color_argb_mmx(int count, const QSpan *spans, void *userData)
diff --git a/src/gui/painting/qdrawhelper_mmx3dnow.cpp b/src/gui/painting/qdrawhelper_mmx3dnow.cpp
index 8bffaa7a45..b1e81fce4f 100644
--- a/src/gui/painting/qdrawhelper_mmx3dnow.cpp
+++ b/src/gui/painting/qdrawhelper_mmx3dnow.cpp
@@ -85,14 +85,35 @@ CompositionFunction qt_functionForMode_MMX3DNOW[numCompositionFunctions] = {
comp_func_DestinationOver<QMMX3DNOWIntrinsics>,
comp_func_Clear<QMMX3DNOWIntrinsics>,
comp_func_Source<QMMX3DNOWIntrinsics>,
- 0,
+ comp_func_Destination,
comp_func_SourceIn<QMMX3DNOWIntrinsics>,
comp_func_DestinationIn<QMMX3DNOWIntrinsics>,
comp_func_SourceOut<QMMX3DNOWIntrinsics>,
comp_func_DestinationOut<QMMX3DNOWIntrinsics>,
comp_func_SourceAtop<QMMX3DNOWIntrinsics>,
comp_func_DestinationAtop<QMMX3DNOWIntrinsics>,
- comp_func_XOR<QMMX3DNOWIntrinsics>
+ comp_func_XOR<QMMX3DNOWIntrinsics>,
+ comp_func_Plus,
+ comp_func_Multiply,
+ comp_func_Screen,
+ comp_func_Overlay,
+ comp_func_Darken,
+ comp_func_Lighten,
+ comp_func_ColorDodge,
+ comp_func_ColorBurn,
+ comp_func_HardLight,
+ comp_func_SoftLight,
+ comp_func_Difference,
+ comp_func_Exclusion,
+ rasterop_SourceOrDestination,
+ rasterop_SourceAndDestination,
+ rasterop_SourceXorDestination,
+ rasterop_NotSourceAndNotDestination,
+ rasterop_NotSourceOrNotDestination,
+ rasterop_NotSourceXorDestination,
+ rasterop_NotSource,
+ rasterop_NotSourceAndDestination,
+ rasterop_SourceAndNotDestination
};
void qt_blend_color_argb_mmx3dnow(int count, const QSpan *spans, void *userData)
diff --git a/src/gui/painting/qdrawhelper_p.h b/src/gui/painting/qdrawhelper_p.h
index 97c78bb0a2..1a87127f38 100644
--- a/src/gui/painting/qdrawhelper_p.h
+++ b/src/gui/painting/qdrawhelper_p.h
@@ -91,6 +91,11 @@ QT_BEGIN_NAMESPACE
# define Q_STATIC_INLINE_FUNCTION static inline
#endif
+static const uint AMASK = 0xff000000;
+static const uint RMASK = 0x00ff0000;
+static const uint GMASK = 0x0000ff00;
+static const uint BMASK = 0x000000ff;
+
/*******************************************************************************
* QSpan
*
@@ -1945,6 +1950,41 @@ const uint qt_bayer_matrix[16][16] = {
((((argb >> 24) * alpha) >> 8) << 24) | (argb & 0x00ffffff)
+// prototypes of all the composition functions
+void QT_FASTCALL comp_func_SourceOver(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_DestinationOver(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Clear(uint *dest, const uint *, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Source(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Destination(uint *, const uint *, int, uint);
+void QT_FASTCALL comp_func_SourceIn(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_DestinationIn(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_SourceOut(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_DestinationOut(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_SourceAtop(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_DestinationAtop(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_XOR(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Plus(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Multiply(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Screen(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Overlay(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Darken(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Lighten(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_ColorDodge(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_ColorBurn(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_HardLight(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_SoftLight(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Difference(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL comp_func_Exclusion(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_SourceOrDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_SourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_SourceXorDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_NotSourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_NotSourceOrNotDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_NotSourceXorDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_NotSource(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_NotSourceAndDestination(uint *dest, const uint *src, int length, uint const_alpha);
+void QT_FASTCALL rasterop_SourceAndNotDestination(uint *dest, const uint *src, int length, uint const_alpha);
+
QT_END_NAMESPACE
#endif // QDRAWHELPER_P_H
diff --git a/src/gui/painting/qdrawhelper_sse.cpp b/src/gui/painting/qdrawhelper_sse.cpp
index 58a7fdd7db..8b17c29e92 100644
--- a/src/gui/painting/qdrawhelper_sse.cpp
+++ b/src/gui/painting/qdrawhelper_sse.cpp
@@ -77,14 +77,35 @@ CompositionFunction qt_functionForMode_SSE[numCompositionFunctions] = {
comp_func_DestinationOver<QSSEIntrinsics>,
comp_func_Clear<QSSEIntrinsics>,
comp_func_Source<QSSEIntrinsics>,
- 0,
+ comp_func_Destination,
comp_func_SourceIn<QSSEIntrinsics>,
comp_func_DestinationIn<QSSEIntrinsics>,
comp_func_SourceOut<QSSEIntrinsics>,
comp_func_DestinationOut<QSSEIntrinsics>,
comp_func_SourceAtop<QSSEIntrinsics>,
comp_func_DestinationAtop<QSSEIntrinsics>,
- comp_func_XOR<QSSEIntrinsics>
+ comp_func_XOR<QSSEIntrinsics>,
+ comp_func_Plus,
+ comp_func_Multiply,
+ comp_func_Screen,
+ comp_func_Overlay,
+ comp_func_Darken,
+ comp_func_Lighten,
+ comp_func_ColorDodge,
+ comp_func_ColorBurn,
+ comp_func_HardLight,
+ comp_func_SoftLight,
+ comp_func_Difference,
+ comp_func_Exclusion,
+ rasterop_SourceOrDestination,
+ rasterop_SourceAndDestination,
+ rasterop_SourceXorDestination,
+ rasterop_NotSourceAndNotDestination,
+ rasterop_NotSourceOrNotDestination,
+ rasterop_NotSourceXorDestination,
+ rasterop_NotSource,
+ rasterop_NotSourceAndDestination,
+ rasterop_SourceAndNotDestination
};
void qt_blend_color_argb_sse(int count, const QSpan *spans, void *userData)
diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp
index 346e177ecc..e090ae5f8c 100644
--- a/src/gui/painting/qdrawhelper_sse2.cpp
+++ b/src/gui/painting/qdrawhelper_sse2.cpp
@@ -110,13 +110,23 @@ void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
const __m128i oneMinusConstAlpha = _mm_set1_epi16(one_minus_const_alpha);
for (int y = 0; y < h; ++y) {
int x = 0;
+
+ // First, align dest to 16 bytes:
+ const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;
+ const int prologLength = qMin(w, offsetToAlignOn16Bytes);
+ for (; x < prologLength; ++x) {
+ quint32 s = src[x];
+ s = BYTE_MUL(s, const_alpha);
+ dst[x] = INTERPOLATE_PIXEL_255(src[x], const_alpha, dst[x], one_minus_const_alpha);
+ }
+
for (; x < w-3; x += 4) {
__m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVector, nullVector)) != 0xffff) {
- const __m128i dstVector = _mm_loadu_si128((__m128i *)&dst[x]);
+ const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
__m128i result;
INTERPOLATE_PIXEL_255_SSE2(result, srcVector, dstVector, constAlphaVector, oneMinusConstAlpha, colorMask, half);
- _mm_storeu_si128((__m128i *)&dst[x], result);
+ _mm_store_si128((__m128i *)&dst[x], result);
}
}
for (; x<w; ++x) {
@@ -135,7 +145,6 @@ void qt_blend_rgb32_on_rgb32_sse2(uchar *destPixels, int dbpl,
void QT_FASTCALL comp_func_SourceOver_sse2(uint *destPixels, const uint *srcPixels, int length, uint const_alpha)
{
- Q_ASSERT(const_alpha >= 0);
Q_ASSERT(const_alpha < 256);
const quint32 *src = (const quint32 *) srcPixels;
@@ -154,6 +163,72 @@ void QT_FASTCALL comp_func_SourceOver_sse2(uint *destPixels, const uint *srcPixe
}
}
+inline int comp_func_Plus_one_pixel_const_alpha(uint d, const uint s, const uint const_alpha, const uint one_minus_const_alpha)
+{
+#define MIX(mask) (qMin(((qint64(s)&mask) + (qint64(d)&mask)), qint64(mask)))
+ const int result = (MIX(AMASK) | MIX(RMASK) | MIX(GMASK) | MIX(BMASK));
+#undef MIX
+ return INTERPOLATE_PIXEL_255(result, const_alpha, d, one_minus_const_alpha);
+}
+
+inline int comp_func_Plus_one_pixel(uint d, const uint s)
+{
+#define MIX(mask) (qMin(((qint64(s)&mask) + (qint64(d)&mask)), qint64(mask)))
+ const int result = (MIX(AMASK) | MIX(RMASK) | MIX(GMASK) | MIX(BMASK));
+#undef MIX
+ return result;
+}
+
+void QT_FASTCALL comp_func_Plus_sse2(uint *dst, const uint *src, int length, uint const_alpha)
+{
+ int x = 0;
+ const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;
+ const int prologLength = qMin(length, offsetToAlignOn16Bytes);
+
+ if (const_alpha == 255) {
+ // 1) Prologue: align destination on 16 bytes
+ for (; x < prologLength; ++x)
+ dst[x] = comp_func_Plus_one_pixel(dst[x], src[x]);
+
+ // 2) composition with SSE2
+ for (; x < length - 3; x += 4) {
+ const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
+ const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
+
+ const __m128i result = _mm_adds_epu8(srcVector, dstVector);
+ _mm_store_si128((__m128i *)&dst[x], result);
+ }
+
+ // 3) Epilogue:
+ for (; x < length; ++x)
+ dst[x] = comp_func_Plus_one_pixel(dst[x], src[x]);
+ } else {
+ const int one_minus_const_alpha = 255 - const_alpha;
+ const __m128i constAlphaVector = _mm_set1_epi16(const_alpha);
+ const __m128i oneMinusConstAlpha = _mm_set1_epi16(one_minus_const_alpha);
+
+ // 1) Prologue: align destination on 16 bytes
+ for (; x < prologLength; ++x)
+ dst[x] = comp_func_Plus_one_pixel_const_alpha(dst[x], src[x], const_alpha, one_minus_const_alpha);
+
+ const __m128i half = _mm_set1_epi16(0x80);
+ const __m128i colorMask = _mm_set1_epi32(0x00ff00ff);
+ // 2) composition with SSE2
+ for (; x < length - 3; x += 4) {
+ const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]);
+ const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]);
+
+ __m128i result = _mm_adds_epu8(srcVector, dstVector);
+ INTERPOLATE_PIXEL_255_SSE2(result, result, dstVector, constAlphaVector, oneMinusConstAlpha, colorMask, half)
+ _mm_store_si128((__m128i *)&dst[x], result);
+ }
+
+ // 3) Epilogue:
+ for (; x < length; ++x)
+ dst[x] = comp_func_Plus_one_pixel_const_alpha(dst[x], src[x], const_alpha, one_minus_const_alpha);
+ }
+}
+
void qt_memfill32_sse2(quint32 *dest, quint32 value, int count)
{
if (count < 7) {
diff --git a/src/gui/painting/qdrawhelper_sse3dnow.cpp b/src/gui/painting/qdrawhelper_sse3dnow.cpp
index c58cf13c5c..9ae0e0792b 100644
--- a/src/gui/painting/qdrawhelper_sse3dnow.cpp
+++ b/src/gui/painting/qdrawhelper_sse3dnow.cpp
@@ -85,14 +85,35 @@ CompositionFunction qt_functionForMode_SSE3DNOW[numCompositionFunctions] = {
comp_func_DestinationOver<QSSE3DNOWIntrinsics>,
comp_func_Clear<QSSE3DNOWIntrinsics>,
comp_func_Source<QSSE3DNOWIntrinsics>,
- 0,
+ comp_func_Destination,
comp_func_SourceIn<QSSE3DNOWIntrinsics>,
comp_func_DestinationIn<QSSE3DNOWIntrinsics>,
comp_func_SourceOut<QSSE3DNOWIntrinsics>,
comp_func_DestinationOut<QSSE3DNOWIntrinsics>,
comp_func_SourceAtop<QSSE3DNOWIntrinsics>,
comp_func_DestinationAtop<QSSE3DNOWIntrinsics>,
- comp_func_XOR<QSSE3DNOWIntrinsics>
+ comp_func_XOR<QSSE3DNOWIntrinsics>,
+ comp_func_Plus,
+ comp_func_Multiply,
+ comp_func_Screen,
+ comp_func_Overlay,
+ comp_func_Darken,
+ comp_func_Lighten,
+ comp_func_ColorDodge,
+ comp_func_ColorBurn,
+ comp_func_HardLight,
+ comp_func_SoftLight,
+ comp_func_Difference,
+ comp_func_Exclusion,
+ rasterop_SourceOrDestination,
+ rasterop_SourceAndDestination,
+ rasterop_SourceXorDestination,
+ rasterop_NotSourceAndNotDestination,
+ rasterop_NotSourceOrNotDestination,
+ rasterop_NotSourceXorDestination,
+ rasterop_NotSource,
+ rasterop_NotSourceAndDestination,
+ rasterop_SourceAndNotDestination
};
void qt_blend_color_argb_sse3dnow(int count, const QSpan *spans, void *userData)
diff --git a/src/gui/painting/qdrawingprimitive_sse2_p.h b/src/gui/painting/qdrawingprimitive_sse2_p.h
index 3c9694644d..18355c278b 100644
--- a/src/gui/painting/qdrawingprimitive_sse2_p.h
+++ b/src/gui/painting/qdrawingprimitive_sse2_p.h
@@ -141,12 +141,24 @@ QT_BEGIN_NAMESPACE
// with shortcuts if fully opaque or fully transparent.
#define BLEND_SOURCE_OVER_ARGB32_SSE2(dst, src, length, nullVector, half, one, colorMask, alphaMask) { \
int x = 0; \
+\
+ /* First, get dst aligned. */ \
+ const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;\
+ const int prologLength = qMin(length, offsetToAlignOn16Bytes);\
+ for (; x < prologLength; ++x) { \
+ uint s = src[x]; \
+ if (s >= 0xff000000) \
+ dst[x] = s; \
+ else if (s != 0) \
+ dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s)); \
+ } \
+\
for (; x < length-3; x += 4) { \
const __m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]); \
const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask); \
if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, alphaMask)) == 0xffff) { \
/* all opaque */ \
- _mm_storeu_si128((__m128i *)&dst[x], srcVector); \
+ _mm_store_si128((__m128i *)&dst[x], srcVector); \
} else if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, nullVector)) != 0xffff) { \
/* not fully transparent */ \
/* extract the alpha channel on 2 x 16 bits */ \
@@ -157,13 +169,13 @@ QT_BEGIN_NAMESPACE
alphaChannel = _mm_or_si128(alphaChannel, _mm_slli_epi32(alphaChannel, 16)); \
alphaChannel = _mm_sub_epi16(one, alphaChannel); \
\
- const __m128i dstVector = _mm_loadu_si128((__m128i *)&dst[x]); \
+ const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]); \
__m128i destMultipliedByOneMinusAlpha; \
BYTE_MUL_SSE2(destMultipliedByOneMinusAlpha, dstVector, alphaChannel, colorMask, half); \
\
/* result = s + d * (1-alpha) */\
const __m128i result = _mm_add_epi8(srcVector, destMultipliedByOneMinusAlpha); \
- _mm_storeu_si128((__m128i *)&dst[x], result); \
+ _mm_store_si128((__m128i *)&dst[x], result); \
} \
} \
for (; x < length; ++x) { \
@@ -189,6 +201,17 @@ QT_BEGIN_NAMESPACE
#define BLEND_SOURCE_OVER_ARGB32_WITH_CONST_ALPHA_SSE2(dst, src, length, nullVector, half, one, colorMask, constAlphaVector) \
{ \
int x = 0; \
+\
+ const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;\
+ const int prologLength = qMin(length, offsetToAlignOn16Bytes);\
+ for (; x < prologLength; ++x) { \
+ quint32 s = src[x]; \
+ if (s != 0) { \
+ s = BYTE_MUL(s, const_alpha); \
+ dst[x] = s + BYTE_MUL(dst[x], qAlpha(~s)); \
+ } \
+ } \
+\
for (; x < length-3; x += 4) { \
__m128i srcVector = _mm_loadu_si128((__m128i *)&src[x]); \
if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVector, nullVector)) != 0xffff) { \
@@ -198,12 +221,12 @@ QT_BEGIN_NAMESPACE
alphaChannel = _mm_or_si128(alphaChannel, _mm_slli_epi32(alphaChannel, 16)); \
alphaChannel = _mm_sub_epi16(one, alphaChannel); \
\
- const __m128i dstVector = _mm_loadu_si128((__m128i *)&dst[x]); \
+ const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]); \
__m128i destMultipliedByOneMinusAlpha; \
BYTE_MUL_SSE2(destMultipliedByOneMinusAlpha, dstVector, alphaChannel, colorMask, half); \
\
const __m128i result = _mm_add_epi8(srcVector, destMultipliedByOneMinusAlpha); \
- _mm_storeu_si128((__m128i *)&dst[x], result); \
+ _mm_store_si128((__m128i *)&dst[x], result); \
} \
} \
for (; x < length; ++x) { \
diff --git a/src/gui/painting/qpaintengine_x11.cpp b/src/gui/painting/qpaintengine_x11.cpp
index 910b2df3d7..e521e018c3 100644
--- a/src/gui/painting/qpaintengine_x11.cpp
+++ b/src/gui/painting/qpaintengine_x11.cpp
@@ -696,11 +696,10 @@ void QX11PaintEngine::drawLines(const QLine *lines, int lineCount)
linef = d->matrix.map(QLineF(lines[i]));
}
if (clipLine(&linef, d->polygonClipper.boundingRect())) {
- int x1 = qRound(linef.x1() + aliasedCoordinateDelta);
- int y1 = qRound(linef.y1() + aliasedCoordinateDelta);
- int x2 = qRound(linef.x2() + aliasedCoordinateDelta);
- int y2 = qRound(linef.y2() + aliasedCoordinateDelta);
-
+ int x1 = qFloor(linef.x1() + aliasedCoordinateDelta);
+ int y1 = qFloor(linef.y1() + aliasedCoordinateDelta);
+ int x2 = qFloor(linef.x2() + aliasedCoordinateDelta);
+ int y2 = qFloor(linef.y2() + aliasedCoordinateDelta);
XDrawLine(d->dpy, d->hd, d->gc, x1, y1, x2, y2);
}
}
@@ -730,11 +729,10 @@ void QX11PaintEngine::drawLines(const QLineF *lines, int lineCount)
for (int i = 0; i < lineCount; ++i) {
QLineF linef = d->matrix.map(lines[i]);
if (clipLine(&linef, d->polygonClipper.boundingRect())) {
- int x1 = qRound(linef.x1() + aliasedCoordinateDelta);
- int y1 = qRound(linef.y1() + aliasedCoordinateDelta);
- int x2 = qRound(linef.x2() + aliasedCoordinateDelta);
- int y2 = qRound(linef.y2() + aliasedCoordinateDelta);
-
+ int x1 = qFloor(linef.x1() + aliasedCoordinateDelta);
+ int y1 = qFloor(linef.y1() + aliasedCoordinateDelta);
+ int x2 = qFloor(linef.x2() + aliasedCoordinateDelta);
+ int y2 = qFloor(linef.y2() + aliasedCoordinateDelta);
XDrawLine(d->dpy, d->hd, d->gc, x1, y1, x2, y2);
}
}
@@ -1690,8 +1688,8 @@ void QX11PaintEnginePrivate::strokePolygon_dev(const QPointF *polygonPoints, int
if (clippedCount > 0) {
QVarLengthArray<XPoint> xpoints(clippedCount);
for (int i = 0; i < clippedCount; ++i) {
- xpoints[i].x = qRound(clippedPoints[i].x + aliasedCoordinateDelta);
- xpoints[i].y = qRound(clippedPoints[i].y + aliasedCoordinateDelta);
+ xpoints[i].x = qFloor(clippedPoints[i].x + aliasedCoordinateDelta);
+ xpoints[i].y = qFloor(clippedPoints[i].y + aliasedCoordinateDelta);
}
uint numberPoints = qMin(clippedCount, xlibMaxLinePoints);
XPoint *pts = xpoints.data();
diff --git a/src/gui/painting/qrgb.h b/src/gui/painting/qrgb.h
index 8e635a8a51..ea5f3530df 100644
--- a/src/gui/painting/qrgb.h
+++ b/src/gui/painting/qrgb.h
@@ -64,7 +64,7 @@ Q_GUI_EXPORT_INLINE int qBlue(QRgb rgb) // get blue part of RGB
{ return (rgb & 0xff); }
Q_GUI_EXPORT_INLINE int qAlpha(QRgb rgb) // get alpha part of RGBA
-{ return ((rgb >> 24) & 0xff); }
+{ return rgb >> 24; }
Q_GUI_EXPORT_INLINE QRgb qRgb(int r, int g, int b)// set RGB value
{ return (0xffu << 24) | ((r & 0xff) << 16) | ((g & 0xff) << 8) | (b & 0xff); }
diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp
index 4cfa93f88f..687e587365 100644
--- a/src/gui/styles/qstyle.cpp
+++ b/src/gui/styles/qstyle.cpp
@@ -2421,9 +2421,10 @@ QT_BEGIN_INCLUDE_NAMESPACE
#include <QDebug>
QT_END_INCLUDE_NAMESPACE
+#if !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug debug, QStyle::State state)
{
-#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
+#if !defined(QT_NO_DEBUG)
debug << "QStyle::State(";
QStringList states;
@@ -2458,6 +2459,7 @@ QDebug operator<<(QDebug debug, QStyle::State state)
#endif
return debug;
}
+#endif
/*!
\since 4.6
diff --git a/src/gui/styles/qstyle.h b/src/gui/styles/qstyle.h
index 439d62618a..439901a8f9 100644
--- a/src/gui/styles/qstyle.h
+++ b/src/gui/styles/qstyle.h
@@ -878,7 +878,9 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyle::State)
Q_DECLARE_OPERATORS_FOR_FLAGS(QStyle::SubControls)
+#if !defined(QT_NO_DEBUG_STREAM)
Q_GUI_EXPORT QDebug operator<<(QDebug debug, QStyle::State state);
+#endif
QT_END_NAMESPACE
diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp
index c057a2b2ea..4780edfbc0 100644
--- a/src/gui/styles/qstyleoption.cpp
+++ b/src/gui/styles/qstyleoption.cpp
@@ -5419,9 +5419,10 @@ QStyleHintReturnVariant::QStyleHintReturnVariant() : QStyleHintReturn(Version, T
Returns a T or 0 depending on the type of \a hint.
*/
+#if !defined(QT_NO_DEBUG_STREAM)
QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
{
-#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
+#if !defined(QT_NO_DEBUG)
switch (optionType) {
case QStyleOption::SO_Default:
debug << "SO_Default"; break;
@@ -5488,7 +5489,7 @@ QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType)
QDebug operator<<(QDebug debug, const QStyleOption &option)
{
-#if !defined(QT_NO_DEBUG) && !defined(QT_NO_DEBUG_STREAM)
+#if !defined(QT_NO_DEBUG)
debug << "QStyleOption(";
debug << QStyleOption::OptionType(option.type);
debug << ',' << (option.direction == Qt::RightToLeft ? "RightToLeft" : "LeftToRight");
@@ -5498,5 +5499,6 @@ QDebug operator<<(QDebug debug, const QStyleOption &option)
#endif
return debug;
}
+#endif
QT_END_NAMESPACE
diff --git a/src/gui/styles/qstyleoption.h b/src/gui/styles/qstyleoption.h
index 95de8d50ac..e79d9a4203 100644
--- a/src/gui/styles/qstyleoption.h
+++ b/src/gui/styles/qstyleoption.h
@@ -958,8 +958,10 @@ T qstyleoption_cast(QStyleHintReturn *hint)
return 0;
}
+#if !defined(QT_NO_DEBUG_STREAM)
Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QStyleOption::OptionType &optionType);
Q_GUI_EXPORT QDebug operator<<(QDebug debug, const QStyleOption &option);
+#endif
QT_END_NAMESPACE
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index 43fa4b986c..dff525effe 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -4283,6 +4283,13 @@ void QStyleSheetStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *op
}
break;
+ case PE_FrameMenu:
+ if (rule.hasDrawable()) {
+ // Drawn by PE_PanelMenu
+ return;
+ }
+ break;
+
case PE_PanelMenuBar:
if (rule.hasDrawable()) {
// Drawn by PE_Widget
diff --git a/src/gui/text/qfontengine_s60.cpp b/src/gui/text/qfontengine_s60.cpp
index f691413da5..52a1fe70b1 100644
--- a/src/gui/text/qfontengine_s60.cpp
+++ b/src/gui/text/qfontengine_s60.cpp
@@ -94,7 +94,7 @@ bool QSymbianTypeFaceExtras::getSfntTableData(uint tag, uchar *buffer, uint *len
} else {
*length = tableByteLength;
if (buffer)
- qMemCopy(buffer, fontTable.TableContent(), tableByteLength);
+ memcpy(buffer, fontTable.TableContent(), tableByteLength);
}
fontTable.Close();
@@ -146,7 +146,7 @@ bool QSymbianTypeFaceExtras::getSfntTableData(uint tag, uchar *buffer, uint *len
} else {
*length = tableByteLength;
if (buffer)
- qMemCopy(buffer, table, tableByteLength);
+ memcpy(buffer, table, tableByteLength);
}
m_trueTypeExtension->ReleaseTrueTypeTable(table);
@@ -374,7 +374,10 @@ glyph_metrics_t QFontEngineS60::boundingBox(glyph_t glyph)
QFixed QFontEngineS60::ascent() const
{
- return m_originalFont->FontMaxAscent();
+ // Workaround for QTBUG-8013
+ // Stroke based fonts may return an incorrect FontMaxAscent of 0.
+ const QFixed ascent = m_originalFont->FontMaxAscent();
+ return (ascent > 0) ? ascent : QFixed::fromReal(m_originalFontSizeInPixels) - descent();
}
QFixed QFontEngineS60::descent() const
diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp
index 91a6612baf..7396bcd99f 100644
--- a/src/gui/text/qstatictext.cpp
+++ b/src/gui/text/qstatictext.cpp
@@ -148,9 +148,7 @@ QStaticText::QStaticText()
}
/*!
- 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.
+ Constructs a QStaticText object with the given \a text.
*/
QStaticText::QStaticText(const QString &text)
: data(new QStaticTextPrivate)
@@ -465,16 +463,21 @@ namespace {
m_chars.resize(m_chars.size() + ti.num_chars);
glyph_t *glyphsDestination = m_glyphs.data() + currentItem.glyphOffset;
- qMemCopy(glyphsDestination, glyphs.constData(), sizeof(glyph_t) * currentItem.numGlyphs);
+ memcpy(glyphsDestination, glyphs.constData(), sizeof(glyph_t) * currentItem.numGlyphs);
QFixedPoint *positionsDestination = m_positions.data() + currentItem.positionOffset;
- qMemCopy(positionsDestination, positions.constData(), sizeof(QFixedPoint) * currentItem.numGlyphs);
+ memcpy(positionsDestination, positions.constData(), sizeof(QFixedPoint) * currentItem.numGlyphs);
QChar *charsDestination = m_chars.data() + currentItem.charOffset;
- qMemCopy(charsDestination, ti.chars, sizeof(QChar) * currentItem.numChars);
+ memcpy(charsDestination, ti.chars, sizeof(QChar) * currentItem.numChars);
m_items.append(currentItem);
- }
+ }
+
+ virtual void drawPolygon(const QPointF *, int , PolygonDrawMode )
+ {
+ /* intentionally empty */
+ }
virtual bool begin(QPaintDevice *) { return true; }
virtual bool end() { return true; }
@@ -681,13 +684,13 @@ void QStaticTextPrivate::init()
items = new QStaticTextItem[itemCount];
glyphPool = new glyph_t[glyphs.size()];
- qMemCopy(glyphPool, glyphs.constData(), glyphs.size() * sizeof(glyph_t));
+ memcpy(glyphPool, glyphs.constData(), glyphs.size() * sizeof(glyph_t));
positionPool = new QFixedPoint[positions.size()];
- qMemCopy(positionPool, positions.constData(), positions.size() * sizeof(QFixedPoint));
+ memcpy(positionPool, positions.constData(), positions.size() * sizeof(QFixedPoint));
charPool = new QChar[chars.size()];
- qMemCopy(charPool, chars.constData(), chars.size() * sizeof(QChar));
+ memcpy(charPool, chars.constData(), chars.size() * sizeof(QChar));
for (int i=0; i<itemCount; ++i) {
items[i] = deviceItems.at(i);
diff --git a/src/gui/text/qtextcursor.cpp b/src/gui/text/qtextcursor.cpp
index daa40a1aac..769ab2fb66 100644
--- a/src/gui/text/qtextcursor.cpp
+++ b/src/gui/text/qtextcursor.cpp
@@ -1283,7 +1283,7 @@ void QTextCursor::setVisualNavigation(bool b)
/*!
\since 4.7
- Sets the visual x position for vertical cursor movements.
+ Sets the visual x position for vertical cursor movements to \a x.
The vertical movement x position is cleared automatically when the cursor moves horizontally, and kept
unchanged when the cursor moves vertically. The mechanism allows the cursor to move up and down on a
@@ -1335,8 +1335,8 @@ bool QTextCursor::keepPositionOnInsert() const
Defines whether the cursor should keep its current position when text gets inserted at the current position of the
cursor.
- If \b is true, the cursor keeps its current position when text gets inserted at the positing of the cursor.
- If \b is false, the cursor moves along with the inserted text.
+ If \a b is true, the cursor keeps its current position when text gets inserted at the positing of the cursor.
+ If \a b is false, the cursor moves along with the inserted text.
The default is false.
diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp
index 7b3f9853c9..213db7ed9f 100644
--- a/src/gui/text/qtextdocument_p.cpp
+++ b/src/gui/text/qtextdocument_p.cpp
@@ -1649,7 +1649,7 @@ void QTextDocumentPrivate::compressPieceTable()
int newLen = 0;
for (FragmentMap::Iterator it = fragments.begin(); !it.atEnd(); ++it) {
- qMemCopy(newTextPtr, text.constData() + it->stringPosition, it->size_array[0] * sizeof(QChar));
+ memcpy(newTextPtr, text.constData() + it->stringPosition, it->size_array[0] * sizeof(QChar));
it->stringPosition = newLen;
newTextPtr += it->size_array[0];
newLen += it->size_array[0];
diff --git a/src/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp
index d6535ea16d..674064e5fd 100644
--- a/src/gui/text/qtextlayout.cpp
+++ b/src/gui/text/qtextlayout.cpp
@@ -1935,7 +1935,7 @@ void QTextLine::layout_helper(int maxGlyphs)
// We ignore the right bearing if the minimum negative bearing is too little to
// expand the text beyond the edge.
if (sb_or_ws|breakany) {
- if (lbh.calculateNewWidth(line) + lbh.minimumRightBearing > line.width)
+ if (lbh.calculateNewWidth(line) - lbh.minimumRightBearing > line.width)
lbh.adjustRightBearing();
if (lbh.checkFullOtherwiseExtend(line)) {
if (!breakany) {
diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp
index f386871d5e..5fb3384d51 100644
--- a/src/gui/text/qtextobject.cpp
+++ b/src/gui/text/qtextobject.cpp
@@ -1148,7 +1148,7 @@ int QTextBlock::charFormatIndex() const
direction from the blocks content. Returns either Qt::LeftToRight
or Qt::RightToLeft.
- \sa QTextBlock::layoutDirection(), QString::isRightToLeft(), Qt::LayoutDirection
+ \sa QTextFormat::layoutDirection(), QString::isRightToLeft(), Qt::LayoutDirection
*/
Qt::LayoutDirection QTextBlock::textDirection() const
{
diff --git a/src/gui/text/qtextoption.cpp b/src/gui/text/qtextoption.cpp
index 8f31e4603a..9eeec0bfae 100644
--- a/src/gui/text/qtextoption.cpp
+++ b/src/gui/text/qtextoption.cpp
@@ -392,7 +392,12 @@ QList<QTextOption::Tab> QTextOption::tabs() const
/*!
\fn Tab::Tab(qreal pos, TabType tabType, QChar delim = QChar())
- Creates a tab with the given position, tab type, and (for DelimiterTab) delimiter
+
+ Creates a tab with the given position, tab type, and delimiter
+ (\a pos, \a tabType, \a delim).
+
+ \note \a delim is only used when \a tabType is DelimiterTab.
+
\since 4.7
*/
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index 5100176bad..c291f25ff8 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -754,19 +754,39 @@ void QTextTable::insertColumns(int pos, int num)
QTextFormatCollection *c = p->formatCollection();
p->beginEditBlock();
+ QList<int> extendedSpans;
for (int i = 0; i < d->nRows; ++i) {
int cell;
if (i == d->nRows - 1 && pos == d->nCols)
cell = d->fragment_end;
else
cell = d->grid[i*d->nCols + pos];
- QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);
- QTextCharFormat fmt = c->charFormat(it->format);
if (pos > 0 && pos < d->nCols && cell == d->grid[i*d->nCols + pos - 1]) {
// cell spans the insertion place, extend it
- fmt.setTableCellColumnSpan(fmt.tableCellColumnSpan() + num);
- p->setCharFormat(it.position(), 1, fmt);
+ if (!extendedSpans.contains(cell)) {
+ QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);
+ QTextCharFormat fmt = c->charFormat(it->format);
+ fmt.setTableCellColumnSpan(fmt.tableCellColumnSpan() + num);
+ p->setCharFormat(it.position(), 1, fmt);
+ d->dirty = true;
+ extendedSpans << cell;
+ }
} else {
+ /* If the next cell is spanned from the row above, we need to find the right position
+ to insert to */
+ if (i > 0 && pos < d->nCols && cell == d->grid[(i-1) * d->nCols + pos]) {
+ int gridIndex = i*d->nCols + pos;
+ const int gridEnd = d->nRows * d->nCols - 1;
+ while (gridIndex < gridEnd && cell == d->grid[gridIndex]) {
+ ++gridIndex;
+ }
+ if (gridIndex == gridEnd)
+ cell = d->fragment_end;
+ else
+ cell = d->grid[gridIndex];
+ }
+ QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);
+ QTextCharFormat fmt = c->charFormat(it->format);
fmt.setTableCellRowSpan(1);
fmt.setTableCellColumnSpan(1);
Q_ASSERT(fmt.objectIndex() == objectIndex());
@@ -915,12 +935,13 @@ void QTextTable::removeColumns(int pos, int num)
for (int r = 0; r < d->nRows; ++r) {
for (int c = pos; c < pos + num; ++c) {
int cell = d->grid[r*d->nCols + c];
- if (touchedCells.contains(cell))
- continue;
- touchedCells << cell;
QTextDocumentPrivate::FragmentIterator it(&p->fragmentMap(), cell);
QTextCharFormat fmt = collection->charFormat(it->format);
int span = fmt.tableCellColumnSpan();
+ if (touchedCells.contains(cell) && span <= 1)
+ continue;
+ touchedCells << cell;
+
if (span > 1) {
fmt.setTableCellColumnSpan(span - 1);
p->setCharFormat(it.position(), 1, fmt);
diff --git a/src/gui/text/text.pri b/src/gui/text/text.pri
index 04ab7df078..1040ad81a8 100644
--- a/src/gui/text/text.pri
+++ b/src/gui/text/text.pri
@@ -210,8 +210,6 @@ contains(QT_CONFIG, freetype) {
# pull in the proper freetype2 include directory
include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
LIBS_PRIVATE += -lfreetype
-} else {
- DEFINES *= QT_NO_FREETYPE
}
contains(QT_CONFIG, fontconfig) {
diff --git a/src/gui/util/qcompleter.cpp b/src/gui/util/qcompleter.cpp
index 1abc2d9250..04d6de937f 100644
--- a/src/gui/util/qcompleter.cpp
+++ b/src/gui/util/qcompleter.cpp
@@ -154,6 +154,7 @@
#include "QtGui/qevent.h"
#include "QtGui/qheaderview.h"
#include "QtGui/qdesktopwidget.h"
+#include "QtGui/qlineedit.h"
QT_BEGIN_NAMESPACE
@@ -920,8 +921,9 @@ void QCompleterPrivate::showPopup(const QRect& rect)
void QCompleterPrivate::_q_fileSystemModelDirectoryLoaded(const QString &path)
{
Q_Q(QCompleter);
+ QLineEdit *lineEdit = qobject_cast<QLineEdit *>(widget);
//the path given by QFileSystemModel does not end with /
- if (!q->completionPrefix().isEmpty() && q->completionPrefix() != path + QLatin1Char('/'))
+ if (lineEdit && !lineEdit->text().isEmpty() && !q->completionPrefix().isEmpty() && q->completionPrefix() != path + QLatin1Char('/'))
q->complete();
}
diff --git a/src/gui/util/qdesktopservices_x11.cpp b/src/gui/util/qdesktopservices_x11.cpp
index fe7f9a6be2..75e7209e1b 100644
--- a/src/gui/util/qdesktopservices_x11.cpp
+++ b/src/gui/util/qdesktopservices_x11.cpp
@@ -71,10 +71,12 @@ static bool openDocument(const QUrl &url)
if (launch(url, QLatin1String("xdg-open")))
return true;
- if (X11->desktopEnvironment == DE_GNOME && launch(url, QLatin1String("gnome-open"))) {
+ // Use the X11->desktopEnvironment value if X11 is non-NULL,
+ // otherwise just attempt to launch command regardless of the desktop environment
+ if ((!X11 || (X11 && X11->desktopEnvironment == DE_GNOME)) && launch(url, QLatin1String("gnome-open"))) {
return true;
} else {
- if (X11->desktopEnvironment == DE_KDE && launch(url, QLatin1String("kfmclient exec")))
+ if ((!X11 || (X11 && X11->desktopEnvironment == DE_KDE)) && launch(url, QLatin1String("kfmclient exec")))
return true;
}
@@ -104,10 +106,12 @@ static bool launchWebBrowser(const QUrl &url)
if (launch(url, QString::fromLocal8Bit(getenv("BROWSER"))))
return true;
- if (X11->desktopEnvironment == DE_GNOME && launch(url, QLatin1String("gnome-open"))) {
+ // Use the X11->desktopEnvironment value if X11 is non-NULL,
+ // otherwise just attempt to launch command regardless of the desktop environment
+ if ((!X11 || (X11 && X11->desktopEnvironment == DE_GNOME)) && launch(url, QLatin1String("gnome-open"))) {
return true;
} else {
- if (X11->desktopEnvironment == DE_KDE && launch(url, QLatin1String("kfmclient openURL")))
+ if ((!X11 || (X11 && X11->desktopEnvironment == DE_KDE)) && launch(url, QLatin1String("kfmclient openURL")))
return true;
}
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 1bffde16f9..981e934ecf 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1663,8 +1663,11 @@ void QLineEdit::keyPressEvent(QKeyEvent *event)
}
#endif
d->control->processKeyEvent(event);
- if (event->isAccepted())
+ if (event->isAccepted()) {
+ if (layoutDirection() != d->control->layoutDirection())
+ setLayoutDirection(d->control->layoutDirection());
d->control->setCursorBlinkPeriod(0);
+ }
}
/*!
@@ -1946,7 +1949,8 @@ void QLineEdit::paintEvent(QPaintEvent *)
if (d->control->hasSelectedText() || (d->cursorVisible && !d->control->inputMask().isEmpty() && !d->control->isReadOnly())){
flags |= QLineControl::DrawSelections;
// Palette only used for selections/mask and may not be in sync
- if(d->control->palette() != pal)
+ if (d->control->palette() != pal
+ || d->control->palette().currentColorGroup() != pal.currentColorGroup())
d->control->setPalette(pal);
}
diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm
index b8cef93456..1bfc746089 100644
--- a/src/gui/widgets/qmainwindowlayout_mac.mm
+++ b/src/gui/widgets/qmainwindowlayout_mac.mm
@@ -48,6 +48,7 @@
#include <Carbon/Carbon.h>
#else
#include <private/qcocoatoolbardelegate_mac_p.h>
+#import <private/qcocoawindowdelegate_mac_p.h>
#endif
QT_BEGIN_NAMESPACE
@@ -337,6 +338,17 @@ void QMainWindowLayout::updateHIToolBarStatus()
#endif
layoutState.mainWindow->setUpdatesEnabled(false); // reduces a little bit of flicker, not all though
+#if defined(QT_MAC_USE_COCOA)
+ QMacCocoaAutoReleasePool pool;
+ NSView *cView = [qt_mac_window_for(layoutState.mainWindow) contentView];
+ if (useMacToolbar) {
+ [cView setPostsFrameChangedNotifications:YES];
+ [[NSNotificationCenter defaultCenter] addObserver: [QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate]
+ selector: @selector(syncContentViewFrame:)
+ name: NSViewFrameDidChangeNotification
+ object: cView];
+ }
+#endif
if (!useMacToolbar) {
macWindowToolbarShow(layoutState.mainWindow, false);
// Move everything out of the HIToolbar into the main toolbar.
@@ -356,6 +368,14 @@ void QMainWindowLayout::updateHIToolBarStatus()
}
syncUnifiedToolbarVisibility();
}
+#if defined(QT_MAC_USE_COCOA)
+ if (!useMacToolbar) {
+ [cView setPostsFrameChangedNotifications:NO];
+ [[NSNotificationCenter defaultCenter] removeObserver: [QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate]
+ name: NSViewFrameDidChangeNotification
+ object: cView];
+ }
+#endif
layoutState.mainWindow->setUpdatesEnabled(true);
}
diff --git a/src/gui/widgets/qtabbar.cpp b/src/gui/widgets/qtabbar.cpp
index d692307803..bbc7e5dd67 100644
--- a/src/gui/widgets/qtabbar.cpp
+++ b/src/gui/widgets/qtabbar.cpp
@@ -1219,6 +1219,12 @@ void QTabBar::setCurrentIndex(int index)
if (oldIndex >= 0 && oldIndex < count())
d->layoutTab(oldIndex);
d->layoutTab(index);
+#ifndef QT_NO_ACCESSIBILITY
+ if (QAccessible::isActive()) {
+ QAccessible::updateAccessibility(this, index + 1, QAccessible::Focus);
+ QAccessible::updateAccessibility(this, index + 1, QAccessible::Selection);
+ }
+#endif
#ifdef QT3_SUPPORT
emit selected(index);
#endif
diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
index 9cf81ca46f..2f4d1dfa42 100644
--- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
+++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp
@@ -93,7 +93,7 @@ public:
};
/*!
- \qmlclass FolderListModel
+ \qmlclass FolderListModel QDeclarativeFolderListModel
\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
diff --git a/src/imports/gestures/plugin.cpp b/src/imports/gestures/plugin.cpp
index 1fc23cab7c..8f85553772 100644
--- a/src/imports/gestures/plugin.cpp
+++ b/src/imports/gestures/plugin.cpp
@@ -55,6 +55,13 @@ public:
Q_ASSERT(QLatin1String(uri) == QLatin1String("Qt.labs.gestures"));
#ifndef QT_NO_GESTURES
qmlRegisterCustomType<QDeclarativeGestureArea>(uri,1,0, "GestureArea", new QDeclarativeGestureAreaParser);
+
+ qmlRegisterUncreatableType<QGesture>(uri, 1, 0, "Gesture", QLatin1String("Do not create objects of this type."));
+ qmlRegisterUncreatableType<QPanGesture>(uri, 1, 0, "PanGesture", QLatin1String("Do not create objects of this type."));
+ qmlRegisterUncreatableType<QTapGesture>(uri, 1, 0, "TapGesture", QLatin1String("Do not create objects of this type."));
+ qmlRegisterUncreatableType<QTapAndHoldGesture>(uri, 1, 0, "TapAndHoldGesture", QLatin1String("Do not create objects of this type."));
+ qmlRegisterUncreatableType<QPinchGesture>(uri, 1, 0, "PinchGesture", QLatin1String("Do not create objects of this type."));
+ qmlRegisterUncreatableType<QSwipeGesture>(uri, 1, 0, "SwipeGesture", QLatin1String("Do not create objects of this type."));
#endif
}
};
diff --git a/src/imports/gestures/qdeclarativegesturearea.cpp b/src/imports/gestures/qdeclarativegesturearea.cpp
index 243ba0f774..ed936d58ee 100644
--- a/src/imports/gestures/qdeclarativegesturearea.cpp
+++ b/src/imports/gestures/qdeclarativegesturearea.cpp
@@ -228,7 +228,7 @@ void QDeclarativeGestureArea::connectSignals()
ds >> gesturetype;
QString script;
ds >> script;
- QDeclarativeExpression *exp = new QDeclarativeExpression(qmlContext(this), 0, script);
+ QDeclarativeExpression *exp = new QDeclarativeExpression(qmlContext(this), this, script);
d->bindings.insert(Qt::GestureType(gesturetype),exp);
grabGesture(Qt::GestureType(gesturetype));
}
@@ -261,7 +261,10 @@ bool QDeclarativeGestureAreaPrivate::gestureEvent(QGestureEvent *event)
bool accept = true;
for (Bindings::Iterator it = bindings.begin(); it != bindings.end(); ++it) {
if ((gesture = event->gesture(it.key()))) {
- it.value()->evaluate();
+ QDeclarativeExpression *expr = it.value();
+ expr->evaluate();
+ if (expr->hasError())
+ qmlInfo(q_func()) << expr->error();
event->setAccepted(true); // XXX only if value returns true?
}
}
diff --git a/src/imports/particles/qdeclarativeparticles.cpp b/src/imports/particles/qdeclarativeparticles.cpp
index 8fe8a9fb25..b842109b57 100644
--- a/src/imports/particles/qdeclarativeparticles.cpp
+++ b/src/imports/particles/qdeclarativeparticles.cpp
@@ -153,7 +153,7 @@ void QDeclarativeParticleMotion::destroy(QDeclarativeParticle &particle)
}
/*!
- \qmlclass ParticleMotionLinear
+ \qmlclass ParticleMotionLinear QDeclarativeParticleMotionLinear
\since 4.7
\brief The ParticleMotionLinear object moves particles linearly.
@@ -179,7 +179,7 @@ void QDeclarativeParticleMotionLinear::advance(QDeclarativeParticle &p, int inte
}
/*!
- \qmlclass ParticleMotionGravity
+ \qmlclass ParticleMotionGravity QDeclarativeParticleMotionGravity
\since 4.7
\brief The ParticleMotionGravity object moves particles towards a point.
@@ -270,7 +270,7 @@ void QDeclarativeParticleMotionGravity::advance(QDeclarativeParticle &p, int int
}
/*!
- \qmlclass ParticleMotionWander
+ \qmlclass ParticleMotionWander QDeclarativeParticleMotionWander
\since 4.7
\brief The ParticleMotionWander object moves particles in a somewhat random fashion.
@@ -633,7 +633,7 @@ void QDeclarativeParticlesPrivate::updateOpacity(QDeclarativeParticle &p, int ag
}
/*!
- \qmlclass Particles
+ \qmlclass Particles QDeclarativeParticles
\since 4.7
\brief The Particles object generates and moves particles.
\inherits Item
diff --git a/src/multimedia/audio/qaudiodevicefactory.cpp b/src/multimedia/audio/qaudiodevicefactory.cpp
index 96545b4043..736630ed8c 100644
--- a/src/multimedia/audio/qaudiodevicefactory.cpp
+++ b/src/multimedia/audio/qaudiodevicefactory.cpp
@@ -67,7 +67,8 @@
QT_BEGIN_NAMESPACE
-#ifndef QT_NO_LIBRARY
+
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
Q_GLOBAL_STATIC_WITH_ARGS(QFactoryLoader, loader,
(QAudioEngineFactoryInterface_iid, QLatin1String("/audio"), Qt::CaseInsensitive))
#endif
@@ -138,8 +139,7 @@ QList<QAudioDeviceInfo> QAudioDeviceFactory::availableDevices(QAudio::Mode mode)
devices << QAudioDeviceInfo(QLatin1String("builtin"), handle, mode);
#endif
#endif
-
-#ifndef QT_NO_LIBRARY
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QFactoryLoader* l = loader();
foreach (QString const& key, l->keys()) {
@@ -152,13 +152,12 @@ QList<QAudioDeviceInfo> QAudioDeviceFactory::availableDevices(QAudio::Mode mode)
delete plugin;
}
#endif
-
return devices;
}
QAudioDeviceInfo QAudioDeviceFactory::defaultInputDevice()
{
-#ifndef QT_NO_LIBRARY
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QAudioEngineFactoryInterface* plugin = qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(QLatin1String("default")));
if (plugin) {
@@ -178,7 +177,7 @@ QAudioDeviceInfo QAudioDeviceFactory::defaultInputDevice()
QAudioDeviceInfo QAudioDeviceFactory::defaultOutputDevice()
{
-#ifndef QT_NO_LIBRARY
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QAudioEngineFactoryInterface* plugin = qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(QLatin1String("default")));
if (plugin) {
@@ -206,15 +205,13 @@ QAbstractAudioDeviceInfo* QAudioDeviceFactory::audioDeviceInfo(const QString &re
return new QAudioDeviceInfoInternal(handle, mode);
#endif
#endif
-
-#ifndef QT_NO_LIBRARY
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QAudioEngineFactoryInterface* plugin =
qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(realm));
if (plugin)
rc = plugin->createDeviceInfo(handle, mode);
#endif
-
return rc == 0 ? new QNullDeviceInfo() : rc;
}
@@ -238,14 +235,13 @@ QAbstractAudioInput* QAudioDeviceFactory::createInputDevice(QAudioDeviceInfo con
return new QAudioInputPrivate(deviceInfo.handle(), format);
#endif
#endif
-#ifndef QT_NO_LIBRARY
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QAudioEngineFactoryInterface* plugin =
qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm()));
if (plugin)
return plugin->createInput(deviceInfo.handle(), format);
#endif
-
return new QNullInputDevice();
}
@@ -259,15 +255,13 @@ QAbstractAudioOutput* QAudioDeviceFactory::createOutputDevice(QAudioDeviceInfo c
return new QAudioOutputPrivate(deviceInfo.handle(), format);
#endif
#endif
-
-#ifndef QT_NO_LIBRARY
+#if !defined(QT_NO_LIBRARY) && !defined(QT_NO_SETTINGS)
QAudioEngineFactoryInterface* plugin =
qobject_cast<QAudioEngineFactoryInterface*>(loader()->instance(deviceInfo.realm()));
if (plugin)
return plugin->createOutput(deviceInfo.handle(), format);
#endif
-
return new QNullOutputDevice();
}
diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
index 36270a7a25..f663dd2667 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.cpp
@@ -62,6 +62,8 @@ QAudioDeviceInfoInternal::QAudioDeviceInfoInternal(QByteArray dev, QAudio::Mode
device = QLatin1String(dev);
this->mode = mode;
+
+ checkSurround();
}
QAudioDeviceInfoInternal::~QAudioDeviceInfoInternal()
@@ -389,6 +391,9 @@ void QAudioDeviceInfoInternal::updateLists()
}
channelz.append(1);
channelz.append(2);
+ if (surround40) channelz.append(4);
+ if (surround51) channelz.append(6);
+ if (surround71) channelz.append(8);
sizez.append(8);
sizez.append(16);
sizez.append(32);
@@ -483,4 +488,45 @@ QByteArray QAudioDeviceInfoInternal::defaultOutputDevice()
return devices.first();
}
+void QAudioDeviceInfoInternal::checkSurround()
+{
+ QList<QByteArray> devices;
+ surround40 = false;
+ surround51 = false;
+ surround71 = false;
+
+ void **hints, **n;
+ char *name, *descr, *io;
+
+ if(snd_device_name_hint(-1, "pcm", &hints) < 0)
+ return;
+
+ n = hints;
+
+ while (*n != NULL) {
+ name = snd_device_name_get_hint(*n, "NAME");
+ descr = snd_device_name_get_hint(*n, "DESC");
+ io = snd_device_name_get_hint(*n, "IOID");
+ if((name != NULL) && (descr != NULL)) {
+ QString deviceName = QLatin1String(name);
+ if (mode == QAudio::AudioOutput) {
+ if(deviceName.contains(QLatin1String("surround40")))
+ surround40 = true;
+ if(deviceName.contains(QLatin1String("surround51")))
+ surround51 = true;
+ if(deviceName.contains(QLatin1String("surround71")))
+ surround71 = true;
+ }
+ }
+ if(name != NULL)
+ free(name);
+ if(descr != NULL)
+ free(descr);
+ if(io != NULL)
+ free(io);
+ ++n;
+ }
+ snd_device_name_free_hint(hints);
+}
+
QT_END_NAMESPACE
diff --git a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
index 6f9a459366..8525980e05 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
+++ b/src/multimedia/audio/qaudiodeviceinfo_alsa_p.h
@@ -98,6 +98,11 @@ private:
bool open();
void close();
+ void checkSurround();
+ bool surround40;
+ bool surround51;
+ bool surround71;
+
QString device;
QAudio::Mode mode;
QAudioFormat nearest;
diff --git a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
index aee0807463..9e8b1bfdf8 100644
--- a/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
+++ b/src/multimedia/audio/qaudiodeviceinfo_win32_p.cpp
@@ -374,6 +374,11 @@ void QAudioDeviceInfoInternal::updateLists()
#endif
channelz.append(1);
channelz.append(2);
+ if (mode == QAudio::AudioOutput) {
+ channelz.append(4);
+ channelz.append(6);
+ channelz.append(8);
+ }
byteOrderz.append(QAudioFormat::LittleEndian);
diff --git a/src/multimedia/audio/qaudioinput_alsa_p.cpp b/src/multimedia/audio/qaudioinput_alsa_p.cpp
index c9a8b713f8..58669b3532 100644
--- a/src/multimedia/audio/qaudioinput_alsa_p.cpp
+++ b/src/multimedia/audio/qaudioinput_alsa_p.cpp
@@ -120,7 +120,7 @@ int QAudioInputPrivate::xrun_recovery(int err)
if(err < 0)
reset = true;
else {
- bytesAvailable = bytesReady();
+ bytesAvailable = checkBytesReady();
if (bytesAvailable <= 0)
reset = true;
}
@@ -408,7 +408,7 @@ bool QAudioInputPrivate::open()
snd_pcm_start(handle);
// Step 5: Setup timer
- bytesAvailable = bytesReady();
+ bytesAvailable = checkBytesReady();
if(pullMode)
connect(audioSource,SIGNAL(readyRead()),this,SLOT(userFeed()));
@@ -437,19 +437,29 @@ void QAudioInputPrivate::close()
}
}
-int QAudioInputPrivate::bytesReady() const
+int QAudioInputPrivate::checkBytesReady()
{
if(resuming)
- return period_size;
-
- if(deviceState != QAudio::ActiveState && deviceState != QAudio::IdleState)
- return 0;
- int frames = snd_pcm_avail_update(handle);
- if (frames < 0) return frames;
- if((int)frames > (int)buffer_frames)
- frames = buffer_frames;
+ bytesAvailable = period_size;
+ else if(deviceState != QAudio::ActiveState
+ && deviceState != QAudio::IdleState)
+ bytesAvailable = 0;
+ else {
+ int frames = snd_pcm_avail_update(handle);
+ if (frames < 0) {
+ bytesAvailable = frames;
+ } else {
+ if((int)frames > (int)buffer_frames)
+ frames = buffer_frames;
+ bytesAvailable = snd_pcm_frames_to_bytes(handle, frames);
+ }
+ }
+ return bytesAvailable;
+}
- return snd_pcm_frames_to_bytes(handle, frames);
+int QAudioInputPrivate::bytesReady() const
+{
+ return qMax(bytesAvailable, 0);
}
qint64 QAudioInputPrivate::read(char* data, qint64 len)
@@ -460,12 +470,12 @@ qint64 QAudioInputPrivate::read(char* data, qint64 len)
if ( !handle )
return 0;
- bytesAvailable = bytesReady();
+ bytesAvailable = checkBytesReady();
if (bytesAvailable < 0) {
// bytesAvailable as negative is error code, try to recover from it.
xrun_recovery(bytesAvailable);
- bytesAvailable = bytesReady();
+ bytesAvailable = checkBytesReady();
if (bytesAvailable < 0) {
// recovery failed must stop and set error.
close();
@@ -639,11 +649,25 @@ bool QAudioInputPrivate::deviceReady()
InputPrivate* a = qobject_cast<InputPrivate*>(audioSource);
a->trigger();
}
- bytesAvailable = bytesReady();
+ bytesAvailable = checkBytesReady();
if(deviceState != QAudio::ActiveState)
return true;
+ if (bytesAvailable < 0) {
+ // bytesAvailable as negative is error code, try to recover from it.
+ xrun_recovery(bytesAvailable);
+ bytesAvailable = checkBytesReady();
+ if (bytesAvailable < 0) {
+ // recovery failed must stop and set error.
+ close();
+ errorState = QAudio::IOError;
+ deviceState = QAudio::StoppedState;
+ emit stateChanged(deviceState);
+ return 0;
+ }
+ }
+
if(intervalTime && (timeStamp.elapsed() + elapsedTimeOffset) > intervalTime) {
emit notify();
elapsedTimeOffset = timeStamp.elapsed() + elapsedTimeOffset - intervalTime;
diff --git a/src/multimedia/audio/qaudioinput_alsa_p.h b/src/multimedia/audio/qaudioinput_alsa_p.h
index c907019318..52975a647b 100644
--- a/src/multimedia/audio/qaudioinput_alsa_p.h
+++ b/src/multimedia/audio/qaudioinput_alsa_p.h
@@ -110,6 +110,7 @@ private slots:
bool deviceReady();
private:
+ int checkBytesReady();
int xrun_recovery(int err);
int setFormat();
bool open();
diff --git a/src/multimedia/audio/qaudioinput_win32_p.cpp b/src/multimedia/audio/qaudioinput_win32_p.cpp
index 14a1cf337d..ece1c26c3e 100644
--- a/src/multimedia/audio/qaudioinput_win32_p.cpp
+++ b/src/multimedia/audio/qaudioinput_win32_p.cpp
@@ -148,7 +148,7 @@ void QAudioInputPrivate::freeBlocks(WAVEHDR* blockArray)
for(int i = 0; i < count; i++) {
waveInUnprepareHeader(hWaveIn,blocks, sizeof(WAVEHDR));
- blocks+=sizeof(WAVEHDR);
+ blocks++;
}
HeapFree(GetProcessHeap(), 0, blockArray);
}
diff --git a/src/multimedia/audio/qaudiooutput_win32_p.cpp b/src/multimedia/audio/qaudiooutput_win32_p.cpp
index a8aeb4193d..99bada2a5c 100644
--- a/src/multimedia/audio/qaudiooutput_win32_p.cpp
+++ b/src/multimedia/audio/qaudiooutput_win32_p.cpp
@@ -52,6 +52,53 @@
#include "qaudiooutput_win32_p.h"
+#ifndef SPEAKER_FRONT_LEFT
+ #define SPEAKER_FRONT_LEFT 0x00000001
+ #define SPEAKER_FRONT_RIGHT 0x00000002
+ #define SPEAKER_FRONT_CENTER 0x00000004
+ #define SPEAKER_LOW_FREQUENCY 0x00000008
+ #define SPEAKER_BACK_LEFT 0x00000010
+ #define SPEAKER_BACK_RIGHT 0x00000020
+ #define SPEAKER_FRONT_LEFT_OF_CENTER 0x00000040
+ #define SPEAKER_FRONT_RIGHT_OF_CENTER 0x00000080
+ #define SPEAKER_BACK_CENTER 0x00000100
+ #define SPEAKER_SIDE_LEFT 0x00000200
+ #define SPEAKER_SIDE_RIGHT 0x00000400
+ #define SPEAKER_TOP_CENTER 0x00000800
+ #define SPEAKER_TOP_FRONT_LEFT 0x00001000
+ #define SPEAKER_TOP_FRONT_CENTER 0x00002000
+ #define SPEAKER_TOP_FRONT_RIGHT 0x00004000
+ #define SPEAKER_TOP_BACK_LEFT 0x00008000
+ #define SPEAKER_TOP_BACK_CENTER 0x00010000
+ #define SPEAKER_TOP_BACK_RIGHT 0x00020000
+ #define SPEAKER_RESERVED 0x7FFC0000
+ #define SPEAKER_ALL 0x80000000
+#endif
+
+#ifndef _WAVEFORMATEXTENSIBLE_
+
+ #define _WAVEFORMATEXTENSIBLE_
+ typedef struct
+ {
+ WAVEFORMATEX Format; // Base WAVEFORMATEX data
+ union
+ {
+ WORD wValidBitsPerSample; // Valid bits in each sample container
+ WORD wSamplesPerBlock; // Samples per block of audio data; valid
+ // if wBitsPerSample=0 (but rarely used).
+ WORD wReserved; // Zero if neither case above applies.
+ } Samples;
+ DWORD dwChannelMask; // Positions of the audio channels
+ GUID SubFormat; // Format identifier GUID
+ } WAVEFORMATEXTENSIBLE, *PWAVEFORMATEXTENSIBLE, *LPPWAVEFORMATEXTENSIBLE;
+ typedef const WAVEFORMATEXTENSIBLE* LPCWAVEFORMATEXTENSIBLE;
+
+#endif
+
+#if !defined(WAVE_FORMAT_EXTENSIBLE)
+#define WAVE_FORMAT_EXTENSIBLE 0xFFFE
+#endif
+
//#define DEBUG_AUDIO 1
QT_BEGIN_NAMESPACE
@@ -146,7 +193,7 @@ void QAudioOutputPrivate::freeBlocks(WAVEHDR* blockArray)
for(int i = 0; i < count; i++) {
waveOutUnprepareHeader(hWaveOut,blocks, sizeof(WAVEHDR));
- blocks+=sizeof(WAVEHDR);
+ blocks++;
}
HeapFree(GetProcessHeap(), 0, blockArray);
}
@@ -258,15 +305,49 @@ bool QAudioOutputPrivate::open()
}
}
- if(waveOutOpen(&hWaveOut, devId, &wfx,
- (DWORD_PTR)&waveOutProc,
- (DWORD_PTR) this,
- CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
- errorState = QAudio::OpenError;
- deviceState = QAudio::StoppedState;
- emit stateChanged(deviceState);
- qWarning("QAudioOutput: open error");
- return false;
+ if ( settings.channels() <= 2) {
+ if(waveOutOpen(&hWaveOut, devId, &wfx,
+ (DWORD_PTR)&waveOutProc,
+ (DWORD_PTR) this,
+ CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
+ errorState = QAudio::OpenError;
+ deviceState = QAudio::StoppedState;
+ emit stateChanged(deviceState);
+ qWarning("QAudioOutput: open error");
+ return false;
+ }
+ } else {
+ WAVEFORMATEXTENSIBLE wfex;
+ wfex.Format.wFormatTag = WAVE_FORMAT_EXTENSIBLE;
+ wfex.Format.nChannels = settings.channels();
+ wfex.Format.wBitsPerSample = settings.sampleSize();
+ wfex.Format.nSamplesPerSec = settings.frequency();
+ wfex.Format.nBlockAlign = wfex.Format.nChannels*wfex.Format.wBitsPerSample/8;
+ wfex.Format.nAvgBytesPerSec=wfex.Format.nSamplesPerSec*wfex.Format.nBlockAlign;
+ wfex.Samples.wValidBitsPerSample=wfex.Format.wBitsPerSample;
+ static const GUID _KSDATAFORMAT_SUBTYPE_PCM = {
+ 0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}};
+ wfex.SubFormat=_KSDATAFORMAT_SUBTYPE_PCM;
+ wfex.Format.cbSize=22;
+
+ wfex.dwChannelMask = SPEAKER_FRONT_LEFT | SPEAKER_FRONT_RIGHT;
+ if (settings.channels() >= 4)
+ wfex.dwChannelMask |= SPEAKER_BACK_LEFT | SPEAKER_BACK_RIGHT;
+ if (settings.channels() >= 6)
+ wfex.dwChannelMask |= SPEAKER_FRONT_CENTER | SPEAKER_LOW_FREQUENCY;
+ if (settings.channels() == 8)
+ wfex.dwChannelMask |= SPEAKER_SIDE_LEFT | SPEAKER_SIDE_RIGHT;
+
+ if(waveOutOpen(&hWaveOut, devId, &wfex.Format,
+ (DWORD_PTR)&waveOutProc,
+ (DWORD_PTR) this,
+ CALLBACK_FUNCTION) != MMSYSERR_NOERROR) {
+ errorState = QAudio::OpenError;
+ deviceState = QAudio::StoppedState;
+ emit stateChanged(deviceState);
+ qWarning("QAudioOutput: open error");
+ return false;
+ }
}
totalTimeValue = 0;
diff --git a/src/multimedia/video/qabstractvideobuffer.cpp b/src/multimedia/video/qabstractvideobuffer.cpp
index e9d30d0730..db05ee5911 100644
--- a/src/multimedia/video/qabstractvideobuffer.cpp
+++ b/src/multimedia/video/qabstractvideobuffer.cpp
@@ -73,6 +73,7 @@ QT_BEGIN_NAMESPACE
\value GLTextureHandle The handle of the buffer is an OpenGL texture ID.
\value XvShmImageHandle The handle contains pointer to shared memory XVideo image.
\value CoreImageHandle The handle contains pointer to Mac OS X CIImage.
+ \value QPixmapHandle The handle of the buffer is a QPixmap.
\value UserHandle Start value for user defined handle types.
\sa handleType()
diff --git a/src/multimedia/video/qabstractvideobuffer.h b/src/multimedia/video/qabstractvideobuffer.h
index a8389db126..98e12da7fe 100644
--- a/src/multimedia/video/qabstractvideobuffer.h
+++ b/src/multimedia/video/qabstractvideobuffer.h
@@ -63,6 +63,7 @@ public:
GLTextureHandle,
XvShmImageHandle,
CoreImageHandle,
+ QPixmapHandle,
UserHandle = 1000
};
diff --git a/src/multimedia/video/qvideosurfaceformat.cpp b/src/multimedia/video/qvideosurfaceformat.cpp
index 1fc13a602c..3afbdc95f9 100644
--- a/src/multimedia/video/qvideosurfaceformat.cpp
+++ b/src/multimedia/video/qvideosurfaceformat.cpp
@@ -252,7 +252,7 @@ QVideoSurfaceFormat::~QVideoSurfaceFormat()
bool QVideoSurfaceFormat::isValid() const
{
- return d->pixelFormat == QVideoFrame::Format_Invalid && d->frameSize.isValid();
+ return d->pixelFormat != QVideoFrame::Format_Invalid && d->frameSize.isValid();
}
/*!
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 1afabecf74..9e2b85ed68 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -286,13 +286,8 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
resend = false;
//create the response header to be used with QAuthenticatorPrivate.
- QHttpResponseHeader responseHeader;
QList<QPair<QByteArray, QByteArray> > fields = reply->header();
- QList<QPair<QByteArray, QByteArray> >::const_iterator it = fields.constBegin();
- while (it != fields.constEnd()) {
- responseHeader.addValue(QString::fromLatin1(it->first), QString::fromUtf8(it->second));
- it++;
- }
+
//find out the type of authentication protocol requested.
QAuthenticatorPrivate::Method authMethod = reply->d_func()->authenticationMethod(isProxy);
if (authMethod != QAuthenticatorPrivate::None) {
@@ -310,7 +305,7 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
if (auth->isNull())
auth->detach();
QAuthenticatorPrivate *priv = QAuthenticatorPrivate::getPrivate(*auth);
- priv->parseHttpResponse(responseHeader, isProxy);
+ priv->parseHttpResponse(fields, isProxy);
if (priv->phase == QAuthenticatorPrivate::Done) {
if ((isProxy && pendingProxyAuthSignal) ||(!isProxy && pendingAuthSignal)) {
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index a6c5c02bfb..f617244b17 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -944,10 +944,10 @@ bool QNetworkAccessHttpBackend::sendCacheContents(const QNetworkCacheMetaData &m
checkForRedirect(status);
- emit metaDataChanged();
-
- // invoke this asynchronously, else Arora/QtDemoBrowser don't like cached downloads
- // see task 250221 / 251801
+ // This needs to be emitted in the event loop because it can be reached at
+ // the direct code path of qnam.get(...) before the user has a chance
+ // to connect any signals.
+ QMetaObject::invokeMethod(this, "metaDataChanged", Qt::QueuedConnection);
qRegisterMetaType<QIODevice*>("QIODevice*");
QMetaObject::invokeMethod(this, "writeDownstreamData", Qt::QueuedConnection, Q_ARG(QIODevice*, contents));
diff --git a/src/network/access/qnetworkrequest.cpp b/src/network/access/qnetworkrequest.cpp
index bccfec1dd8..fa592c22c0 100644
--- a/src/network/access/qnetworkrequest.cpp
+++ b/src/network/access/qnetworkrequest.cpp
@@ -230,6 +230,14 @@ QT_BEGIN_NAMESPACE
\since 4.7
+ \omitvalue MaximumDownloadBufferSizeAttribute
+ \since 4.7
+ \internal
+
+ \omitvalue DownloadBufferAttribute
+ \since 4.7
+ \internal
+
\value User
Special type. Additional information can be passed in
QVariants with types ranging from User to UserMax. The default
diff --git a/src/network/access/qnetworkrequest.h b/src/network/access/qnetworkrequest.h
index d2945c40e6..cdadf0f69c 100644
--- a/src/network/access/qnetworkrequest.h
+++ b/src/network/access/qnetworkrequest.h
@@ -82,6 +82,8 @@ public:
CookieLoadControlAttribute,
AuthenticationReuseAttribute,
CookieSaveControlAttribute,
+ MaximumDownloadBufferSizeAttribute, // internal
+ DownloadBufferAttribute, // internal
User = 1000,
UserMax = 32767
diff --git a/src/network/bearer/qnetworkconfiguration.cpp b/src/network/bearer/qnetworkconfiguration.cpp
index 4108fee361..d7fcebab92 100644
--- a/src/network/bearer/qnetworkconfiguration.cpp
+++ b/src/network/bearer/qnetworkconfiguration.cpp
@@ -343,9 +343,11 @@ bool QNetworkConfiguration::isRoamingAvailable() const
}
/*!
- 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.
+ Returns all sub configurations of this network configuration in priority order. The first sub
+ configuration in the list has the highest priority.
+
+ Only network configurations of type \l ServiceNetwork can have children. Otherwise this
+ function returns an empty list.
*/
QList<QNetworkConfiguration> QNetworkConfiguration::children() const
{
@@ -356,16 +358,18 @@ QList<QNetworkConfiguration> QNetworkConfiguration::children() const
QMutexLocker locker(&d->mutex);
- QMutableListIterator<QNetworkConfigurationPrivatePointer> iter(d->serviceNetworkMembers);
- while (iter.hasNext()) {
- QNetworkConfigurationPrivatePointer p = iter.next();
+ QMutableMapIterator<unsigned int, QNetworkConfigurationPrivatePointer> i(d->serviceNetworkMembers);
+ while (i.hasNext()) {
+ i.next();
+
+ QNetworkConfigurationPrivatePointer p = i.value();
//if we have an invalid member get rid of it -> was deleted earlier on
{
QMutexLocker childLocker(&p->mutex);
if (!p->isValid) {
- iter.remove();
+ i.remove();
continue;
}
}
@@ -428,6 +432,5 @@ QString QNetworkConfiguration::bearerName() const
return d->bearerName();
}
-
QT_END_NAMESPACE
diff --git a/src/network/bearer/qnetworkconfiguration_p.h b/src/network/bearer/qnetworkconfiguration_p.h
index 6e146e06a6..966dfb29e6 100644
--- a/src/network/bearer/qnetworkconfiguration_p.h
+++ b/src/network/bearer/qnetworkconfiguration_p.h
@@ -57,6 +57,7 @@
#include <QtCore/qshareddata.h>
#include <QtCore/qmutex.h>
+#include <QtCore/qmap.h>
QT_BEGIN_NAMESPACE
@@ -84,7 +85,7 @@ public:
return bearer;
}
- QList<QNetworkConfigurationPrivatePointer> serviceNetworkMembers;
+ QMap<unsigned int, QNetworkConfigurationPrivatePointer> serviceNetworkMembers;
mutable QMutex mutex;
diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp
index 1ed6cbb233..65de5397a4 100644
--- a/src/network/bearer/qnetworksession.cpp
+++ b/src/network/bearer/qnetworksession.cpp
@@ -629,8 +629,10 @@ void QNetworkSession::reject()
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.
+ This function may not always be supported on all platforms and returns 0.
+ The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.
+
+ \note On some platforms this function may run the main event loop.
*/
quint64 QNetworkSession::bytesWritten() const
{
@@ -646,8 +648,10 @@ quint64 QNetworkSession::bytesWritten() const
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.
+ This function may not always be supported on all platforms and returns 0.
+ The platform capability can be detected via QNetworkConfigurationManager::DataStatistics.
+
+ \note On some platforms this function may run the main event loop.
*/
quint64 QNetworkSession::bytesReceived() const
{
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index e4023c843d..d61c6863ea 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -50,6 +50,8 @@
#include <qdatastream.h>
#include <qendian.h>
#include <qstring.h>
+#include <qdatetime.h>
+
QT_BEGIN_NAMESPACE
@@ -83,6 +85,44 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas
Note that, in particular, NTLM version 2 is not supported.
+ \section1 Options
+
+ In addition to the username and password required for authentication, a
+ QAuthenticator object can also contain additional options. The
+ options() function can be used to query incoming options sent by
+ the server; the setOption() function can
+ be used to set outgoing options, to be processed by the authenticator
+ calculation. The options accepted and provided depend on the authentication
+ type (see method()).
+
+ The following tables list known incoming options as well as accepted
+ outgoing options. The list of incoming options is not exhaustive, since
+ servers may include additional information at any time. The list of
+ outgoing options is exhaustive, however, and no unknown options will be
+ treated or sent back to the server.
+
+ \section2 Basic
+
+ \table
+ \header \o Option \o Direction \o Description
+ \row \o \tt{realm} \o Incoming \o Contains the realm of the authentication, the same as realm()
+ \endtable
+
+ The Basic authentication mechanism supports no outgoing options.
+
+ \section2 NTLM version 1
+
+ The NTLM authentication mechanism currently supports no incoming or outgoing options.
+
+ \section2 Digest-MD5
+
+ \table
+ \header \o Option \o Direction \o Description
+ \row \o \tt{realm} \o Incoming \o Contains the realm of the authentication, the same as realm()
+ \endtable
+
+ The Digest-MD5 authentication mechanism supports no outgoing options.
+
\sa QSslSocket
*/
@@ -138,7 +178,8 @@ bool QAuthenticator::operator==(const QAuthenticator &other) const
return d->user == other.d->user
&& d->password == other.d->password
&& d->realm == other.d->realm
- && d->method == other.d->method;
+ && d->method == other.d->method
+ && d->options == other.d->options;
}
/*!
@@ -162,7 +203,18 @@ QString QAuthenticator::user() const
void QAuthenticator::setUser(const QString &user)
{
detach();
- d->user = user;
+
+ int separatorPosn = 0;
+ separatorPosn = user.indexOf(QLatin1String("\\"));
+
+ if (separatorPosn == -1) {
+ //No domain name present
+ d->user = user;
+ } else {
+ //domain name is present
+ d->realm = user.left(separatorPosn);
+ d->user = user.mid(separatorPosn+1);
+ }
}
/*!
@@ -205,9 +257,49 @@ QString QAuthenticator::realm() const
return d ? d->realm : QString();
}
+/*!
+ \since 4.7
+ Returns the value related to option \a opt if it was set by the server.
+ See \l{QAuthenticator#Options} for more information on incoming options.
+ If option \a opt isn't found, an invalid QVariant will be returned.
+
+ \sa options(), QAuthenticator#Options
+*/
+QVariant QAuthenticator::option(const QString &opt) const
+{
+ return d ? d->options.value(opt) : QVariant();
+}
/*!
- returns true if the authenticator is null.
+ \since 4.7
+ Returns all incoming options set in this QAuthenticator object by parsing
+ the server reply. See \l{QAuthenticator#Options} for more information
+ on incoming options.
+
+ \sa option(), QAuthenticator#Options
+*/
+QVariantHash QAuthenticator::options() const
+{
+ return d ? d->options : QVariantHash();
+}
+
+/*!
+ \since 4.7
+
+ Sets the outgoing option \a opt to value \a value.
+ See \l{QAuthenticator#Options} for more information on outgoing options.
+
+ \sa options(), option(), QAuthenticator#Options
+*/
+void QAuthenticator::setOption(const QString &opt, const QVariant &value)
+{
+ detach();
+ d->options.insert(opt, value);
+}
+
+
+/*!
+ Returns true if the authenticator is null.
*/
bool QAuthenticator::isNull() const
{
@@ -228,7 +320,20 @@ QAuthenticatorPrivate::QAuthenticatorPrivate()
#ifndef QT_NO_HTTP
void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header, bool isProxy)
{
- QList<QPair<QString, QString> > values = header.values();
+ const QList<QPair<QString, QString> > values = header.values();
+ QList<QPair<QByteArray, QByteArray> > rawValues;
+
+ QList<QPair<QString, QString> >::const_iterator it, end;
+ for (it = values.constBegin(), end = values.constEnd(); it != end; ++it)
+ rawValues.append(qMakePair(it->first.toLatin1(), it->second.toUtf8()));
+
+ // continue in byte array form
+ parseHttpResponse(rawValues, isProxy);
+}
+#endif
+
+void QAuthenticatorPrivate::parseHttpResponse(const QList<QPair<QByteArray, QByteArray> > &values, bool isProxy)
+{
const char *search = isProxy ? "proxy-authenticate" : "www-authenticate";
method = None;
@@ -242,38 +347,40 @@ void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header,
authentication parameters.
*/
- QString headerVal;
+ QByteArray headerVal;
for (int i = 0; i < values.size(); ++i) {
- const QPair<QString, QString> &current = values.at(i);
- if (current.first.toLower() != QLatin1String(search))
+ const QPair<QByteArray, QByteArray> &current = values.at(i);
+ if (current.first.toLower() != search)
continue;
- QString str = current.second;
- if (method < Basic && str.startsWith(QLatin1String("Basic"), Qt::CaseInsensitive)) {
- method = Basic; headerVal = str.mid(6);
- } else if (method < Ntlm && str.startsWith(QLatin1String("NTLM"), Qt::CaseInsensitive)) {
+ QByteArray str = current.second.toLower();
+ if (method < Basic && str.startsWith("basic")) {
+ method = Basic;
+ headerVal = current.second.mid(6);
+ } else if (method < Ntlm && str.startsWith("ntlm")) {
method = Ntlm;
- headerVal = str.mid(5);
- } else if (method < DigestMd5 && str.startsWith(QLatin1String("Digest"), Qt::CaseInsensitive)) {
+ headerVal = current.second.mid(5);
+ } else if (method < DigestMd5 && str.startsWith("digest")) {
method = DigestMd5;
- headerVal = str.mid(7);
+ headerVal = current.second.mid(7);
}
}
- challenge = headerVal.trimmed().toLatin1();
+ challenge = headerVal.trimmed();
QHash<QByteArray, QByteArray> options = parseDigestAuthenticationChallenge(challenge);
switch(method) {
case Basic:
- realm = QString::fromLatin1(options.value("realm"));
+ if(realm.isEmpty())
+ this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm"));
if (user.isEmpty())
phase = Done;
break;
case Ntlm:
// #### extract from header
- realm.clear();
break;
case DigestMd5: {
- realm = QString::fromLatin1(options.value("realm"));
+ if(realm.isEmpty())
+ this->options[QLatin1String("realm")] = realm = QString::fromLatin1(options.value("realm"));
if (options.value("stale").toLower() == "true")
phase = Start;
if (user.isEmpty())
@@ -286,7 +393,6 @@ void QAuthenticatorPrivate::parseHttpResponse(const QHttpResponseHeader &header,
phase = Invalid;
}
}
-#endif
QByteArray QAuthenticatorPrivate::calculateResponse(const QByteArray &requestMethod, const QByteArray &path)
{
@@ -661,6 +767,20 @@ QByteArray QAuthenticatorPrivate::digestMd5Response(const QByteArray &challenge,
*/
#define NTLMSSP_NEGOTIATE_56 0x80000000
+/*
+ * AvId values
+ */
+#define AVTIMESTAMP 7
+
+//#define NTLMV1_CLIENT
+
+
+//************************Global variables***************************
+
+const int blockSize = 64; //As per RFC2104 Block-size is 512 bits
+const int nDigestLen = 16; //Trunctaion Length of the Hmac-Md5 digest
+const quint8 respversion = 1;
+const quint8 hirespversion = 1;
/* usage:
// fill up ctx with what we know.
@@ -803,6 +923,7 @@ public:
// extracted
QString targetNameStr, targetInfoStr;
+ QByteArray targetInfoBuff;
};
@@ -818,6 +939,7 @@ public:
// extracted
QByteArray lmResponseBuf, ntlmResponseBuf;
QString domainStr, userStr, workstationStr, sessionKeyStr;
+ QByteArray v2Hash;
};
@@ -899,7 +1021,7 @@ static QString qStringFromUcs2Le(const QByteArray& src)
return QString((const QChar *)src.data(), src.size()/2);
}
-
+#ifdef NTLMV1_CLIENT
static QByteArray qEncodeNtlmResponse(const QAuthenticatorPrivate *ctx, const QNtlmPhase2Block& ch)
{
QCryptographicHash md4(QCryptographicHash::Md4);
@@ -941,7 +1063,232 @@ static QByteArray qEncodeLmResponse(const QAuthenticatorPrivate *ctx, const QNtl
hash.fill(0);
return rc;
}
+#endif
+
+/*********************************************************************
+* Function Name: qEncodeHmacMd5
+* Params:
+* key: Type - QByteArray
+* - It is the Authentication key
+* message: Type - QByteArray
+* - This is the actual message which will be encoded
+* using HMacMd5 hash algorithm
+*
+* Return Value:
+* hmacDigest: Type - QByteArray
+*
+* Description:
+* This function will be used to encode the input message using
+* HMacMd5 hash algorithm.
+*
+* As per the RFC2104 the HMacMd5 algorithm can be specified
+* ---------------------------------------
+* MD5(K XOR opad, MD5(K XOR ipad, text))
+* ---------------------------------------
+*
+*********************************************************************/
+QByteArray qEncodeHmacMd5(QByteArray &key, const QByteArray &message)
+{
+ Q_ASSERT_X(!(message.isEmpty()),"qEncodeHmacMd5", "Empty message check");
+ Q_ASSERT_X(!(key.isEmpty()),"qEncodeHmacMd5", "Empty key check");
+
+ QCryptographicHash hash(QCryptographicHash::Md5);
+ QByteArray hMsg;
+
+ QByteArray iKeyPad(blockSize, 0x36);
+ QByteArray oKeyPad(blockSize, 0x5c);
+
+ hash.reset();
+ // Adjust the key length to blockSize
+
+ if(blockSize < key.length()) {
+ hash.addData(key);
+ key = hash.result(); //MD5 will always return 16 bytes length output
+ }
+
+ //Key will be <= 16 or 20 bytes as hash function (MD5 or SHA hash algorithms)
+ //key size can be max of Block size only
+ key = key.leftJustified(blockSize,0,true);
+
+ //iKeyPad, oKeyPad and key are all of same size "blockSize"
+
+ //xor of iKeyPad with Key and store the result into iKeyPad
+ for(int i = 0; i<key.size();i++) {
+ iKeyPad[i] = key[i]^iKeyPad[i];
+ }
+
+ //xor of oKeyPad with Key and store the result into oKeyPad
+ for(int i = 0; i<key.size();i++) {
+ oKeyPad[i] = key[i]^oKeyPad[i];
+ }
+
+ iKeyPad.append(message); // (K0 xor ipad) || text
+
+ hash.reset();
+ hash.addData(iKeyPad);
+ hMsg = hash.result();
+ //Digest gen after pass-1: H((K0 xor ipad)||text)
+
+ QByteArray hmacDigest;
+ oKeyPad.append(hMsg);
+ hash.reset();
+ hash.addData(oKeyPad);
+ hmacDigest = hash.result();
+ // H((K0 xor opad )|| H((K0 xor ipad) || text))
+
+ /*hmacDigest should not be less than half the length of the HMAC output
+ (to match the birthday attack bound) and not less than 80 bits
+ (a suitable lower bound on the number of bits that need to be
+ predicted by an attacker).
+ Refer RFC 2104 for more details on truncation part */
+
+ /*MD5 hash always returns 16 byte digest only and HMAC-MD5 spec
+ (RFC 2104) also says digest length should be 16 bytes*/
+ return hmacDigest;
+}
+
+static QByteArray qCreatev2Hash(const QAuthenticatorPrivate *ctx,
+ QNtlmPhase3Block *phase3)
+{
+ Q_ASSERT(phase3 != 0);
+ // since v2 Hash is need for both NTLMv2 and LMv2 it is calculated
+ // only once and stored and reused
+ if(phase3->v2Hash.size() == 0) {
+ QCryptographicHash md4(QCryptographicHash::Md4);
+ QByteArray passUnicode = qStringAsUcs2Le(ctx->password);
+ md4.addData(passUnicode.data(), passUnicode.size());
+
+ QByteArray hashKey = md4.result();
+ Q_ASSERT(hashKey.size() == 16);
+ // Assuming the user and domain is always unicode in challenge
+ QByteArray message =
+ qStringAsUcs2Le(ctx->user.toUpper()) +
+ qStringAsUcs2Le(ctx->realm);
+
+ phase3->v2Hash = qEncodeHmacMd5(hashKey, message);
+ }
+ return phase3->v2Hash;
+}
+
+static QByteArray clientChallenge(const QAuthenticatorPrivate *ctx)
+{
+ Q_ASSERT(ctx->cnonce.size() >= 8);
+ QByteArray clientCh = ctx->cnonce.right(8);
+ return clientCh;
+}
+
+// caller has to ensure a valid targetInfoBuff
+static bool qExtractServerTime(const QByteArray& targetInfoBuff,
+ quint64 *serverTime)
+{
+ Q_ASSERT(serverTime != 0);
+ bool retValue = false;
+ QDataStream ds(targetInfoBuff);
+ ds.setByteOrder(QDataStream::LittleEndian);
+
+ quint16 avId;
+ quint16 avLen;
+
+ ds >> avId;
+ ds >> avLen;
+ while(avId != 0) {
+ if(avId == AVTIMESTAMP) {
+ QByteArray timeArray(avLen, 0);
+ //avLen size of QByteArray is allocated
+ ds.readRawData(timeArray.data(), avLen);
+ bool ok;
+ *serverTime = timeArray.toHex().toLongLong(&ok, 16);
+ retValue = true;
+ break;
+ }
+ ds.skipRawData(avLen);
+ ds >> avId;
+ ds >> avLen;
+ }
+ return retValue;
+}
+
+static QByteArray qEncodeNtlmv2Response(const QAuthenticatorPrivate *ctx,
+ const QNtlmPhase2Block& ch,
+ QNtlmPhase3Block *phase3)
+{
+ Q_ASSERT(phase3 != 0);
+ // return value stored in phase3
+ qCreatev2Hash(ctx, phase3);
+
+ QByteArray temp;
+ QDataStream ds(&temp, QIODevice::WriteOnly);
+ ds.setByteOrder(QDataStream::LittleEndian);
+
+ ds << respversion;
+ ds << hirespversion;
+ //Reserved
+ QByteArray reserved1(6, 0);
+ ds.writeRawData(reserved1.constData(), reserved1.size());
+
+ quint64 time = 0;
+
+ //if server sends time, use it instead of current time
+ if(!(ch.targetInfo.len && qExtractServerTime(ch.targetInfoBuff, &time))) {
+ QDateTime currentTime(QDate::currentDate(),
+ QTime::currentTime(), Qt::UTC);
+
+ // number of seconds between 1601 and epoc(1970)
+ // 369 years, 89 leap years
+ // ((369 * 365) + 89) * 24 * 3600 = 11644473600
+
+ time = Q_UINT64_C(currentTime.toTime_t() + 11644473600);
+
+ // represented as 100 nano seconds
+ time = Q_UINT64_C(time * 10000000);
+ }
+ ds << time;
+
+ //8 byte client challenge
+ QByteArray clientCh = clientChallenge(ctx);
+ ds.writeRawData(clientCh.constData(), clientCh.size());
+
+ //Reserved
+ QByteArray reserved2(4, 0);
+ ds.writeRawData(reserved2.constData(), reserved2.size());
+
+ if (ch.targetInfo.len > 0) {
+ ds.writeRawData(ch.targetInfoBuff.constData(),
+ ch.targetInfoBuff.size());
+ }
+
+ //Reserved
+ QByteArray reserved3(4, 0);
+ ds.writeRawData(reserved3.constData(), reserved3.size());
+
+ QByteArray message((const char*)ch.challenge, sizeof(ch.challenge));
+ message.append(temp);
+
+ QByteArray ntChallengeResp = qEncodeHmacMd5(phase3->v2Hash, message);
+ ntChallengeResp.append(temp);
+
+ return ntChallengeResp;
+}
+
+static QByteArray qEncodeLmv2Response(const QAuthenticatorPrivate *ctx,
+ const QNtlmPhase2Block& ch,
+ QNtlmPhase3Block *phase3)
+{
+ Q_ASSERT(phase3 != 0);
+ // return value stored in phase3
+ qCreatev2Hash(ctx, phase3);
+
+ QByteArray message((const char*)ch.challenge, sizeof(ch.challenge));
+ QByteArray clientCh = clientChallenge(ctx);
+
+ message.append(clientCh);
+
+ QByteArray lmChallengeResp = qEncodeHmacMd5(phase3->v2Hash, message);
+ lmChallengeResp.append(clientCh);
+
+ return lmChallengeResp;
+}
static bool qNtlmDecodePhase2(const QByteArray& data, QNtlmPhase2Block& ch)
{
@@ -976,7 +1323,10 @@ static bool qNtlmDecodePhase2(const QByteArray& data, QNtlmPhase2Block& ch)
}
if (ch.targetInfo.len > 0) {
- // UNUSED right now
+ if (ch.targetInfo.len + ch.targetInfo.offset > (unsigned)data.size())
+ return false;
+
+ ch.targetInfoBuff = data.mid(ch.targetInfo.offset, ch.targetInfo.len);
}
return true;
@@ -996,7 +1346,8 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas
bool unicode = ch.flags & NTLMSSP_NEGOTIATE_UNICODE;
- ctx->realm = ch.targetNameStr;
+ if(ctx->realm.isEmpty())
+ ctx->realm = ch.targetNameStr;
pb.flags = NTLMSSP_NEGOTIATE_NTLM;
if (unicode)
@@ -1010,6 +1361,7 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas
offset = qEncodeNtlmString(pb.domain, offset, ctx->realm, unicode);
pb.domainStr = ctx->realm;
+
offset = qEncodeNtlmString(pb.user, offset, ctx->user, unicode);
pb.userStr = ctx->user;
@@ -1017,11 +1369,23 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas
pb.workstationStr = ctx->workstation;
// Get LM response
+#ifdef NTLMV1_CLIENT
pb.lmResponseBuf = qEncodeLmResponse(ctx, ch);
+#else
+ if (ch.targetInfo.len > 0) {
+ pb.lmResponseBuf = QByteArray();
+ } else {
+ pb.lmResponseBuf = qEncodeLmv2Response(ctx, ch, &pb);
+ }
+#endif
offset = qEncodeNtlmBuffer(pb.lmResponse, offset, pb.lmResponseBuf);
// Get NTLM response
+#ifdef NTLMV1_CLIENT
pb.ntlmResponseBuf = qEncodeNtlmResponse(ctx, ch);
+#else
+ pb.ntlmResponseBuf = qEncodeNtlmv2Response(ctx, ch, &pb);
+#endif
offset = qEncodeNtlmBuffer(pb.ntlmResponse, offset, pb.ntlmResponseBuf);
diff --git a/src/network/kernel/qauthenticator.h b/src/network/kernel/qauthenticator.h
index 13ce593496..983b7c0214 100644
--- a/src/network/kernel/qauthenticator.h
+++ b/src/network/kernel/qauthenticator.h
@@ -43,6 +43,7 @@
#define QAUTHENTICATOR_H
#include <QtCore/qstring.h>
+#include <QtCore/qvariant.h>
QT_BEGIN_HEADER
@@ -73,6 +74,10 @@ public:
QString realm() const;
+ QVariant option(const QString &opt) const;
+ QVariantHash options() const;
+ void setOption(const QString &opt, const QVariant &value);
+
bool isNull() const;
void detach();
private:
diff --git a/src/network/kernel/qauthenticator_p.h b/src/network/kernel/qauthenticator_p.h
index e9ce9ac161..10966014b9 100644
--- a/src/network/kernel/qauthenticator_p.h
+++ b/src/network/kernel/qauthenticator_p.h
@@ -57,12 +57,13 @@
#include <qbytearray.h>
#include <qstring.h>
#include <qauthenticator.h>
+#include <qvariant.h>
QT_BEGIN_NAMESPACE
class QHttpResponseHeader;
-class QAuthenticatorPrivate
+class Q_AUTOTEST_EXPORT QAuthenticatorPrivate
{
public:
enum Method { None, Basic, Plain, Login, Ntlm, CramMd5, DigestMd5 };
@@ -71,7 +72,7 @@ public:
QAtomicInt ref;
QString user;
QString password;
- QHash<QByteArray, QByteArray> options;
+ QVariantHash options;
Method method;
QString realm;
QByteArray challenge;
@@ -102,6 +103,7 @@ public:
#ifndef QT_NO_HTTP
void parseHttpResponse(const QHttpResponseHeader &, bool isProxy);
#endif
+ void parseHttpResponse(const QList<QPair<QByteArray, QByteArray> >&, bool isProxy);
};
diff --git a/src/network/kernel/qnetworkproxy_mac.cpp b/src/network/kernel/qnetworkproxy_mac.cpp
index 1e22212d5b..4139a7e281 100644
--- a/src/network/kernel/qnetworkproxy_mac.cpp
+++ b/src/network/kernel/qnetworkproxy_mac.cpp
@@ -157,8 +157,10 @@ QList<QNetworkProxy> macQueryInternal(const QNetworkProxyQuery &query)
return result; // failed
}
- if (isHostExcluded(dict, query.peerHostName()))
+ if (isHostExcluded(dict, query.peerHostName())) {
+ CFRelease(dict);
return result; // no proxy for this host
+ }
// is there a PAC enabled? If so, use it first.
CFNumberRef pacEnabled;
@@ -222,6 +224,7 @@ QList<QNetworkProxy> macQueryInternal(const QNetworkProxyQuery &query)
result << https;
}
+ CFRelease(dict);
return result;
}
diff --git a/src/network/socket/qtcpserver.cpp b/src/network/socket/qtcpserver.cpp
index 55f926d3f9..0640c7cccd 100644
--- a/src/network/socket/qtcpserver.cpp
+++ b/src/network/socket/qtcpserver.cpp
@@ -577,7 +577,7 @@ void QTcpServer::incomingConnection(int socketDescriptor)
/*!
This function is called by QTcpServer::incomingConnection()
- to add a socket to the list of pending incoming connections.
+ to add the \a socket to the list of pending incoming connections.
\note Don't forget to call this member from reimplemented
incomingConnection() if you do not want to break the
diff --git a/src/network/ssl/qsslsocket.cpp b/src/network/ssl/qsslsocket.cpp
index f85fa8449b..f73068eb8b 100644
--- a/src/network/ssl/qsslsocket.cpp
+++ b/src/network/ssl/qsslsocket.cpp
@@ -574,7 +574,7 @@ void QSslSocket::setProtocol(QSsl::SslProtocol protocol)
certificate is valid.
The default mode is AutoVerifyPeer, which tells QSslSocket to use
- VerifyPeer for clients, QueryPeer for clients.
+ VerifyPeer for clients and QueryPeer for servers.
\sa setPeerVerifyMode(), peerVerifyDepth(), mode()
*/
@@ -594,7 +594,7 @@ QSslSocket::PeerVerifyMode QSslSocket::peerVerifyMode() const
certificate is valid.
The default mode is AutoVerifyPeer, which tells QSslSocket to use
- VerifyPeer for clients, QueryPeer for clients.
+ VerifyPeer for clients and QueryPeer for servers.
Setting this mode after encryption has started has no effect on the
current connection.
diff --git a/src/network/ssl/qsslsocket_openssl.cpp b/src/network/ssl/qsslsocket_openssl.cpp
index 1d794ae624..b4d030c806 100644
--- a/src/network/ssl/qsslsocket_openssl.cpp
+++ b/src/network/ssl/qsslsocket_openssl.cpp
@@ -59,6 +59,8 @@
#include <QtCore/qvarlengtharray.h>
#include <QLibrary> // for loading the security lib for the CA store
+QT_BEGIN_NAMESPACE
+
#if defined(Q_OS_MAC)
#define kSecTrustSettingsDomainSystem 2 // so we do not need to include the header file
PtrSecCertificateGetData QSslSocketPrivate::ptrSecCertificateGetData = 0;
@@ -72,8 +74,6 @@
#include <QtCore/private/qcore_symbian_p.h>
#endif
-QT_BEGIN_NAMESPACE
-
bool QSslSocketPrivate::s_libraryLoaded = false;
bool QSslSocketPrivate::s_loadedCiphersAndCerts = false;
@@ -475,27 +475,12 @@ bool QSslSocketPrivate::ensureLibraryLoaded()
void QSslSocketPrivate::ensureCiphersAndCertsLoaded()
{
+ QMutexLocker locker(openssl_locks()->initLock());
if (s_loadedCiphersAndCerts)
return;
s_loadedCiphersAndCerts = true;
resetDefaultCiphers();
- setDefaultCaCertificates(systemCaCertificates());
-}
-
-/*!
- \internal
-
- Declared static in QSslSocketPrivate, makes sure the SSL libraries have
- been initialized.
-*/
-
-void QSslSocketPrivate::ensureInitialized()
-{
- if (!supportsSsl())
- return;
-
- ensureCiphersAndCertsLoaded();
//load symbols needed to receive certificates from system store
#if defined(Q_OS_MAC)
@@ -532,6 +517,22 @@ void QSslSocketPrivate::ensureInitialized()
qWarning("could not load crypt32 library"); // should never happen
}
#endif
+ setDefaultCaCertificates(systemCaCertificates());
+}
+
+/*!
+ \internal
+
+ Declared static in QSslSocketPrivate, makes sure the SSL libraries have
+ been initialized.
+*/
+
+void QSslSocketPrivate::ensureInitialized()
+{
+ if (!supportsSsl())
+ return;
+
+ ensureCiphersAndCertsLoaded();
}
/*!
@@ -970,8 +971,20 @@ void QSslSocketBackendPrivate::transmit()
#endif
plainSocket->disconnectFromHost();
break;
+ case SSL_ERROR_SYSCALL: // some IO error
+ case SSL_ERROR_SSL: // error in the SSL library
+ // we do not know exactly what the error is, nor whether we can recover from it,
+ // so just return to prevent an endless loop in the outer "while" statement
+ q->setErrorString(QSslSocket::tr("Error while reading: %1").arg(SSL_ERRORSTR()));
+ q->setSocketError(QAbstractSocket::UnknownSocketError);
+ emit q->error(QAbstractSocket::UnknownSocketError);
+ return;
default:
- // ### Handle errors better.
+ // SSL_ERROR_WANT_CONNECT, SSL_ERROR_WANT_ACCEPT: can only happen with a
+ // BIO_s_connect() or BIO_s_accept(), which we do not call.
+ // SSL_ERROR_WANT_X509_LOOKUP: can only happen with a
+ // SSL_CTX_set_client_cert_cb(), which we do not call.
+ // So this default case should never be triggered.
q->setErrorString(QSslSocket::tr("Error while reading: %1").arg(SSL_ERRORSTR()));
q->setSocketError(QAbstractSocket::UnknownSocketError);
emit q->error(QAbstractSocket::UnknownSocketError);
@@ -1105,17 +1118,16 @@ bool QSslSocketBackendPrivate::startHandshake()
QString peerName = (verificationPeerName.isEmpty () ? q->peerName() : verificationPeerName);
QString commonName = configuration.peerCertificate.subjectInfo(QSslCertificate::CommonName);
- QRegExp regexp(commonName, Qt::CaseInsensitive, QRegExp::Wildcard);
- if (!regexp.exactMatch(peerName)) {
+ if (!isMatchingHostname(commonName.toLower(), peerName.toLower())) {
bool matched = false;
foreach (const QString &altName, configuration.peerCertificate
.alternateSubjectNames().values(QSsl::DnsEntry)) {
- regexp.setPattern(altName);
- if (regexp.exactMatch(peerName)) {
+ if (isMatchingHostname(altName.toLower(), peerName.toLower())) {
matched = true;
break;
}
}
+
if (!matched) {
// No matches in common names or alternate names.
QSslError error(QSslError::HostNameMismatch, configuration.peerCertificate);
@@ -1245,4 +1257,39 @@ QList<QSslCertificate> QSslSocketBackendPrivate::STACKOFX509_to_QSslCertificates
return certificates;
}
+bool QSslSocketBackendPrivate::isMatchingHostname(const QString &cn, const QString &hostname)
+{
+ int wildcard = cn.indexOf(QLatin1Char('*'));
+
+ // Check this is a wildcard cert, if not then just compare the strings
+ if (wildcard < 0)
+ return cn == hostname;
+
+ int firstCnDot = cn.indexOf(QLatin1Char('.'));
+ int secondCnDot = cn.indexOf(QLatin1Char('.'), firstCnDot+1);
+
+ // Check at least 3 components
+ if ((-1 == secondCnDot) || (secondCnDot+1 >= cn.length()))
+ return false;
+
+ // Check * is last character of 1st component (ie. there's a following .)
+ if (wildcard+1 != firstCnDot)
+ return false;
+
+ // Check only one star
+ if (cn.lastIndexOf(QLatin1Char('*')) != wildcard)
+ return false;
+
+ // Check characters preceding * (if any) match
+ if (wildcard && (hostname.leftRef(wildcard) != cn.leftRef(wildcard)))
+ return false;
+
+ // Check characters following first . match
+ if (hostname.midRef(hostname.indexOf(QLatin1Char('.'))) != cn.midRef(firstCnDot))
+ return false;
+
+ // Ok, I guess this was a wildcard CN and the hostname matches.
+ return true;
+}
+
QT_END_NAMESPACE
diff --git a/src/network/ssl/qsslsocket_openssl_p.h b/src/network/ssl/qsslsocket_openssl_p.h
index 987dfae6f6..7a4e6b6e04 100644
--- a/src/network/ssl/qsslsocket_openssl_p.h
+++ b/src/network/ssl/qsslsocket_openssl_p.h
@@ -116,6 +116,7 @@ public:
static QSslCipher QSslCipher_from_SSL_CIPHER(SSL_CIPHER *cipher);
static QList<QSslCertificate> STACKOFX509_to_QSslCertificates(STACK_OF(X509) *x509);
+ Q_AUTOTEST_EXPORT static bool isMatchingHostname(const QString &cn, const QString &hostname);
};
#if defined(Q_OS_SYMBIAN)
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
index ee49a3d00c..d3f6a295e4 100644
--- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
+++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp
@@ -1128,7 +1128,7 @@ void QGL2PaintEngineEx::fill(const QVectorPath &path, const QBrush &brush)
d->fill(path);
}
-extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
+extern Q_GUI_EXPORT bool qt_scaleForTransform(const QTransform &transform, qreal *scale); // qtransform.cpp
void QGL2PaintEngineEx::stroke(const QVectorPath &path, const QPen &pen)
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 2f16b9928d..0f171e407b 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -1334,6 +1334,10 @@ QGLFormat::OpenGLVersionFlags Q_AUTOTEST_EXPORT qOpenGLVersionFlagsFromString(co
\value OpenGL_Version_3_2 OpenGL version 3.2 or higher is present.
+ \value OpenGL_Version_3_3 OpenGL version 3.3 or higher is present.
+
+ \value OpenGL_Version_4_0 OpenGL version 4.0 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.
@@ -3725,7 +3729,7 @@ QGLWidget::~QGLWidget()
#endif
delete d->glcx;
d->glcx = 0;
-#if defined(Q_WGL)
+#if defined(Q_WS_WIN)
delete d->olcx;
d->olcx = 0;
#endif
@@ -5044,8 +5048,9 @@ void QGLWidget::deleteTexture(QMacCompatGLuint id)
/*!
\since 4.4
- Calls the corresponding QGLContext::drawTexture() on
- this widget's context.
+ Calls the corresponding QGLContext::drawTexture() with
+ \a target, \a textureId, and \a textureTarget for this
+ widget's context.
*/
void QGLWidget::drawTexture(const QRectF &target, GLuint textureId, GLenum textureTarget)
{
@@ -5065,8 +5070,9 @@ void QGLWidget::drawTexture(const QRectF &target, QMacCompatGLuint textureId, QM
/*!
\since 4.4
- Calls the corresponding QGLContext::drawTexture() on
- this widget's context.
+ Calls the corresponding QGLContext::drawTexture() with
+ \a point, \a textureId, and \a textureTarget for this
+ widget's context.
*/
void QGLWidget::drawTexture(const QPointF &point, GLuint textureId, GLenum textureTarget)
{
diff --git a/src/opengl/qglbuffer.cpp b/src/opengl/qglbuffer.cpp
index d6e0109e3e..5f0aed4422 100644
--- a/src/opengl/qglbuffer.cpp
+++ b/src/opengl/qglbuffer.cpp
@@ -416,7 +416,7 @@ void QGLBuffer::allocate(const void *data, int count)
\sa release(), create()
*/
-bool QGLBuffer::bind() const
+bool QGLBuffer::bind()
{
#ifndef QT_NO_DEBUG
if (!isCreated())
@@ -448,7 +448,7 @@ bool QGLBuffer::bind() const
\sa bind()
*/
-void QGLBuffer::release() const
+void QGLBuffer::release()
{
#ifndef QT_NO_DEBUG
if (!isCreated())
diff --git a/src/opengl/qglbuffer.h b/src/opengl/qglbuffer.h
index a1b45ffb87..9867f319d1 100644
--- a/src/opengl/qglbuffer.h
+++ b/src/opengl/qglbuffer.h
@@ -101,8 +101,8 @@ public:
void destroy();
- bool bind() const;
- void release() const;
+ bool bind();
+ void release();
static void release(QGLBuffer::Type type);
diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp
index 6571a76b3d..ef115bd37e 100644
--- a/src/opengl/qwindowsurface_gl.cpp
+++ b/src/opengl/qwindowsurface_gl.cpp
@@ -499,10 +499,9 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint &
}
}
#endif
- if (d_ptr->paintedRegion.boundingRect() != geometry()) {
- // Emits warning if not supported. Should never happen unless
- // setPartialUpdateSupport(true) has been called.
- context()->d_func()->swapRegion(&d_ptr->paintedRegion);
+ if (d_ptr->paintedRegion.boundingRect() != geometry() &&
+ hasPartialUpdateSupport()) {
+ context()->d_func()->swapRegion(&d_ptr->paintedRegion);
} else
context()->swapBuffers();
diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp
index 4992ef5a71..1d633ed662 100644
--- a/src/openvg/qpaintengine_vg.cpp
+++ b/src/openvg/qpaintengine_vg.cpp
@@ -55,6 +55,7 @@
#include <QtGui/private/qfontengine_p.h>
#include <QtGui/private/qpainterpath_p.h>
#include <QtGui/private/qstatictext_p.h>
+#include <QtCore/qmath.h>
#include <QDebug>
#include <QSet>
@@ -1610,7 +1611,10 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
// Try converting the path into a QRegion that tightly follows
// the outline of the path we want to clip with.
- QRegion region(path.convertToPainterPath().toFillPolygon(QTransform()).toPolygon());
+ QRegion region;
+ if (!path.isEmpty())
+ region = QRegion(path.convertToPainterPath().toFillPolygon(QTransform()).toPolygon());
+
switch (op) {
case Qt::NoClip:
{
@@ -3427,7 +3431,13 @@ void QVGPaintEngine::drawStaticTextItem(QStaticTextItem *textItem)
// Set the transformation to use for drawing the current glyphs.
QTransform glyphTransform(d->pathTransform);
- glyphTransform.translate(p.x(), p.y());
+ if (d->transform.type() <= QTransform::TxTranslate) {
+ // Prevent blurriness of unscaled, unrotated text by using integer coordinates.
+ // Using ceil(x-0.5) instead of qRound() or int-cast, behave like other paint engines.
+ glyphTransform.translate(ceil(p.x() - 0.5), ceil(p.y() - 0.5));
+ } else {
+ glyphTransform.translate(p.x(), p.y());
+ }
#if defined(QVG_NO_IMAGE_GLYPHS)
glyphTransform.scale(glyphCache->scaleX, glyphCache->scaleY);
#endif
diff --git a/src/plugins/accessible/widgets/complexwidgets.cpp b/src/plugins/accessible/widgets/complexwidgets.cpp
index 8be156024c..803786fa01 100644
--- a/src/plugins/accessible/widgets/complexwidgets.cpp
+++ b/src/plugins/accessible/widgets/complexwidgets.cpp
@@ -1512,10 +1512,14 @@ QString QAccessibleTabBar::text(Text t, int child) const
default:
break;
}
- } else if (child > 0) {
+ } else {
switch (t) {
case Name:
- return qt_accStripAmp(tabBar()->tabText(child - 1));
+ if (child > 0)
+ return qt_accStripAmp(tabBar()->tabText(child - 1));
+ else if (tabBar()->currentIndex() != -1)
+ return qt_accStripAmp(tabBar()->tabText(tabBar()->currentIndex()));
+ break;
default:
break;
}
diff --git a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
index 499eb1dd7f..662663d912 100644
--- a/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
+++ b/src/plugins/accessible/widgets/qaccessiblewidgets.cpp
@@ -984,7 +984,7 @@ int QAccessibleDockWidget::childCount() const
int QAccessibleDockWidget::indexOfChild(const QAccessibleInterface *child) const
{
if (child) {
- if (qobject_cast<QDockWidget *>(child->object()) == dockWidget() && child->role(0) == TitleBar) {
+ if (child->role(0) == TitleBar) {
return 1;
} else {
return 2; //###
@@ -1214,7 +1214,7 @@ int QAccessibleTitleBar::childAt(int x, int y) const
QObject *QAccessibleTitleBar::object() const
{
- return m_dockWidget;
+ return 0;
}
QDockWidgetLayout *QAccessibleTitleBar::dockWidgetLayout() const
diff --git a/src/plugins/bearer/bearer.pro b/src/plugins/bearer/bearer.pro
index f95e8af94d..6d8f7f2572 100644
--- a/src/plugins/bearer/bearer.pro
+++ b/src/plugins/bearer/bearer.pro
@@ -4,7 +4,8 @@ contains(QT_CONFIG, dbus) {
contains(QT_CONFIG, icd) {
SUBDIRS += icd
} else {
- SUBDIRS += networkmanager generic
+ SUBDIRS += generic
+ !mac:SUBDIRS += connman networkmanager
}
}
diff --git a/src/plugins/bearer/connman/connman.pro b/src/plugins/bearer/connman/connman.pro
new file mode 100644
index 0000000000..4be752bcca
--- /dev/null
+++ b/src/plugins/bearer/connman/connman.pro
@@ -0,0 +1,19 @@
+TARGET = qconnmanbearer
+include(../../qpluginbase.pri)
+
+QT = core network dbus
+
+HEADERS += qconnmanservice_linux_p.h \
+ qconnmanengine.h \
+ ../qnetworksession_impl.h \
+ ../qbearerengine_impl.h
+
+SOURCES += main.cpp \
+ qconnmanservice_linux.cpp \
+ qconnmanengine.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/connman/main.cpp b/src/plugins/bearer/connman/main.cpp
new file mode 100644
index 0000000000..d483cf070b
--- /dev/null
+++ b/src/plugins/bearer/connman/main.cpp
@@ -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$
+**
+****************************************************************************/
+#include "qconnmanengine.h"
+
+#include <QtNetwork/private/qbearerplugin_p.h>
+
+#include <QtCore/qdebug.h>
+
+#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_DBUS
+
+QT_BEGIN_NAMESPACE
+
+class QConnmanEnginePlugin : public QBearerEnginePlugin
+{
+public:
+ QConnmanEnginePlugin();
+ ~QConnmanEnginePlugin();
+
+ QStringList keys() const;
+ QBearerEngine *create(const QString &key) const;
+};
+
+QConnmanEnginePlugin::QConnmanEnginePlugin()
+{
+}
+
+QConnmanEnginePlugin::~QConnmanEnginePlugin()
+{
+}
+
+QStringList QConnmanEnginePlugin::keys() const
+{
+ return QStringList() << QLatin1String("connman");
+}
+
+QBearerEngine *QConnmanEnginePlugin::create(const QString &key) const
+{
+ if (key == QLatin1String("connman")) {
+ QConnmanEngine *engine = new QConnmanEngine;
+ if (engine->connmanAvailable())
+ return engine;
+ else
+ delete engine;
+ }
+ return 0;
+}
+
+Q_EXPORT_STATIC_PLUGIN(QConnmanEnginePlugin)
+Q_EXPORT_PLUGIN2(qconnmanbearer, QConnmanEnginePlugin)
+
+QT_END_NAMESPACE
+
+#endif
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/connman/qconnmanengine.cpp b/src/plugins/bearer/connman/qconnmanengine.cpp
new file mode 100644
index 0000000000..87756233f4
--- /dev/null
+++ b/src/plugins/bearer/connman/qconnmanengine.cpp
@@ -0,0 +1,787 @@
+/****************************************************************************
+**
+** Copyright (C) 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 "qconnmanengine.h"
+#include "qconnmanservice_linux_p.h"
+#include "../qnetworksession_impl.h"
+
+#include <QtNetwork/private/qnetworkconfiguration_p.h>
+
+#include <QtNetwork/qnetworksession.h>
+
+#include <QtCore/qdebug.h>
+
+#include <QtDBus/QtDBus>
+#include <QtDBus/QDBusConnection>
+#include <QtDBus/QDBusInterface>
+#include <QtDBus/QDBusMessage>
+#include <QtDBus/QDBusReply>
+
+#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_DBUS
+
+QT_BEGIN_NAMESPACE
+
+QConnmanEngine::QConnmanEngine(QObject *parent)
+: QBearerEngineImpl(parent),
+ connmanManager(new QConnmanManagerInterface(this))
+{
+}
+
+QConnmanEngine::~QConnmanEngine()
+{
+}
+
+bool QConnmanEngine::connmanAvailable() const
+{
+ QMutexLocker locker(&mutex);
+ return connmanManager->isValid();
+}
+
+void QConnmanEngine::initialize()
+{
+ connect(connmanManager,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(propertyChangedContext(QString,QString,QDBusVariant)));
+
+ foreach(const QString techPath, connmanManager->getTechnologies()) {
+ QConnmanTechnologyInterface *tech;
+ tech = new QConnmanTechnologyInterface(techPath, this);
+
+ connect(tech,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(technologyPropertyChangedContext(QString,QString,QDBusVariant)));
+
+ foreach(const QString devicePath,tech->getDevices()) {
+ QConnmanDeviceInterface *dev;
+ dev = new QConnmanDeviceInterface(devicePath);
+ if(!deviceMap.value(techPath).contains(devicePath)) {
+ connect(dev,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(devicePropertyChangedContext(QString,QString,QDBusVariant)));
+ deviceMap.insert(techPath,QStringList() << devicePath);
+ foreach(const QString network,dev->getNetworks()) {
+ serviceNetworks.insert(getServiceForNetwork(network),network);
+ }
+ }
+ }
+ }
+
+ // Get current list of access points.
+ getConfigurations();
+}
+
+QList<QNetworkConfigurationPrivate *> QConnmanEngine::getConfigurations()
+{
+ QMutexLocker locker(&mutex);
+ // foundConfigurations.clear();
+ getNetworkListing();
+ QList<QNetworkConfigurationPrivate *> fetchedConfigurations;
+ QNetworkConfigurationPrivate* cpPriv = 0;
+
+ for (int i = 0; i < foundConfigurations.count(); ++i) {
+ QNetworkConfigurationPrivate *config = new QNetworkConfigurationPrivate;
+ cpPriv = foundConfigurations.at(i);
+
+ config->name = cpPriv->name;
+ config->isValid = cpPriv->isValid;
+ config->id = cpPriv->id;
+ config->state = cpPriv->state;
+ config->type = cpPriv->type;
+ config->roamingSupported = cpPriv->roamingSupported;
+ config->purpose = cpPriv->purpose;
+ config->bearer = cpPriv->bearer;
+
+ fetchedConfigurations.append(config);
+ }
+ return fetchedConfigurations;
+// return foundConfigurations;
+}
+
+void QConnmanEngine::getNetworkListing()
+{
+ QMutexLocker locker(&mutex);
+ QMapIterator<QString,QStringList> i(deviceMap);
+ while(i.hasNext()) {
+ i.next();
+ QConnmanDeviceInterface dev(i.value().at(0));
+ if(dev.isValid()) {
+ foreach(const QString network,dev.getNetworks()) {
+ addNetworkConfiguration(network);
+ }
+ }
+ }
+}
+
+
+
+void QConnmanEngine::doRequestUpdate()
+{
+ connmanManager->requestScan("");
+ getConfigurations();
+ emit updateCompleted();
+}
+
+QString QConnmanEngine::getInterfaceFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ return configInterfaces.value(id);
+}
+
+bool QConnmanEngine::hasIdentifier(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ return accessPointConfigurations.contains(id);
+}
+
+QString QConnmanEngine::bearerName(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ QConnmanServiceInterface serv(serviceFromId(id));
+ QString connectionType = serv.getType();
+
+ if (connectionType == "ethernet")
+ return QLatin1String("Ethernet");
+ else if (connectionType == "wifi")
+ return QLatin1String("WLAN");
+ else if (connectionType == "cellular") {
+ QString mode = serv.getMode();
+ if(mode == "gprs" || mode == "edge") {
+ return QLatin1String("2G");
+ } else if(mode == "umts") {
+ return QLatin1String("WCDMA");
+ }
+ }
+ else if (connectionType == "wimax")
+ return QLatin1String("WIMAX");
+
+ return QString();
+}
+
+void QConnmanEngine::connectToId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ QConnmanConnectThread *thread;
+ thread = new QConnmanConnectThread(this);
+ thread->setServicePath(serviceFromId(id));
+ thread->setIdentifier(id);
+ connect(thread,SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)),
+ this,SIGNAL(connectionError(QString,QBearerEngineImpl::ConnectionError)));
+ thread->start();
+}
+
+void QConnmanEngine::disconnectFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ QConnmanServiceInterface serv(serviceFromId(id));
+ if(!serv.isValid()) {
+ emit connectionError(id, DisconnectionError);
+ } else {
+ serv.disconnect();
+ }
+}
+
+void QConnmanEngine::requestUpdate()
+{
+ QMutexLocker locker(&mutex);
+ QTimer::singleShot(0, this, SLOT(doRequestUpdate()));
+}
+
+QString QConnmanEngine::serviceFromId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ foreach(const QString service, serviceNetworks.keys()) {
+ if (id == QString::number(qHash(service)))
+ return service;
+ }
+
+ return QString();
+}
+
+QNetworkSession::State QConnmanEngine::sessionStateForId(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ if (!ptr)
+ return QNetworkSession::Invalid;
+
+ if (!ptr->isValid) {
+ return QNetworkSession::Invalid;
+
+ }
+ QString service = serviceFromId(id);
+ QConnmanServiceInterface serv(service);
+ QString servState = serv.getState();
+
+ if(serv.isFavorite() && (servState == "idle" || servState == "failure")) {
+ return QNetworkSession::Disconnected;
+ }
+
+ if(servState == "association" || servState == "configuration" || servState == "login") {
+ return QNetworkSession::Connecting;
+ }
+ if(servState == "ready" || servState == "online") {
+ 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 QConnmanEngine::bytesWritten(const QString &id)
+{//TODO use connman counter API
+ QMutexLocker locker(&mutex);
+ quint64 result = 0;
+ QString devFile = getInterfaceFromId(id);
+ QFile tx("/sys/class/net/"+devFile+"/statistics/tx_bytes");
+ if(tx.exists() && tx.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ QTextStream in(&tx);
+ in >> result;
+ tx.close();
+ }
+
+ return result;
+}
+
+quint64 QConnmanEngine::bytesReceived(const QString &id)
+{//TODO use connman counter API
+ QMutexLocker locker(&mutex);
+ quint64 result = 0;
+ QString devFile = getInterfaceFromId(id);
+ QFile rx("/sys/class/net/"+devFile+"/statistics/rx_bytes");
+ if(rx.exists() && rx.open(QIODevice::ReadOnly | QIODevice::Text)) {
+ QTextStream in(&rx);
+ in >> result;
+ rx.close();
+ }
+ return result;
+}
+
+quint64 QConnmanEngine::startTime(const QString &/*id*/)
+{
+ // TODO
+ QMutexLocker locker(&mutex);
+ if (activeTime.isNull()) {
+ return 0;
+ }
+ return activeTime.secsTo(QDateTime::currentDateTime());
+}
+
+QNetworkConfigurationManager::Capabilities QConnmanEngine::capabilities() const
+{
+ return QNetworkConfigurationManager::ForcedRoaming |
+ QNetworkConfigurationManager::DataStatistics |
+ QNetworkConfigurationManager::CanStartAndStopInterfaces;
+}
+
+QNetworkSessionPrivate *QConnmanEngine::createSessionBackend()
+{
+ return new QNetworkSessionPrivateImpl;
+}
+
+QNetworkConfigurationPrivatePointer QConnmanEngine::defaultConfiguration()
+{
+ return QNetworkConfigurationPrivatePointer();
+}
+
+
+QString QConnmanEngine::getServiceForNetwork(const QString &netPath)
+{
+ QMutexLocker locker(&mutex);
+ QConnmanNetworkInterface network(netPath, this);
+ foreach(QString service,connmanManager->getServices()) {
+ QConnmanServiceInterface serv(service,this);
+ if(serv.getName() == network.getName()
+ && network.getSignalStrength() == serv.getSignalStrength()) {
+ return service;
+ }
+ }
+ return QString();
+}
+
+
+void QConnmanEngine::propertyChangedContext(const QString &path,const QString &item, const QDBusVariant &value)
+{
+ Q_UNUSED(path);
+// qDebug() << __FUNCTION__ << path << item << value.variant();
+
+ QMutexLocker locker(&mutex);
+ if(item == "Services") {
+ QDBusArgument arg = qvariant_cast<QDBusArgument>(value.variant());
+ QStringList list = qdbus_cast<QStringList>(arg);
+
+ if(list.count() > accessPointConfigurations.count()) {
+ foreach(const QString service, list) {
+ addServiceConfiguration(service);
+ }
+ }
+ }
+
+ if(item == "Technologies") {
+ QDBusArgument arg = qvariant_cast<QDBusArgument>(value.variant());
+ QStringList newlist = qdbus_cast<QStringList>(arg);
+ if(newlist.count() > 0) {
+ QMap<QString,QConnmanTechnologyInterface *> oldtech = technologies;
+
+ foreach(const QString listPath, newlist) {
+ if(!oldtech.contains(listPath)) {
+ QConnmanTechnologyInterface *tech;
+ tech = new QConnmanTechnologyInterface(listPath,this);
+ connect(tech,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(technologyPropertyChangedContext(QString,QString,QDBusVariant)));
+ technologies.insert(listPath, tech);
+ }
+ }
+
+ foreach(const QString old, oldtech.keys()) {
+ if(!newlist.contains(old)) {
+ QConnmanTechnologyInterface *tech = oldtech.value(old);
+ disconnect(tech,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(technologyPropertyChangedContext(QString,QString,QDBusVariant)));
+
+ technologies.remove(old);
+ getNetworkListing();
+ }
+ }
+ }
+ }
+ if(item == "State") {
+// qDebug() << value.variant();
+ }
+}
+
+void QConnmanEngine::servicePropertyChangedContext(const QString &path,const QString &item, const QDBusVariant &value)
+{
+ QMutexLocker locker(&mutex);
+ if(item == "State") {
+ configurationChange(QString::number(qHash(path)));
+
+ if(value.variant().toString() == "failure") {
+ QConnmanServiceInterface serv(path);
+ emit connectionError(QString::number(qHash(path)), ConnectError);
+ }
+ }
+}
+
+void QConnmanEngine::networkPropertyChangedContext(const QString &/*path*/,const QString &/*item*/, const QDBusVariant &/*value*/)
+{
+ QMutexLocker locker(&mutex);
+}
+
+void QConnmanEngine::devicePropertyChangedContext(const QString &devpath,const QString &item,const QDBusVariant &value)
+{
+ QMutexLocker locker(&mutex);
+ if(item == "Networks") {
+ QDBusArgument arg = qvariant_cast<QDBusArgument>(value.variant());
+ QStringList remainingNetworks = qdbus_cast<QStringList>(arg);
+ QString devicetype;
+ QMapIterator<QString,QStringList> i(deviceMap);
+ while(i.hasNext()) {
+ i.next();
+ if(i.value().contains(devpath)) {
+ devicetype = i.key().section("/",-1);
+ }
+ }
+
+ QStringList oldnetworks = knownNetworks[devicetype];
+
+ if(remainingNetworks.count() > oldnetworks.count()) {
+ foreach(const QString netPath, remainingNetworks) {
+ if(!oldnetworks.contains(netPath)) {
+ addNetworkConfiguration(netPath);
+ }
+ }
+ } else {
+ foreach(const QString netPath, oldnetworks) {
+ QString servicePath = serviceNetworks.key(netPath);
+ if(!remainingNetworks.contains(netPath)) {
+ if(servicePath.isEmpty()) {
+ removeConfiguration(QString::number(qHash(netPath)));
+ } else {
+ removeConfiguration(QString::number(qHash(servicePath)));
+ }
+ knownNetworks[devicetype].removeAll(netPath);
+ }
+ }
+ }
+ }
+}
+
+void QConnmanEngine::technologyPropertyChangedContext(const QString & path, const QString &item, const QDBusVariant &value)
+{
+ if(item == "Devices") {
+ QDBusArgument arg = qvariant_cast<QDBusArgument>(value.variant());
+ QStringList list = qdbus_cast<QStringList>(arg);
+ }
+ if(item == "State") {
+
+ if(value.variant().toString() == "available") {
+ QConnmanTechnologyInterface tech(connmanManager->getPathForTechnology(path));
+ foreach(const QString devPath, tech.getDevices()) {
+
+ if(!deviceMap.value(path).contains(devPath)) {
+ QConnmanDeviceInterface *dev;
+ dev = new QConnmanDeviceInterface(devPath,this);
+ connect(dev,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(devicePropertyChangedContext(QString,QString,QDBusVariant)));
+ deviceMap.insert(path,QStringList() << devPath);
+ }
+ }
+ }
+ if(value.variant().toString() == "offline") {
+ deviceMap.remove(path);
+ }
+ }
+}
+
+void QConnmanEngine::configurationChange(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ if (accessPointConfigurations.contains(id)) {
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(id);
+
+ QString servicePath = serviceFromId(id);
+ QConnmanServiceInterface *serv;
+ serv = new QConnmanServiceInterface(servicePath);
+ QString networkName = serv->getName();
+
+ QNetworkConfiguration::StateFlags curState = getStateForService(servicePath);
+
+ ptr->mutex.lock();
+
+ if (!ptr->isValid) {
+ ptr->isValid = true;
+ }
+
+ if (ptr->name != networkName) {
+ ptr->name = networkName;
+ }
+
+ if (ptr->state != curState) {
+ ptr->state = curState;
+ }
+
+ ptr->mutex.unlock();
+
+ locker.unlock();
+ emit configurationChanged(ptr);
+ locker.relock();
+
+ }
+ locker.unlock();
+ emit updateCompleted();
+}
+
+QNetworkConfiguration::StateFlags QConnmanEngine::getStateForService(const QString &service)
+{
+ QMutexLocker locker(&mutex);
+ QConnmanServiceInterface serv(service);
+ QNetworkConfiguration::StateFlags flag = QNetworkConfiguration::Defined;
+ if(serv.isFavorite()) {
+ flag = ( flag | QNetworkConfiguration::Discovered);
+ } else {
+ flag = QNetworkConfiguration::Undefined;
+ }
+
+ if(serv.getState() == "ready" || serv.getState() == "online") {
+ flag = ( flag | QNetworkConfiguration::Active);
+ }
+
+ return flag;
+}
+
+QString QConnmanEngine::typeToBearer(const QString &type)
+{
+ QMutexLocker locker(&mutex);
+ if(type == "wifi")
+ return "WLAN";
+ if(type == "ethernet")
+ return "Ethernet";
+ if(type == "bluetooth")
+ return "Bluetooth";
+ if(type == "cellular") {
+ return "Cellular";
+ // not handled: CDMA2000 HSPA
+ }
+ if(type == "wimax")
+ return "WiMax";
+// if(type == "gps")
+// if(type == "vpn")
+
+ return "Unknown";
+}
+
+void QConnmanEngine::removeConfiguration(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+
+ if (accessPointConfigurations.contains(id)) {
+
+ QString service = serviceFromId(id);
+ QConnmanServiceInterface serv(service);
+
+ disconnect(&serv,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(servicePropertyChangedContext(QString,QString, QDBusVariant)));
+
+ QString netPath = serviceNetworks.value(service);
+ serviceNetworks.remove(service);
+
+ QConnmanServiceInterface network(netPath);
+ disconnect(&network,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(networkPropertyChangedContext(QString,QString, QDBusVariant)));
+
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(id);
+ locker.unlock();
+ emit configurationRemoved(ptr);
+ locker.relock();
+ }
+}
+
+void QConnmanEngine::addServiceConfiguration(const QString &servicePath)
+{
+
+ QMutexLocker locker(&mutex);
+ QConnmanServiceInterface *serv;
+ serv = new QConnmanServiceInterface(servicePath);
+ const QString netPath = serviceNetworks.value(servicePath);
+
+ QConnmanNetworkInterface *network;
+ network = new QConnmanNetworkInterface(netPath, this);
+
+
+ const QString id = QString::number(qHash(servicePath));
+
+ if (!accessPointConfigurations.contains(id)) {
+ QConnmanDeviceInterface device(netPath.section("/",0,5),this);
+
+ serviceNetworks.insert(servicePath,netPath);
+
+ knownNetworks[device.getType()].append(netPath);
+
+ connect(serv,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(servicePropertyChangedContext(QString,QString, QDBusVariant)));
+ QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
+
+ QString networkName = serv->getName();
+
+ if(serv->getType() == "Cellular") {
+ networkName = serv->getAPN();
+ }
+
+ cpPriv->name = networkName;
+ cpPriv->isValid = true;
+ cpPriv->id = id;
+ cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
+ cpPriv->bearer = bearerName(id);
+
+ if(serv->getSecurity() == "none") {
+ cpPriv->purpose = QNetworkConfiguration::PublicPurpose;
+ } else {
+ cpPriv->purpose = QNetworkConfiguration::PrivatePurpose;
+ }
+
+ connect(network,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(networkPropertyChangedContext(QString,QString, QDBusVariant)));
+
+ cpPriv->state = getStateForService(servicePath);
+
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ accessPointConfigurations.insert(ptr->id, ptr);
+ foundConfigurations.append(cpPriv);
+ configInterfaces[cpPriv->id] = device.getInterface();
+
+
+ locker.unlock();
+ emit configurationAdded(ptr);
+ locker.relock();
+ emit updateCompleted();
+ }
+}
+
+void QConnmanEngine::addNetworkConfiguration(const QString &networkPath)
+{
+ QMutexLocker locker(&mutex);
+
+ QConnmanNetworkInterface *network;
+ network = new QConnmanNetworkInterface(networkPath, this);
+ QString servicePath = getServiceForNetwork(networkPath);
+ QConnmanServiceInterface *serv;
+
+ QString id;
+ QConnmanDeviceInterface device(networkPath.section("/",0,5),this);
+
+ if(servicePath.isEmpty()) {
+ id = QString::number(qHash(networkPath));
+ } else {
+ id = QString::number(qHash(servicePath));
+ serv = new QConnmanServiceInterface(servicePath,this);
+ connect(serv,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(servicePropertyChangedContext(QString,QString, QDBusVariant)));
+ }
+
+ if (!accessPointConfigurations.contains(id)) {
+
+ knownNetworks[device.getType()].append(networkPath);
+
+ serviceNetworks.insert(servicePath,networkPath);
+
+ connect(network,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)),
+ this,SLOT(networkPropertyChangedContext(QString,QString, QDBusVariant)));
+
+ QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate();
+
+ QString networkName = network->getName();
+
+ if(networkName.isEmpty())
+ networkName = "Hidden Network";
+
+ QString bearerName;
+
+ if(servicePath.isEmpty()) {
+ QString devicePath = networkPath.section("/",0,5);
+ QConnmanDeviceInterface device(devicePath,this);
+ bearerName = typeToBearer(device.getType());
+ } else {
+ bearerName = typeToBearer(serv->getType());
+ }
+
+ if(bearerName == "Cellular") {
+ QString mode = serv->getMode();
+ if(mode == "gprs" || mode == "edge") {
+ bearerName = "2G";
+ } else if(mode == "umts") {
+ bearerName = "WCDMA";
+ }
+ networkName = serv->getAPN();
+ }
+
+ cpPriv->name = networkName;
+ cpPriv->isValid = true;
+ cpPriv->id = id;
+ cpPriv->type = QNetworkConfiguration::InternetAccessPoint;
+ cpPriv->bearer = bearerName;
+
+ if(network->getWifiSecurity() == "none") {
+ cpPriv->purpose = QNetworkConfiguration::PublicPurpose;
+ } else {
+ cpPriv->purpose = QNetworkConfiguration::PrivatePurpose;
+ }
+
+ if(servicePath.isEmpty())
+ cpPriv->state = QNetworkConfiguration::Undefined;
+ else
+ cpPriv->state = getStateForService(servicePath);
+
+ QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ accessPointConfigurations.insert(ptr->id, ptr);
+ foundConfigurations.append(cpPriv);
+ configInterfaces[cpPriv->id] = device.getInterface();
+
+ locker.unlock();
+ emit configurationAdded(ptr);
+ locker.relock();
+ emit updateCompleted();
+ }
+}
+
+bool QConnmanEngine::requiresPolling() const
+{
+ return false;
+}
+
+
+QConnmanConnectThread::QConnmanConnectThread(QObject *parent)
+ :QThread(parent),
+ servicePath(), identifier()
+{
+}
+
+QConnmanConnectThread::~QConnmanConnectThread()
+{
+}
+
+void QConnmanConnectThread::stop()
+{
+ if(currentThread() != this) {
+ QMetaObject::invokeMethod(this, "quit",
+ Qt::QueuedConnection);
+ } else {
+ quit();
+ }
+ wait();
+}
+
+void QConnmanConnectThread::run()
+{
+ QConnmanServiceInterface serv(servicePath);
+ if(!serv.isValid()) {
+ emit connectionError(identifier, QBearerEngineImpl::InterfaceLookupError);
+ } else {
+ serv.connect();
+ }
+}
+
+void QConnmanConnectThread::setServicePath(const QString &path)
+{
+ QMutexLocker locker(&mutex);
+ servicePath = path;
+}
+
+void QConnmanConnectThread::setIdentifier(const QString &id)
+{
+ QMutexLocker locker(&mutex);
+ identifier = id;
+}
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
+#endif // QT_NO_BEARERMANAGEMENT
diff --git a/src/plugins/bearer/connman/qconnmanengine.h b/src/plugins/bearer/connman/qconnmanengine.h
new file mode 100644
index 0000000000..0f6dc1c715
--- /dev/null
+++ b/src/plugins/bearer/connman/qconnmanengine.h
@@ -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 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 QCONNMANENGINE_P_H
+#define QCONNMANENGINE_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 "qconnmanservice_linux_p.h"
+
+#include <QMap>
+#include <QVariant>
+#include <QtCore/qthread.h>
+
+#ifndef QT_NO_BEARERMANAGEMENT
+#ifndef QT_NO_DBUS
+
+QT_BEGIN_NAMESPACE
+
+class QConnmanConnectThread;
+class QConnmanEngine : public QBearerEngineImpl
+{
+ Q_OBJECT
+
+public:
+ QConnmanEngine(QObject *parent = 0);
+ ~QConnmanEngine();
+
+ bool connmanAvailable() const;
+
+ virtual QString getInterfaceFromId(const QString &id);
+ bool hasIdentifier(const QString &id);
+
+ virtual QString bearerName(const QString &id);
+
+ virtual void connectToId(const QString &id);
+ virtual void disconnectFromId(const QString &id);
+
+ Q_INVOKABLE void initialize();
+ Q_INVOKABLE void requestUpdate();
+
+ QNetworkSession::State sessionStateForId(const QString &id);
+ QNetworkSessionPrivate *createSessionBackend();
+
+ virtual quint64 bytesWritten(const QString &id);
+ virtual quint64 bytesReceived(const QString &id);
+ virtual quint64 startTime(const QString &id);
+
+
+ virtual QNetworkConfigurationManager::Capabilities capabilities() const;
+ virtual QNetworkConfigurationPrivatePointer defaultConfiguration();
+
+ void configurationChange(const QString &id);
+ QList<QNetworkConfigurationPrivate *> getConfigurations();
+
+
+private Q_SLOTS:
+
+ void doRequestUpdate();
+ void servicePropertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+ void networkPropertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+ void devicePropertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+ void technologyPropertyChangedContext(const QString &,const QString &, const QDBusVariant &);
+
+private:
+ QConnmanManagerInterface *connmanManager;
+
+ QList<QNetworkConfigurationPrivate *> foundConfigurations;
+
+ void getNetworkListing();
+
+ QString getServiceForNetwork(const QString &network);
+
+ QString serviceFromId(const QString &id);
+ QString networkFromId(const QString &id);
+
+ QNetworkConfiguration::StateFlags getStateForService(const QString &service);
+ QString typeToBearer(const QString &type);
+
+ void removeConfiguration(const QString &servicePath);
+ void addServiceConfiguration(const QString &servicePath);
+ void addNetworkConfiguration(const QString &worknetPath);
+ QDateTime activeTime;
+
+
+ QMap<QString,QConnmanTechnologyInterface *> technologies; // techpath, tech interface
+ QMap<QString,QString> configInterfaces; // id, interface name
+ QMap<QString,QStringList> knownNetworks; //device path, net paths list
+ QMap<QString,QStringList> deviceMap; //tech path, device path
+ QMap<QString, QString> serviceNetworks; //service, network
+
+
+protected:
+ bool requiresPolling() const;
+ QConnmanConnectThread *connThread;
+};
+
+class QConnmanConnectThread : public QThread
+{
+ Q_OBJECT
+
+public:
+ QConnmanConnectThread(QObject *parent = 0);
+ ~QConnmanConnectThread();
+ bool keepRunning;
+ void stop();
+ void setServicePath(const QString &path);
+ void setIdentifier(const QString &id);
+
+Q_SIGNALS:
+ void connectionError(const QString &id, QBearerEngineImpl::ConnectionError error);
+
+protected:
+ void run();
+ QString servicePath;
+ QString identifier;
+
+private:
+ QMutex mutex;
+
+};
+
+QT_END_NAMESPACE
+
+#endif // QT_NO_DBUS
+#endif // QT_NO_BEARERMANAGEMENT
+
+#endif
+
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
new file mode 100644
index 0000000000..b20e7c1335
--- /dev/null
+++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp
@@ -0,0 +1,1072 @@
+/****************************************************************************
+**
+** Copyright (C) 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 "qconnmanservice_linux_p.h"
+
+
+QT_BEGIN_NAMESPACE
+static QDBusConnection dbusConnection = QDBusConnection::systemBus();
+
+
+QConnmanManagerInterface::QConnmanManagerInterface( QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ QLatin1String(CONNMAN_MANAGER_PATH),
+ CONNMAN_MANAGER_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanManagerInterface::~QConnmanManagerInterface()
+{
+}
+
+void QConnmanManagerInterface::connectNotify(const char *signal)
+{
+if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+ if(!connection().connect(QLatin1String(CONNMAN_SERVICE),
+ QLatin1String(CONNMAN_MANAGER_PATH),
+ QLatin1String(CONNMAN_MANAGER_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ this,SIGNAL(propertyChanged(const QString &, const QDBusVariant & )))) {
+ qWarning() << "PropertyCHanged not connected";
+ }
+ }
+
+ if (QLatin1String(signal) == SIGNAL(stateChanged(QString))) {
+ if (!connection().connect(QLatin1String(CONNMAN_SERVICE),
+ QLatin1String(CONNMAN_MANAGER_PATH),
+ QLatin1String(CONNMAN_MANAGER_INTERFACE),
+ QLatin1String("StateChanged"),
+ this,SIGNAL(stateChanged(const QString&)))) {
+ qWarning() << "StateChanged not connected";
+
+ }
+ }
+ if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
+ QConnmanDBusHelper *helper;
+ helper = new QConnmanDBusHelper(this);
+
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ QLatin1String(CONNMAN_MANAGER_PATH),
+ QLatin1String(CONNMAN_MANAGER_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ helper,SLOT(propertyChanged(QString,QDBusVariant)));
+
+
+ QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
+ this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)));
+ }
+}
+
+void QConnmanManagerInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) {
+
+ }
+}
+
+QVariant QConnmanManagerInterface::getProperty(const QString &property)
+{
+ QVariant var;
+ QVariantMap map = getProperties();
+ if (map.contains(property)) {
+ var = map.value(property);
+ } else {
+ qDebug() << "does not contain" << property;
+ }
+ return var;
+}
+
+QVariantMap QConnmanManagerInterface::getProperties()
+{
+ QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
+ return reply.value();
+}
+
+QString QConnmanManagerInterface::getState()
+{
+ QDBusReply<QString > reply = this->call("GetState");
+ return reply.value();
+}
+
+bool QConnmanManagerInterface::setProperty(const QString &name, const QDBusVariant &value)
+{
+ Q_UNUSED(name);
+ Q_UNUSED(value);
+ return false;
+}
+
+QDBusObjectPath QConnmanManagerInterface::createProfile(const QString &/*name*/)
+{
+ return QDBusObjectPath();
+}
+
+bool QConnmanManagerInterface::removeProfile(QDBusObjectPath /*path*/)
+{
+ return false;
+}
+
+bool QConnmanManagerInterface::requestScan(const QString &type)
+{
+ QDBusReply<QString> reply = this->call(QLatin1String("RequestScan"), QVariant::fromValue(type));
+
+ bool ok = true;
+ if(reply.error().type() == QDBusError::InvalidArgs) {
+ qWarning() << reply.error().message();
+ ok = false;
+ }
+ return ok;
+}
+
+bool QConnmanManagerInterface::enableTechnology(const QString &type)
+{
+ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("EnableTechnology"), QVariant::fromValue(type));
+ bool ok = true;
+ if(reply.error().type() == QDBusError::InvalidArgs) {
+ qWarning() << reply.error().message();
+ ok = false;
+ }
+ return ok;
+}
+
+bool QConnmanManagerInterface::disableTechnology(const QString &type)
+{
+ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("DisableTechnology"), QVariant::fromValue(type));
+ bool ok = true;
+ if(reply.error().type() == QDBusError::InvalidArgs) {
+ qWarning() << reply.error().message();
+ ok = false;
+ }
+ return ok;
+}
+
+QDBusObjectPath QConnmanManagerInterface::connectService(QVariantMap &map)
+{
+ QDBusReply<QDBusObjectPath > reply = this->call(QLatin1String("ConnectService"), QVariant::fromValue(map));
+ if(!reply.isValid()) {
+ qDebug() << reply.error().message();
+
+ }
+ return reply;
+}
+
+void QConnmanManagerInterface::registerAgent(QDBusObjectPath &/*path*/)
+{
+}
+
+void QConnmanManagerInterface::unregisterAgent(QDBusObjectPath /*path*/)
+{
+}
+
+void QConnmanManagerInterface::registerCounter(const QString &path, quint32 interval)
+{ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("RegisterCounter"),
+ QVariant::fromValue(path),
+ QVariant::fromValue(interval));
+ bool ok = true;
+ if(reply.error().type() == QDBusError::InvalidArgs) {
+ qWarning() << reply.error().message();
+ }
+}
+
+void QConnmanManagerInterface::unregisterCounter(const QString &path)
+{ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("UnregisterCounter"),
+ QVariant::fromValue(path));
+ bool ok = true;
+ if(reply.error().type() == QDBusError::InvalidArgs) {
+ qWarning() << reply.error().message();
+ }
+}
+
+QString QConnmanManagerInterface::requestSession(const QString &bearerName)
+{
+ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("RequestSession"),
+ QVariant::fromValue(bearerName));
+ return QString();
+}
+
+void QConnmanManagerInterface::releaseSession()
+{
+ QDBusReply<QList<QDBusObjectPath> > reply = this->call(QLatin1String("ReleaseSession"));
+}
+
+
+QDBusObjectPath QConnmanManagerInterface::lookupService(const QString &service)
+{
+ QDBusReply<QDBusObjectPath > reply = this->call(QLatin1String("LookupService"), QVariant::fromValue(service));
+ if(!reply.isValid()) {
+ qDebug() << reply.error().message();
+ }
+ return reply;
+}
+
+// properties
+
+QStringList QConnmanManagerInterface::getAvailableTechnologies()
+{
+ QVariant var = getProperty("AvailableTechnologies");
+ return qdbus_cast<QStringList>(var);
+}
+
+QStringList QConnmanManagerInterface::getEnabledTechnologies()
+{
+ QVariant var = getProperty("EnabledTechnologies");
+ return qdbus_cast<QStringList>(var);
+}
+
+QStringList QConnmanManagerInterface::getConnectedTechnologies()
+{
+ QVariant var = getProperty("ConnectedTechnologies");
+ return qdbus_cast<QStringList>(var);
+}
+
+QString QConnmanManagerInterface::getDefaultTechnology()
+{
+ QVariant var = getProperty("DefaultTechnology");
+ return qdbus_cast<QString>(var);
+}
+
+bool QConnmanManagerInterface::getOfflineMode()
+{
+ QVariant var = getProperty("OfflineMode");
+ return qdbus_cast<bool>(var);
+}
+
+QString QConnmanManagerInterface::getActiveProfile()
+{
+ QVariant var = getProperty("ActiveProfile");
+ return qdbus_cast<QString>(var);
+}
+
+QStringList QConnmanManagerInterface::getProfiles()
+{
+ QVariant var = getProperty("Profiles");
+ return qdbus_cast<QStringList>(var);
+}
+
+QStringList QConnmanManagerInterface::getTechnologies()
+{
+ QVariant var = getProperty("Technologies");
+ return qdbus_cast<QStringList >(var);
+}
+
+QStringList QConnmanManagerInterface::getServices()
+{
+ QVariant var = getProperty("Services");
+ return qdbus_cast<QStringList >(var);
+}
+
+QString QConnmanManagerInterface::getPathForTechnology(const QString &name)
+{
+ foreach(const QString path, getTechnologies()) {
+ if(path.contains(name)) {
+ return path;
+ }
+ }
+ return "";
+}
+
+QConnmanNetworkInterface::QConnmanNetworkInterface(const QString &dbusPathName, QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_NETWORK_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanNetworkInterface::~QConnmanNetworkInterface()
+{
+}
+
+void QConnmanNetworkInterface::connectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+ if(!connection().connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_NETWORK_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ this,SIGNAL(propertyChanged(QString,QDBusVariant))) ) {
+ qWarning() << "network properties not connected";
+ }
+ }
+ if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
+ QConnmanDBusHelper *helper;
+ helper = new QConnmanDBusHelper(this);
+
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_NETWORK_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ helper,SLOT(propertyChanged(QString,QDBusVariant)));
+
+ QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
+ this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)));
+ }
+}
+
+void QConnmanNetworkInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+
+ }
+}
+
+QVariantMap QConnmanNetworkInterface::getProperties()
+{
+ QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
+ return reply.value();
+}
+
+QVariant QConnmanNetworkInterface::getProperty(const QString &property)
+{
+ QVariant var;
+ QVariantMap map = getProperties();
+ if (map.contains(property)) {
+ var = map.value(property);
+ }
+ return var;
+}
+
+//properties
+
+QString QConnmanNetworkInterface::getAddress()
+{
+ QVariant var = getProperty("Address");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanNetworkInterface::getName()
+{
+ QVariant var = getProperty("Name");
+ return qdbus_cast<QString>(var);
+}
+
+bool QConnmanNetworkInterface::isConnected()
+{
+ QVariant var = getProperty("Connected");
+ return qdbus_cast<bool>(var);
+}
+
+quint8 QConnmanNetworkInterface::getSignalStrength()
+{
+ QVariant var = getProperty("Strength");
+ return qdbus_cast<quint8>(var);
+}
+
+QString QConnmanNetworkInterface::getDevice()
+{
+ QVariant var = getProperty("Device");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanNetworkInterface::getWifiSsid()
+{
+ QVariant var = getProperty("WiFi.SSID");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanNetworkInterface::getWifiMode()
+{
+ QVariant var = getProperty("WiFi.Mode");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanNetworkInterface::getWifiSecurity()
+{
+ QVariant var = getProperty("WiFi.Security");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanNetworkInterface::getWifiPassphrase()
+{
+ QVariant var = getProperty("WiFi.Passphrase");
+ return qdbus_cast<QString>(var);
+}
+
+
+//////////////////////////
+
+QConnmanProfileInterface::QConnmanProfileInterface(const QString &dbusPathName,QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_PROFILE_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanProfileInterface::~QConnmanProfileInterface()
+{
+}
+
+void QConnmanProfileInterface::connectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_PROFILE_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ this,SIGNAL(propertyChanged(QString,QDBusVariant)));
+ }
+}
+
+void QConnmanProfileInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString, QVariant))) {
+
+ }
+}
+
+QVariantMap QConnmanProfileInterface::getProperties()
+{
+ QDBusReply<QVariantMap > reply = this->call(QLatin1String("GetProperties"));
+ return reply.value();
+}
+
+QVariant QConnmanProfileInterface::getProperty(const QString &property)
+{
+ QVariant var;
+ QVariantMap map = getProperties();
+ if (map.contains(property)) {
+ var = map.value(property);
+ } else {
+ qDebug() <<__FUNCTION__<< "Could not find" << property;
+ }
+ return var;
+}
+
+// properties
+QString QConnmanProfileInterface::getName()
+{
+
+ QVariant var = getProperty("Name");
+ return qdbus_cast<QString>(var);
+}
+
+bool QConnmanProfileInterface::isOfflineMode()
+{
+ QVariant var = getProperty("OfflineMode");
+ return qdbus_cast<bool>(var);
+}
+
+QStringList QConnmanProfileInterface::getServices()
+{
+ QVariant var = getProperty("Services");
+ return qdbus_cast<QStringList>(var);
+}
+
+///////////////////////////
+QConnmanServiceInterface::QConnmanServiceInterface(const QString &dbusPathName,QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_SERVICE_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanServiceInterface::~QConnmanServiceInterface()
+{
+}
+
+void QConnmanServiceInterface::connectNotify(const char *signal)
+{
+// qWarning() << __FUNCTION__ << signal << this->path();
+
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_SERVICE_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ this,SIGNAL(propertyChanged(QString,QDBusVariant)));
+ }
+ if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
+ QConnmanDBusHelper *helper;
+ helper = new QConnmanDBusHelper(this);
+
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_SERVICE_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ helper,SLOT(propertyChanged(QString,QDBusVariant)));
+
+ QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
+ this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)));
+ }
+}
+
+void QConnmanServiceInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) {
+
+ }
+}
+
+QVariantMap QConnmanServiceInterface::getProperties()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("GetProperties"));
+ return reply.value();
+}
+
+QVariant QConnmanServiceInterface::getProperty(const QString &property)
+{
+ QVariant var;
+ QVariantMap map = getProperties();
+ if (map.contains(property)) {
+ var = map.value(property);
+ } else {
+// qDebug() <<__FUNCTION__<< "Could not find" << property;
+ }
+ return var;
+}
+
+// clearProperty
+void QConnmanServiceInterface::connect()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("Connect"));
+}
+
+void QConnmanServiceInterface::disconnect()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("Disconnect"));
+}
+
+void QConnmanServiceInterface::remove()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("Remove"));
+}
+
+// void moveBefore(QDBusObjectPath &service);
+// void moveAfter(QDBusObjectPath &service);
+
+// properties
+QString QConnmanServiceInterface::getState()
+{
+ QVariant var = getProperty("State");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getError()
+{
+ QVariant var = getProperty("Error");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getName()
+{
+ QVariant var = getProperty("Name");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getType()
+{
+ QVariant var = getProperty("Type");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getMode()
+{
+ QVariant var = getProperty("Mode");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getSecurity()
+{
+ QVariant var = getProperty("Security");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getPassphrase()
+{
+ QVariant var = getProperty("Passphrase");
+ return qdbus_cast<QString>(var);
+}
+
+bool QConnmanServiceInterface::isPassphraseRequired()
+{
+ QVariant var = getProperty("PassphraseRequired");
+ return qdbus_cast<bool>(var);
+}
+
+quint8 QConnmanServiceInterface::getSignalStrength()
+{
+ QVariant var = getProperty("Strength");
+ return qdbus_cast<quint8>(var);
+}
+
+bool QConnmanServiceInterface::isFavorite()
+{
+ QVariant var = getProperty("Favorite");
+ return qdbus_cast<bool>(var);
+}
+
+bool QConnmanServiceInterface::isImmutable()
+{
+ QVariant var = getProperty("Immutable");
+ return qdbus_cast<bool>(var);
+}
+
+bool QConnmanServiceInterface::isAutoConnect()
+{
+ QVariant var = getProperty("AutoConnect");
+ return qdbus_cast<bool>(var);
+}
+
+bool QConnmanServiceInterface::isSetupRequired()
+{
+ QVariant var = getProperty("SetupRequired");
+ return qdbus_cast<bool>(var);
+}
+
+QString QConnmanServiceInterface::getAPN()
+{
+ QVariant var = getProperty("APN");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getMCC()
+{
+ QVariant var = getProperty("MCC");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanServiceInterface::getMNC()
+{
+ QVariant var = getProperty("MNC");
+ return qdbus_cast<QString>(var);
+}
+
+bool QConnmanServiceInterface::isRoaming()
+{
+ QVariant var = getProperty("Roaming");
+ return qdbus_cast<bool>(var);
+}
+
+QStringList QConnmanServiceInterface::getNameservers()
+{
+ QVariant var = getProperty("NameServers");
+ return qdbus_cast<QStringList>(var);
+}
+
+QStringList QConnmanServiceInterface::getDomains()
+{
+ QVariant var = getProperty("Domains");
+ return qdbus_cast<QStringList>(var);
+}
+
+QVariantMap QConnmanServiceInterface::getIPv4()
+{
+ QVariant var = getProperty("IPv4");
+ return qdbus_cast<QVariantMap >(var);
+}
+
+QVariantMap QConnmanServiceInterface::getIPv4Configuration()
+{
+ QVariant var = getProperty("IPv4.Configuration");
+ return qdbus_cast<QVariantMap >(var);
+}
+
+QVariantMap QConnmanServiceInterface::getProxy()
+{
+ QVariant var = getProperty("Proxy");
+ return qdbus_cast<QVariantMap >(var);
+}
+
+QVariantMap QConnmanServiceInterface::getEthernet()
+{
+ QVariant var = getProperty("Ethernet");
+ return qdbus_cast<QVariantMap >(var);
+}
+
+bool QConnmanServiceInterface::isOfflineMode()
+{
+ QVariant var = getProperty("OfflineMode");
+ return qdbus_cast<bool>(var);
+}
+
+QStringList QConnmanServiceInterface::getServices()
+{
+ QVariant var = getProperty("Services");
+ return qdbus_cast<QStringList>(var);
+}
+
+
+//////////////////////////
+QConnmanTechnologyInterface::QConnmanTechnologyInterface(const QString &dbusPathName,QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_TECHNOLOGY_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanTechnologyInterface::~QConnmanTechnologyInterface()
+{
+}
+
+void QConnmanTechnologyInterface::connectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_TECHNOLOGY_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ this,SIGNAL(propertyChanged(QString,QDBusVariant)));
+ }
+ if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
+ QConnmanDBusHelper *helper;
+ helper = new QConnmanDBusHelper(this);
+
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_TECHNOLOGY_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ helper,SLOT(propertyChanged(QString,QDBusVariant)));
+
+ QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
+ this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)));
+ }
+}
+
+void QConnmanTechnologyInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) {
+
+ }
+}
+
+QVariantMap QConnmanTechnologyInterface::getProperties()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("GetProperties"));
+ return reply.value();
+}
+
+QVariant QConnmanTechnologyInterface::getProperty(const QString &property)
+{
+ QVariant var;
+ QVariantMap map = getProperties();
+ if (map.contains(property)) {
+ var = map.value(property);
+ }
+ return var;
+}
+
+// properties
+QString QConnmanTechnologyInterface::getState()
+{
+ QVariant var = getProperty("State");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanTechnologyInterface::getName()
+{
+ QVariant var = getProperty("Name");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanTechnologyInterface::getType()
+{
+ QVariant var = getProperty("Type");
+ return qdbus_cast<QString>(var);
+}
+
+
+QStringList QConnmanTechnologyInterface::getDevices()
+{
+ QVariant var = getProperty("Devices");
+ return qdbus_cast<QStringList>(var);
+}
+
+
+//////////////////////////////////
+QConnmanAgentInterface::QConnmanAgentInterface(const QString &dbusPathName, QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_AGENT_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanAgentInterface::~QConnmanAgentInterface()
+{
+}
+
+void QConnmanAgentInterface::connectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+// dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+// this->path(),
+// QLatin1String(CONNMAN_NETWORK_INTERFACE),
+// QLatin1String("PropertyChanged"),
+// this,SIGNAL(propertyChanged(const QString &, QVariant &)));
+ }
+}
+
+void QConnmanAgentInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString, QDBusVariant))) {
+
+ }
+}
+
+
+void QConnmanAgentInterface::release()
+{
+}
+
+void QConnmanAgentInterface::reportError(QDBusObjectPath &/*path*/, const QString &/*error*/)
+{
+}
+
+//dict QConnmanAgentInterface::requestInput(QDBusObjectPath &path, dict fields)
+//{
+//}
+
+void QConnmanAgentInterface::cancel()
+{
+}
+
+
+/////////////////////////////////////////
+QConnmanCounterInterface::QConnmanCounterInterface(const QString &dbusPathName,QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_COUNTER_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanCounterInterface::~QConnmanCounterInterface()
+{
+}
+
+quint32 QConnmanCounterInterface::getReceivedByteCount()
+{
+return 0;
+}
+
+quint32 QConnmanCounterInterface::getTransmittedByteCount()
+{
+return 0;
+}
+
+/////////////////////////////////////////
+QConnmanDeviceInterface::QConnmanDeviceInterface(const QString &dbusPathName,QObject *parent)
+ : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE),
+ dbusPathName,
+ CONNMAN_DEVICE_INTERFACE,
+ QDBusConnection::systemBus(), parent)
+{
+}
+
+QConnmanDeviceInterface::~QConnmanDeviceInterface()
+{
+}
+
+void QConnmanDeviceInterface::connectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) {
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_DEVICE_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ this,SIGNAL(propertyChanged(QString,QDBusVariant)));
+
+ }
+ if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) {
+ QConnmanDBusHelper *helper;
+ helper = new QConnmanDBusHelper(this);
+
+ dbusConnection.connect(QLatin1String(CONNMAN_SERVICE),
+ this->path(),
+ QLatin1String(CONNMAN_DEVICE_INTERFACE),
+ QLatin1String("PropertyChanged"),
+ helper,SLOT(propertyChanged(QString,QDBusVariant)));
+
+ QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)),
+ this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)));
+ }
+}
+
+void QConnmanDeviceInterface::disconnectNotify(const char *signal)
+{
+ if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) {
+
+ }
+}
+
+QVariantMap QConnmanDeviceInterface::getProperties()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("GetProperties"));
+ return reply.value();
+}
+
+bool QConnmanDeviceInterface::setProperty(const QString &name, const QDBusVariant &value)
+{
+
+// QList<QVariant> args;
+ qWarning() << __FUNCTION__ << name << value.variant();
+// args << qVariantFromValue(name);
+// args << qVariantFromValue(value);
+
+ QDBusMessage reply = this->call(QLatin1String("SetProperty"),name, qVariantFromValue(value));
+qWarning() << reply.errorMessage();
+
+ return true;
+}
+
+void QConnmanDeviceInterface::scan()
+{
+ QDBusReply<QVariantMap> reply = this->call(QLatin1String("ProposeScan"));
+ if(!reply.isValid()) {
+ qDebug() << reply.error().message();
+ }
+}
+
+QVariant QConnmanDeviceInterface::getProperty(const QString &property)
+{
+ QVariant var;
+ QVariantMap map = getProperties();
+ if (map.contains(property)) {
+ var = map.value(property);
+ }
+ return var;
+}
+
+//properties
+QString QConnmanDeviceInterface::getAddress()
+{
+ QVariant var = getProperty("Address");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanDeviceInterface::getName()
+{
+ QVariant var = getProperty("Name");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanDeviceInterface::getType()
+{
+ QVariant var = getProperty("Type");
+ return qdbus_cast<QString>(var);
+}
+
+QString QConnmanDeviceInterface::getInterface()
+{
+ QVariant var = getProperty("Interface");
+ return qdbus_cast<QString>(var);
+}
+
+bool QConnmanDeviceInterface::isPowered()
+{
+ QVariant var = getProperty("Powered");
+ return qdbus_cast<bool>(var);
+}
+
+quint16 QConnmanDeviceInterface::getScanInterval()
+{
+ QVariant var = getProperty("ScanInterval");
+ return qdbus_cast<quint16>(var);
+}
+
+bool QConnmanDeviceInterface::setScanInterval(const QString & interval)
+{
+// QList<QVariant> args;
+// args << qVariantFromValue(name)
+// << value.variant();
+
+// QDBusMessage reply = this->callWithArgumentList(QDBus::AutoDetect,QLatin1String("SetProperty"),args);
+
+ return setProperty("ScanInterval", QDBusVariant(interval));
+}
+
+bool QConnmanDeviceInterface::isScanning()
+{
+ QVariant var = getProperty("Scanning");
+ return qdbus_cast<bool>(var);
+}
+
+QStringList QConnmanDeviceInterface::getNetworks()
+{
+ QVariant var = getProperty("Networks");
+ return qdbus_cast<QStringList>(var);
+}
+
+bool QConnmanDeviceInterface::setEnabled(bool powered)
+{
+ QList<QVariant> args;
+ args << qVariantFromValue(QString("Powered"))
+ << qVariantFromValue(QDBusVariant(powered));
+
+ QDBusMessage reply = this->callWithArgumentList(QDBus::AutoDetect,QLatin1String("SetProperty"),args);
+ qWarning() << reply.errorMessage() << reply.errorName();
+ return true;
+}
+
+QConnmanDBusHelper::QConnmanDBusHelper(QObject * parent)
+ : QObject(parent)
+{
+}
+
+QConnmanDBusHelper::~QConnmanDBusHelper()
+{
+}
+
+void QConnmanDBusHelper::propertyChanged(const QString &item, const QDBusVariant &var)
+{
+ QDBusMessage msg = this->message();
+// qWarning() << sender();
+ // qWarning() << msg.interface() << msg.path() << item << var.variant() <<"\n";
+ Q_EMIT propertyChangedContext(msg.path() ,item, var);
+}
+
+/////////////////
+QT_END_NAMESPACE
diff --git a/src/plugins/bearer/connman/qconnmanservice_linux_p.h b/src/plugins/bearer/connman/qconnmanservice_linux_p.h
new file mode 100644
index 0000000000..35e3f3d481
--- /dev/null
+++ b/src/plugins/bearer/connman/qconnmanservice_linux_p.h
@@ -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 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 QCONNMANSERVICE_H
+#define QCONNMANSERVICE_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 <QtDBus/QDBusPendingCallWatcher>
+#include <QtDBus/QDBusObjectPath>
+#include <QtDBus/QDBusContext>
+#include <QMap>
+
+#ifndef __CONNMAN_DBUS_H
+
+#define CONNMAN_SERVICE "org.moblin.connman"
+#define CONNMAN_PATH "/org/moblin/connman"
+
+#define CONNMAN_DEBUG_INTERFACE CONNMAN_SERVICE ".Debug"
+#define CONNMAN_ERROR_INTERFACE CONNMAN_SERVICE ".Error"
+#define CONNMAN_AGENT_INTERFACE CONNMAN_SERVICE ".Agent"
+#define CONNMAN_COUNTER_INTERFACE CONNMAN_SERVICE ".Counter"
+
+#define CONNMAN_MANAGER_INTERFACE CONNMAN_SERVICE ".Manager"
+#define CONNMAN_MANAGER_PATH "/"
+
+#define CONNMAN_TASK_INTERFACE CONNMAN_SERVICE ".Task"
+#define CONNMAN_PROFILE_INTERFACE CONNMAN_SERVICE ".Profile"
+#define CONNMAN_SERVICE_INTERFACE CONNMAN_SERVICE ".Service"
+#define CONNMAN_DEVICE_INTERFACE CONNMAN_SERVICE ".Device"
+#define CONNMAN_NETWORK_INTERFACE CONNMAN_SERVICE ".Network"
+#define CONNMAN_PROVIDER_INTERFACE CONNMAN_SERVICE ".Provider"
+#define CONNMAN_TECHNOLOGY_INTERFACE CONNMAN_SERVICE ".Technology"
+#endif
+
+QT_BEGIN_NAMESPACE
+
+QT_END_NAMESPACE
+
+
+QT_BEGIN_NAMESPACE
+
+class QConnmanManagerInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanManagerInterface( QObject *parent = 0);
+ ~QConnmanManagerInterface();
+
+ QDBusObjectPath path() const;
+
+ QVariantMap getProperties();
+ bool setProperty(const QString &name, const QDBusVariant &value);
+ QDBusObjectPath createProfile(const QString &name);
+ bool removeProfile(QDBusObjectPath path);
+ bool requestScan(const QString &type);
+ bool enableTechnology(const QString &type);
+ bool disableTechnology(const QString &type);
+ QDBusObjectPath connectService(QVariantMap &map);
+ void registerAgent(QDBusObjectPath &path);
+ void unregisterAgent(QDBusObjectPath path);
+ void registerCounter(const QString &path, quint32 interval);
+ void unregisterCounter(const QString &path);
+
+ QString requestSession(const QString &bearerName);
+ void releaseSession();
+
+ // properties
+ QString getState();
+ QStringList getAvailableTechnologies();
+ QStringList getEnabledTechnologies();
+ QStringList getConnectedTechnologies();
+ QString getDefaultTechnology();
+ bool getOfflineMode();
+ QString getActiveProfile();
+ QStringList getProfiles();
+ QStringList getTechnologies();
+ QStringList getServices();
+ QDBusObjectPath lookupService(const QString &);
+
+ QString getPathForTechnology(const QString &tech);
+
+
+Q_SIGNALS:
+ void propertyChanged(const QString &, const QDBusVariant &value);
+ void stateChanged(const QString &);
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+ QVariant getProperty(const QString &);
+};
+
+
+class QConnmanNetworkInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanNetworkInterface(const QString &dbusPathName, QObject *parent = 0);
+ ~QConnmanNetworkInterface();
+
+ QVariantMap getProperties();
+
+ //properties
+ QString getAddress();
+ QString getName();
+ bool isConnected();
+ quint8 getSignalStrength();
+ QString getDevice();
+ QString getWifiSsid();
+ QString getWifiMode();
+ QString getWifiSecurity();
+ QString getWifiPassphrase();
+
+Q_SIGNALS:
+ void propertyChanged(const QString &, const QDBusVariant &value);
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+ QVariant getProperty(const QString &);
+};
+
+class QConnmanProfileInterfacePrivate;
+class QConnmanProfileInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanProfileInterface(const QString &dbusPathName,QObject *parent = 0);
+ ~QConnmanProfileInterface();
+
+ QVariantMap getProperties();
+// properties
+ QString getName();
+ bool isOfflineMode();
+ QStringList getServices();
+
+Q_SIGNALS:
+ void propertyChanged(const QString &, const QDBusVariant &value);
+private:
+ QConnmanProfileInterfacePrivate *d;
+
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+ QVariant getProperty(const QString &);
+};
+
+class QConnmanServiceInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanServiceInterface(const QString &dbusPathName,QObject *parent = 0);
+ ~QConnmanServiceInterface();
+
+ QVariantMap getProperties();
+ // clearProperty
+ void connect();
+ void disconnect();
+ void remove();
+ // void moveBefore(QDBusObjectPath &service);
+ // void moveAfter(QDBusObjectPath &service);
+
+// properties
+ QString getState();
+ QString getError();
+ QString getName();
+ QString getType();
+ QString getMode();
+ QString getSecurity();
+ QString getPassphrase();
+ bool isPassphraseRequired();
+ quint8 getSignalStrength();
+ bool isFavorite();
+ bool isImmutable();
+ bool isAutoConnect();
+ bool isSetupRequired();
+ QString getAPN();
+ QString getMCC();
+ QString getMNC();
+ bool isRoaming();
+ QStringList getNameservers();
+ QStringList getDomains();
+ QVariantMap getIPv4();
+ QVariantMap getIPv4Configuration();
+ QVariantMap getProxy();
+ QVariantMap getEthernet();
+
+ bool isOfflineMode();
+ QStringList getServices();
+
+Q_SIGNALS:
+ void propertyChanged(const QString &, const QDBusVariant &value);
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+ QVariant getProperty(const QString &);
+};
+
+class QConnmanTechnologyInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanTechnologyInterface(const QString &dbusPathName,QObject *parent = 0);
+ ~QConnmanTechnologyInterface();
+
+ QVariantMap getProperties();
+// properties
+ QString getState();
+ QString getName();
+ QString getType();
+
+ QStringList getDevices();
+
+Q_SIGNALS:
+ void propertyChanged(const QString &, const QDBusVariant &value);
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+ QVariant getProperty(const QString &);
+
+};
+
+class QConnmanAgentInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanAgentInterface(const QString &dbusPathName,QObject *parent = 0);
+ ~QConnmanAgentInterface();
+
+ void release();
+ void reportError(QDBusObjectPath &path, const QString &error);
+// dict requestInput(QDBusObjectPath &path, dict fields);
+ void cancel();
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+};
+
+class QConnmanCounterInterfacePrivate;
+class QConnmanCounterInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanCounterInterface(const QString &dbusPathName, QObject *parent = 0);
+ ~QConnmanCounterInterface();
+
+// void release();
+ QString getInterface();
+ quint32 getReceivedByteCount();
+ quint32 getTransmittedByteCount();
+
+private:
+ QConnmanCounterInterfacePrivate *d;
+};
+
+class QConnmanDeviceInterface : public QDBusAbstractInterface
+{
+ Q_OBJECT
+
+public:
+
+ QConnmanDeviceInterface(const QString &dbusPathName,QObject *parent = 0);
+ ~QConnmanDeviceInterface();
+
+ QVariantMap getProperties();
+ void scan();
+
+//properties
+ QString getAddress();
+ QString getName();
+ QString getType();
+ QString getInterface();
+ bool isPowered();
+ quint16 getScanInterval();
+ bool setScanInterval(const QString &interval);
+
+ bool isScanning();
+ QStringList getNetworks();
+ bool setEnabled(bool powered);
+ bool setProperty(const QString &name, const QDBusVariant &value);
+
+Q_SIGNALS:
+ void propertyChanged(const QString &, const QDBusVariant &value);
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+protected:
+ void connectNotify(const char *signal);
+ void disconnectNotify(const char *signal);
+ QVariant getProperty(const QString &);
+
+};
+
+class QConnmanDBusHelper: public QObject, protected QDBusContext
+ {
+ Q_OBJECT
+ public:
+ QConnmanDBusHelper(QObject *parent = 0);
+ ~QConnmanDBusHelper();
+
+ public slots:
+ void propertyChanged(const QString &, const QDBusVariant &);
+
+Q_SIGNALS:
+ void propertyChangedContext(const QString &,const QString &,const QDBusVariant &);
+};
+
+QT_END_NAMESPACE
+
+#endif //QCONNMANSERVICE_H
diff --git a/src/plugins/bearer/icd/icd.pro b/src/plugins/bearer/icd/icd.pro
index c7337f5535..b2c58e918a 100644
--- a/src/plugins/bearer/icd/icd.pro
+++ b/src/plugins/bearer/icd/icd.pro
@@ -3,8 +3,8 @@ include(../../qpluginbase.pri)
QT += network dbus
-QMAKE_CXXFLAGS += $$QT_CFLAGS_ICD
-LIBS += $$QT_LIBS_ICD
+QMAKE_CXXFLAGS *= $$QT_CFLAGS_DBUS $$QT_CFLAGS_CONNSETTINGS
+LIBS += $$QT_LIBS_CONNSETTINGS
HEADERS += qicdengine.h \
qnetworksession_impl.h
@@ -15,6 +15,9 @@ SOURCES += main.cpp \
#DEFINES += BEARER_MANAGEMENT_DEBUG
+include(../../../3rdparty/libconninet.pri)
+include(../../../3rdparty/libgq.pri)
+
QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer
target.path += $$[QT_INSTALL_PLUGINS]/bearer
INSTALLS += target
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.cpp b/src/plugins/bearer/icd/qnetworksession_impl.cpp
index e375b4ffc8..e8e5183fd0 100644
--- a/src/plugins/bearer/icd/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/icd/qnetworksession_impl.cpp
@@ -235,7 +235,7 @@ void QNetworkSessionPrivateImpl::updateIdentifier(const QString &newId)
}
-quint64 QNetworkSessionPrivateImpl::getStatistics(bool sent) const
+QNetworkSessionPrivateImpl::Statistics QNetworkSessionPrivateImpl::getStatistics() const
{
/* This could be also implemented by using the Maemo::Icd::statistics()
* that gets the statistics data for a specific IAP. Change if
@@ -243,56 +243,51 @@ quint64 QNetworkSessionPrivateImpl::getStatistics(bool sent) const
*/
Maemo::Icd icd;
QList<Maemo::IcdStatisticsResult> stats_results;
- quint64 counter_rx = 0, counter_tx = 0;
+ Statistics stats = { 0, 0, 0};
- if (!icd.statistics(stats_results)) {
- return 0;
- }
+ if (!icd.statistics(stats_results))
+ return stats;
foreach (const 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 */
- IcdNetworkConfigurationPrivate *icdConfig =
- toIcdConfig(privateConfiguration(activeConfig));
+ if (res.params.network_attrs & ICD_NW_ATTR_IAPNAME) {
+ /* network_id is the IAP UUID */
+ if (QString(res.params.network_id.data()) == activeConfig.identifier()) {
+ stats.txData = res.bytes_sent;
+ stats.rxData = res.bytes_received;
+ stats.activeTime = res.time_active;
+ }
+ } else {
+ /* We probably will never get to this branch */
+ IcdNetworkConfigurationPrivate *icdConfig =
+ toIcdConfig(privateConfiguration(activeConfig));
- icdConfig->mutex.lock();
- if (res.params.network_id == icdConfig->network_id) {
- counter_tx = res.bytes_sent;
- counter_rx = res.bytes_received;
- }
- icdConfig->mutex.unlock();
- }
+ icdConfig->mutex.lock();
+ if (res.params.network_id == icdConfig->network_id) {
+ stats.txData = res.bytes_sent;
+ stats.rxData = res.bytes_received;
+ stats.activeTime = res.time_active;
+ }
+ icdConfig->mutex.unlock();
+ }
}
- if (sent)
- return counter_tx;
- else
- return counter_rx;
+ return stats;
}
quint64 QNetworkSessionPrivateImpl::bytesWritten() const
{
- return getStatistics(true);
+ return getStatistics().txData;
}
quint64 QNetworkSessionPrivateImpl::bytesReceived() const
{
- return getStatistics(false);
+ return getStatistics().rxData;
}
quint64 QNetworkSessionPrivateImpl::activeTime() const
{
- if (startTime.isNull()) {
- return 0;
- }
- return startTime.secsTo(QDateTime::currentDateTime());
+ return getStatistics().activeTime;
}
@@ -620,6 +615,9 @@ static QString get_network_interface()
return iface;
}
+ if (addr_results.first().ip_info.isEmpty())
+ return QString();
+
const char *address = addr_results.first().ip_info.first().address.toAscii().constData();
struct in_addr addr;
if (inet_aton(address, &addr) == 0) {
diff --git a/src/plugins/bearer/icd/qnetworksession_impl.h b/src/plugins/bearer/icd/qnetworksession_impl.h
index c43b1f0a3f..390e508c80 100644
--- a/src/plugins/bearer/icd/qnetworksession_impl.h
+++ b/src/plugins/bearer/icd/qnetworksession_impl.h
@@ -170,6 +170,12 @@ private:
QNetworkConfigurationManager manager;
QIcdEngine *engine;
+ struct Statistics {
+ quint64 txData;
+ quint64 rxData;
+ quint64 activeTime;
+ };
+
// The config set on QNetworkSession.
QNetworkConfiguration config;
@@ -186,7 +192,7 @@ private:
friend class IcdListener;
void updateState(QNetworkSession::State);
void updateIdentifier(const QString &newId);
- quint64 getStatistics(bool sent) const;
+ Statistics getStatistics() const;
void cleanupSession(void);
void updateProxyInformation();
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.cpp b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
index f89ed0afbc..1de4c0f3ac 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.cpp
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.cpp
@@ -146,62 +146,65 @@ void QNetworkSessionPrivateImpl::configurationRemoved(QNetworkConfigurationPriva
}
}
+void QNetworkSessionPrivateImpl::configurationAdded(QNetworkConfigurationPrivatePointer config)
+{
+ Q_UNUSED(config);
+ // If session is based on service network, some other app may create new access points
+ // to the SNAP --> synchronize session's state with that of interface's.
+ if (!publicConfig.isValid() || publicConfig.type() != QNetworkConfiguration::ServiceNetwork)
+ return;
+
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "configurationAdded IAP: "
+ << toSymbianConfig(privateConfiguration(config))->numericIdentifier();
+#endif
+
+ syncStateWithInterface();
+}
+
+// Function sets the state of the session to match the state
+// of the underlying interface (the configuration this session is based on)
void QNetworkSessionPrivateImpl::syncStateWithInterface()
{
if (!publicConfig.isValid())
return;
- if (iFirstSync && publicConfig.isValid()) {
+ if (iFirstSync) {
QObject::connect(engine, SIGNAL(configurationStateChanged(TUint32, TUint32, QNetworkSession::State)),
this, SLOT(configurationStateChanged(TUint32, TUint32, QNetworkSession::State)));
// Listen to configuration removals, so that in case the configuration
// this session is based on is removed, session knows to enter Invalid -state.
QObject::connect(engine, SIGNAL(configurationRemoved(QNetworkConfigurationPrivatePointer)),
this, SLOT(configurationRemoved(QNetworkConfigurationPrivatePointer)));
+ // Connect to configuration additions, so that in case a configuration is added
+ // in a SNAP this session is based on, the session knows to synch its state with its
+ // interface.
+ QObject::connect(engine, SIGNAL(configurationAdded(QNetworkConfigurationPrivatePointer)),
+ this, SLOT(configurationAdded(QNetworkConfigurationPrivatePointer)));
}
// Start listening IAP state changes from QNetworkConfigurationManagerPrivate
iHandleStateNotificationsFromManager = true;
- // 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) {
- if ((publicConfig.state() & QNetworkConfiguration::Discovered) ==
- QNetworkConfiguration::Discovered) {
- newState(QNetworkSession::Disconnected);
- } else {
- newState(QNetworkSession::NotAvailable);
- }
+ // Check what is the state of the configuration this session is based on
+ // and set the session in appropriate state.
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "syncStateWithInterface() state of publicConfig is: " << publicConfig.state();
+#endif
+ switch (publicConfig.state()) {
+ case QNetworkConfiguration::Active:
+ newState(QNetworkSession::Connected);
+ break;
+ case QNetworkConfiguration::Discovered:
+ newState(QNetworkSession::Disconnected);
+ break;
+ case QNetworkConfiguration::Defined:
+ newState(QNetworkSession::NotAvailable);
+ break;
+ case QNetworkConfiguration::Undefined:
+ default:
+ newState(QNetworkSession::Invalid);
}
}
@@ -253,7 +256,8 @@ QNetworkInterface QNetworkSessionPrivateImpl::currentInterface() const
<< "currentInterface() requested, state: " << state
<< "publicConfig validity: " << publicConfig.isValid();
if (activeInterface.isValid())
- qDebug() << "interface is: " << activeInterface.humanReadableName();
+ qDebug() << "QNS this : " << QString::number((uint)this) << " - "
+ << "interface is: " << activeInterface.humanReadableName();
#endif
if (!publicConfig.isValid() || state != QNetworkSession::Connected) {
@@ -382,7 +386,7 @@ void QNetworkSessionPrivateImpl::open()
SymbianNetworkConfigurationPrivate *symbianConfig =
toSymbianConfig(privateConfiguration(publicConfig));
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
// With One Click Connectivity (Symbian^3 onwards) it is possible
// to connect silently, without any popups.
TConnPrefList pref;
@@ -412,7 +416,7 @@ void QNetworkSessionPrivateImpl::open()
SymbianNetworkConfigurationPrivate *symbianConfig =
toSymbianConfig(privateConfiguration(publicConfig));
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
// On Symbian^3 if service network is not reachable, it triggers a UI (aka EasyWLAN) where
// user can create new IAPs. To detect this, we need to store the number of IAPs
// there was before connection was started.
@@ -906,6 +910,14 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
if (iapId == 0) {
_LIT(KSetting, "IAP\\Id");
iConnection.GetIntSetting(KSetting, iapId);
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
+ // Check if this is an Easy WLAN configuration. On Symbian^3 RConnection may report
+ // the used configuration as 'EasyWLAN' IAP ID if someone has just opened the configuration
+ // from WLAN Scan dialog, _and_ that connection is still up. We need to find the
+ // real matching configuration. Function alters the Easy WLAN ID to real IAP ID (only if
+ // easy WLAN):
+ engine->easyWlanTrueIapId(iapId);
+#endif
}
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
@@ -944,7 +956,7 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
}
}
} else {
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
// On Symbian^3 (only, not earlier or Symbian^4) if the SNAP was not reachable, it triggers
// user choice type of activity (EasyWLAN). As a result, a new IAP may be created, and
// hence if was not found yet. Therefore update configurations and see if there is something new.
@@ -982,7 +994,7 @@ QNetworkConfiguration QNetworkSessionPrivateImpl::activeConfiguration(TUint32 ia
qDebug() << "QNS this : " << QString::number((uint)this) << " - "
<< "configuration was not found, returning invalid.";
#endif
-#endif // OCC_FUNCTIONALITY_AVAILABLE
+#endif
// Given IAP Id was not found from known IAPs array
return QNetworkConfiguration();
}
@@ -1044,6 +1056,11 @@ void QNetworkSessionPrivateImpl::RunL()
TInt error = KErrNone;
QNetworkConfiguration newActiveConfig = activeConfiguration();
if (!newActiveConfig.isValid()) {
+ // RConnection startup was successfull but no configuration
+ // was found. That indicates that user has chosen to create a
+ // new WLAN configuration (from scan results), but that new
+ // configuration does not have access to Internet (Internet
+ // Connectivity Test, ICT, failed).
error = KErrGeneral;
} else {
// Use name of the IAP to open global 'Open C' RConnection
@@ -1053,16 +1070,24 @@ void QNetworkSessionPrivateImpl::RunL()
strcpy(ifr.ifr_name, nameAsByteArray.constData());
error = setdefaultif(&ifr);
}
-
if (error != KErrNone) {
isOpen = false;
isOpening = false;
iError = QNetworkSession::UnknownSessionError;
QT_TRYCATCH_LEAVING(emit QNetworkSessionPrivate::error(iError));
- Cancel();
if (ipConnectionNotifier) {
ipConnectionNotifier->StopNotifications();
}
+ if (!newActiveConfig.isValid()) {
+ // No valid configuration, bail out.
+ // Status updates from QNCM won't be received correctly
+ // because there is no configuration to associate them with so transit here.
+ iConnection.Close();
+ newState(QNetworkSession::Closing);
+ newState(QNetworkSession::Disconnected);
+ } else {
+ Cancel();
+ }
QT_TRYCATCH_LEAVING(syncStateWithInterface());
return;
}
@@ -1117,7 +1142,9 @@ void QNetworkSessionPrivateImpl::RunL()
isOpening = false;
activeConfig = QNetworkConfiguration();
serviceConfig = QNetworkConfiguration();
- if (publicConfig.state() == QNetworkConfiguration::Undefined ||
+ if (statusCode == KErrCancel) {
+ iError = QNetworkSession::SessionAbortedError;
+ } else if (publicConfig.state() == QNetworkConfiguration::Undefined ||
publicConfig.state() == QNetworkConfiguration::Defined) {
iError = QNetworkSession::InvalidConfigurationError;
} else {
@@ -1300,7 +1327,7 @@ bool QNetworkSessionPrivateImpl::newState(QNetworkSession::State newState, TUint
}
}
}
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
// If the retVal is not true here, it means that the status update may apply to an IAP outside of
// SNAP (session is based on SNAP but follows IAP outside of it), which may occur on Symbian^3 EasyWlan.
if (retVal == false && activeConfig.isValid() &&
diff --git a/src/plugins/bearer/symbian/qnetworksession_impl.h b/src/plugins/bearer/symbian/qnetworksession_impl.h
index 0754ace1b7..aac9321cae 100644
--- a/src/plugins/bearer/symbian/qnetworksession_impl.h
+++ b/src/plugins/bearer/symbian/qnetworksession_impl.h
@@ -64,7 +64,7 @@
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
#include <comms-infras/cs_mobility_apiext.h>
#endif
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
#include <extendedconnpref.h>
#endif
@@ -134,7 +134,8 @@ protected: // From CActive
private Q_SLOTS:
void configurationStateChanged(TUint32 accessPointId, TUint32 connMonId, QNetworkSession::State newState);
void configurationRemoved(QNetworkConfigurationPrivatePointer config);
-
+ void configurationAdded(QNetworkConfigurationPrivatePointer config);
+
private:
TUint iapClientCount(TUint aIAPId) const;
quint64 transferredData(TUint dataType) const;
diff --git a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro
index 25f18f20ca..ff0f11ca8e 100644
--- a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro
+++ b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro
@@ -6,7 +6,7 @@ symbian {
DEFINES += SNAP_FUNCTIONALITY_AVAILABLE
LIBS += -lcmmanager
- exists($$MW_LAYER_PUBLIC_EXPORT_PATH(extendedconnpref.h)) {
+ exists($$prependEpocroot($$MW_LAYER_PUBLIC_EXPORT_PATH(extendedconnpref.h))) {
DEFINES += OCC_FUNCTIONALITY_AVAILABLE
LIBS += -lextendedconnpref
}
diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp
index ca444c1918..4bd6d2ffd5 100644
--- a/src/plugins/bearer/symbian/symbianengine.cpp
+++ b/src/plugins/bearer/symbian/symbianengine.cpp
@@ -270,7 +270,7 @@ void SymbianEngine::updateConfigurationsL()
QList<QString> knownConfigs = accessPointConfigurations.keys();
QList<QString> knownSnapConfigs = snapConfigurations.keys();
-#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
// S60 version is >= Series60 3rd Edition Feature Pack 2
TInt error = KErrNone;
@@ -291,14 +291,17 @@ void SymbianEngine::updateConfigurationsL()
if (error == KErrNone) {
QNetworkConfigurationPrivatePointer ptr(cpPriv);
accessPointConfigurations.insert(ptr->id, ptr);
-
- mutex.unlock();
- // Emit configuration added. Connected slots may throw execptions
- // which propagate here --> must be converted to leaves (standard
- // std::exception would cause any TRAP trapping this function to terminate
- // program).
- QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
- mutex.lock();
+ if (!iFirstUpdate) {
+ // Emit configuration added. Connected slots may throw execptions
+ // which propagate here --> must be converted to leaves (standard
+ // std::exception would cause any TRAP trapping this function to terminate
+ // program).
+ QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
+ updateStatesToSnaps();
+ mutex.unlock();
+ QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
+ mutex.lock();
+ }
}
}
CleanupStack::PopAndDestroy(&connectionMethod);
@@ -311,7 +314,17 @@ void SymbianEngine::updateConfigurationsL()
iCmManager.AllDestinationsL(destinations);
for(int i = 0; i < destinations.Count(); i++) {
RCmDestination destination;
- destination = iCmManager.DestinationL(destinations[i]);
+
+ // Some destinatsions require ReadDeviceData -capability (MMS/WAP)
+ // The below function will leave in these cases. Don't. Proceed to
+ // next destination (if any).
+ TRAPD(error, destination = iCmManager.DestinationL(destinations[i]));
+ if (error == KErrPermissionDenied) {
+ continue;
+ } else {
+ User::LeaveIfError(error);
+ }
+
CleanupClosePushL(destination);
QString ident = QT_BEARERMGMT_CONFIGURATION_SNAP_PREFIX +
QString::number(qHash(destination.Id()));
@@ -319,12 +332,12 @@ void SymbianEngine::updateConfigurationsL()
knownSnapConfigs.removeOne(ident);
} else {
SymbianNetworkConfigurationPrivate *cpPriv = new SymbianNetworkConfigurationPrivate;
-
+
HBufC *pName = destination.NameLC();
QT_TRYCATCH_LEAVING(cpPriv->name = QString::fromUtf16(pName->Ptr(),pName->Length()));
CleanupStack::PopAndDestroy(pName);
pName = NULL;
-
+
cpPriv->isValid = true;
cpPriv->id = ident;
cpPriv->numericId = destination.Id();
@@ -336,64 +349,75 @@ void SymbianEngine::updateConfigurationsL()
QNetworkConfigurationPrivatePointer ptr(cpPriv);
snapConfigurations.insert(ident, ptr);
-
- mutex.unlock();
- QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
- mutex.lock();
+ if (!iFirstUpdate) {
+ QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
+ updateStatesToSnaps();
+ mutex.unlock();
+ QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
+ mutex.lock();
+ }
}
- QNetworkConfigurationPrivatePointer privSNAP = snapConfigurations.value(ident);
-
+
+ // Loop through all connection methods in this SNAP
+ QMap<unsigned int, QNetworkConfigurationPrivatePointer> connections;
for (int j=0; j < destination.ConnectionMethodCount(); j++) {
RCmConnectionMethod connectionMethod = destination.ConnectionMethodL(j);
CleanupClosePushL(connectionMethod);
-
+
TUint32 iapId = connectionMethod.GetIntAttributeL(CMManager::ECmIapId);
QString iface = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(iapId));
// Check that IAP can be found from accessPointConfigurations list
- QNetworkConfigurationPrivatePointer priv = accessPointConfigurations.value(iface);
- if (!priv) {
+ QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(iface);
+ if (!ptr) {
SymbianNetworkConfigurationPrivate *cpPriv = NULL;
TRAP(error, cpPriv = configFromConnectionMethodL(connectionMethod));
if (error == KErrNone) {
- QNetworkConfigurationPrivatePointer ptr(cpPriv);
+ ptr = QNetworkConfigurationPrivatePointer(cpPriv);
accessPointConfigurations.insert(ptr->id, ptr);
- mutex.unlock();
- QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
- mutex.lock();
-
- QMutexLocker configLocker(&privSNAP->mutex);
- privSNAP->serviceNetworkMembers.append(ptr);
+ if (!iFirstUpdate) {
+ QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
+ updateStatesToSnaps();
+ mutex.unlock();
+ QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
+ mutex.lock();
+ }
}
} else {
knownConfigs.removeOne(iface);
- // Check that IAP can be found from related SNAP's configuration list
- bool iapFound = false;
- QMutexLocker snapConfigLocker(&privSNAP->mutex);
- for (int i = 0; i < privSNAP->serviceNetworkMembers.count(); i++) {
- if (toSymbianConfig(privSNAP->serviceNetworkMembers[i])->numericIdentifier() ==
- iapId) {
- iapFound = true;
- break;
- }
- }
- if (!iapFound)
- privSNAP->serviceNetworkMembers.append(priv);
}
-
+
+ if (ptr) {
+ unsigned int priority;
+ TRAPD(error, priority = destination.PriorityL(connectionMethod));
+ if (!error)
+ connections.insert(priority, ptr);
+ }
+
CleanupStack::PopAndDestroy(&connectionMethod);
}
-
+
+ QNetworkConfigurationPrivatePointer privSNAP = snapConfigurations.value(ident);
QMutexLocker snapConfigLocker(&privSNAP->mutex);
- if (privSNAP->serviceNetworkMembers.count() > 1) {
+
+ if (privSNAP->serviceNetworkMembers != connections) {
+ privSNAP->serviceNetworkMembers = connections;
+
// Roaming is supported only if SNAP contains more than one IAP
- privSNAP->roamingSupported = true;
+ privSNAP->roamingSupported = privSNAP->serviceNetworkMembers.count() > 1;
+
+ snapConfigLocker.unlock();
+
+ updateStatesToSnaps();
+
+ mutex.unlock();
+ QT_TRYCATCH_LEAVING(emit configurationChanged(privSNAP));
+ mutex.lock();
}
-
+
CleanupStack::PopAndDestroy(&destination);
}
CleanupStack::PopAndDestroy(&destinations);
-
#else
// S60 version is < Series60 3rd Edition Feature Pack 2
CCommsDbTableView* pDbTView = ipCommsDB->OpenTableLC(TPtrC(IAP));
@@ -411,10 +435,13 @@ void SymbianEngine::updateConfigurationsL()
if (readNetworkConfigurationValuesFromCommsDb(apId, cpPriv)) {
QNetworkConfigurationPrivatePointer ptr(cpPriv);
accessPointConfigurations.insert(ident, ptr);
-
- mutex.unlock();
- QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
- mutex.lock();
+ if (!iFirstUpdate) {
+ QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
+ updateStatesToSnaps();
+ mutex.unlock();
+ QT_TRYCATCH_LEAVING(emit configurationAdded(ptr));
+ mutex.lock();
+ }
} else {
delete cpPriv;
}
@@ -423,8 +450,9 @@ void SymbianEngine::updateConfigurationsL()
}
CleanupStack::PopAndDestroy(pDbTView);
#endif
+
QT_TRYCATCH_LEAVING(updateActiveAccessPoints());
-
+
foreach (const QString &oldIface, knownConfigs) {
//remove non existing IAP
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(oldIface);
@@ -439,10 +467,13 @@ void SymbianEngine::updateConfigurationsL()
QNetworkConfigurationPrivatePointer ptr2 = snapConfigurations.value(iface);
// => Check if one of the IAPs of the SNAP is active
QMutexLocker snapConfigLocker(&ptr2->mutex);
- for (int i = 0; i < ptr2->serviceNetworkMembers.count(); ++i) {
- if (toSymbianConfig(ptr2->serviceNetworkMembers[i])->numericIdentifier() ==
+ QMutableMapIterator<unsigned int, QNetworkConfigurationPrivatePointer> i(ptr2->serviceNetworkMembers);
+ while (i.hasNext()) {
+ i.next();
+
+ if (toSymbianConfig(i.value())->numericIdentifier() ==
toSymbianConfig(ptr)->numericIdentifier()) {
- ptr2->serviceNetworkMembers.removeAt(i);
+ i.remove();
break;
}
}
@@ -463,6 +494,10 @@ void SymbianEngine::updateConfigurationsL()
stopCommsDatabaseNotifications();
TRAP_IGNORE(defaultConfig = defaultConfigurationL());
startCommsDatabaseNotifications();
+
+#ifdef SNAP_FUNCTIONALITY_AVAILABLE
+ updateStatesToSnaps();
+#endif
}
#ifdef SNAP_FUNCTIONALITY_AVAILABLE
@@ -683,15 +718,21 @@ void SymbianEngine::updateActiveAccessPoints()
User::WaitForRequest(status);
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
if (!ptr) {
// If IAP was not found, check if the update was about EasyWLAN
ptr = configurationFromEasyWlan(apId, connectionId);
+ // Change the ident correspondingly
+ if (ptr) {
+ ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX +
+ QString::number(qHash(toSymbianConfig(ptr)->numericIdentifier()));
+ }
}
#endif
if (ptr) {
iConnectionMonitor.GetIntAttribute(connectionId, subConnectionCount, KConnectionStatus, connectionStatus, status);
- User::WaitForRequest(status);
+ User::WaitForRequest(status);
+
if (connectionStatus == KLinkLayerOpen) {
online = true;
inactiveConfigs.removeOne(ident);
@@ -791,15 +832,19 @@ void SymbianEngine::updateStatesToSnaps()
// => 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++) {
- QMutexLocker configLocker(&ptr->serviceNetworkMembers[i]->mutex);
+ QMapIterator<unsigned int, QNetworkConfigurationPrivatePointer> i(ptr->serviceNetworkMembers);
+ while (i.hasNext()) {
+ i.next();
+
+ const QNetworkConfigurationPrivatePointer child = i.value();
- if ((ptr->serviceNetworkMembers[i]->state & QNetworkConfiguration::Active)
- == QNetworkConfiguration::Active) {
+ QMutexLocker configLocker(&child->mutex);
+
+ if ((child->state & QNetworkConfiguration::Active) == QNetworkConfiguration::Active) {
active = true;
break;
- } else if ((ptr->serviceNetworkMembers[i]->state & QNetworkConfiguration::Discovered)
- == QNetworkConfiguration::Discovered) {
+ } else if ((child->state & QNetworkConfiguration::Discovered) ==
+ QNetworkConfiguration::Discovered) {
discovered = true;
}
}
@@ -1035,7 +1080,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
if (!ptr) {
// Check if status was regarding EasyWLAN
ptr = configurationFromEasyWlan(apId, connectionId);
@@ -1060,7 +1105,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
User::WaitForRequest(status);
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
if (!ptr) {
// Check for EasyWLAN
ptr = configurationFromEasyWlan(apId, connectionId);
@@ -1152,6 +1197,8 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
QT_TRYCATCH_LEAVING(changeConfigurationStateAtMaxTo(ptr, QNetworkConfiguration::Defined));
}
}
+ // Something has in IAPs, update states to SNAPs
+ updateStatesToSnaps();
}
break;
@@ -1168,7 +1215,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
User::WaitForRequest(status);
QString ident = QT_BEARERMGMT_CONFIGURATION_IAP_PREFIX+QString::number(qHash(apId));
QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.value(ident);
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
if (!ptr) {
// If IAP was not found, check if the update was about EasyWLAN
ptr = configurationFromEasyWlan(apId, connectionId);
@@ -1189,7 +1236,7 @@ void SymbianEngine::EventL(const CConnMonEventBase& aEvent)
}
}
-#ifdef OCC_FUNCTIONALITY_AVAILABLE
+#if defined(OCC_FUNCTIONALITY_AVAILABLE) && defined(SNAP_FUNCTIONALITY_AVAILABLE)
// Tries to derive configuration from EasyWLAN.
// First checks if the interface brought up was EasyWLAN, then derives the real SSID,
// and looks up configuration based on that one.
@@ -1224,6 +1271,45 @@ QNetworkConfigurationPrivatePointer SymbianEngine::configurationFromEasyWlan(TUi
}
return QNetworkConfigurationPrivatePointer();
}
+
+bool SymbianEngine::easyWlanTrueIapId(TUint32& trueIapId)
+{
+ // Check if this is easy wlan id in the first place
+ if (trueIapId != iCmManager.EasyWlanIdL())
+ return false;
+
+ // Loop through all connections that connection monitor is aware
+ // and check for IAPs based on easy WLAN
+ TRequestStatus status;
+ TUint connectionCount;
+ iConnectionMonitor.GetConnectionCount(connectionCount, status);
+ User::WaitForRequest(status);
+ 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);
+ if (apId == trueIapId) {
+ QNetworkConfigurationPrivatePointer ptr =
+ configurationFromEasyWlan(apId, connectionId);
+ if (ptr) {
+#ifdef QT_BEARERMGMT_SYMBIAN_DEBUG
+ qDebug() << "QNCM easyWlanTrueIapId(), found true IAP ID: "
+ << toSymbianConfig(ptr)->numericIdentifier();
+#endif
+ trueIapId = toSymbianConfig(ptr)->numericIdentifier();
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
#endif
// Sessions may use this function to report configuration state changes,
diff --git a/src/plugins/bearer/symbian/symbianengine.h b/src/plugins/bearer/symbian/symbianengine.h
index cfddc29c6a..ecd858d5c4 100644
--- a/src/plugins/bearer/symbian/symbianengine.h
+++ b/src/plugins/bearer/symbian/symbianengine.h
@@ -208,6 +208,7 @@ private:
QNetworkSession::State newState);
#ifdef OCC_FUNCTIONALITY_AVAILABLE
QNetworkConfigurationPrivatePointer configurationFromEasyWlan(TUint32 apId, TUint connectionId);
+ bool easyWlanTrueIapId(TUint32& trueIapId);
#endif
private: // Data
diff --git a/src/plugins/sqldrivers/db2/db2.pro b/src/plugins/sqldrivers/db2/db2.pro
index 5223beb96f..e053f3756b 100644
--- a/src/plugins/sqldrivers/db2/db2.pro
+++ b/src/plugins/sqldrivers/db2/db2.pro
@@ -1,10 +1,6 @@
-TARGET = qsqldb2
+TARGET = qsqldb2
-HEADERS = ../../../sql/drivers/db2/qsql_db2.h
-SOURCES = main.cpp \
- ../../../sql/drivers/db2/qsql_db2.cpp
-
-unix:!contains( LIBS, .*db2.* ):LIBS *= -ldb2
-win32:!contains( LIBS, .*db2.* ):LIBS *= -ldb2cli
+SOURCES = main.cpp
+include(../../../sql/drivers/db2/qsql_db2.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/ibase/ibase.pro b/src/plugins/sqldrivers/ibase/ibase.pro
index ec2bc7b987..7870ec8465 100644
--- a/src/plugins/sqldrivers/ibase/ibase.pro
+++ b/src/plugins/sqldrivers/ibase/ibase.pro
@@ -1,14 +1,6 @@
-TARGET = qsqlibase
+TARGET = qsqlibase
-HEADERS = ../../../sql/drivers/ibase/qsql_ibase.h
-SOURCES = main.cpp \
- ../../../sql/drivers/ibase/qsql_ibase.cpp
-
-unix:!contains( LIBS, .*gds.* ):!contains( LIBS, .*libfb.* ):LIBS *= -lgds
-
-win32:!contains( LIBS, .*gds.* ):!contains( LIBS, .*fbclient.* ) {
- !win32-borland:LIBS *= -lgds32_ms
- win32-borland:LIBS += gds32.lib
-}
+SOURCES = main.cpp
+include(../../../sql/drivers/ibase/qsql_ibase.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/mysql/mysql.pro b/src/plugins/sqldrivers/mysql/mysql.pro
index 9f5c619e19..b6d42fffc8 100644
--- a/src/plugins/sqldrivers/mysql/mysql.pro
+++ b/src/plugins/sqldrivers/mysql/mysql.pro
@@ -1,23 +1,6 @@
-TARGET = qsqlmysql
+TARGET = qsqlmysql
-HEADERS = ../../../sql/drivers/mysql/qsql_mysql.h
-SOURCES = main.cpp \
- ../../../sql/drivers/mysql/qsql_mysql.cpp
-
-unix: {
- isEmpty(QT_LFLAGS_MYSQL) {
- !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
- use_libmysqlclient_r:LIBS *= -lmysqlclient_r
- else:LIBS *= -lmysqlclient
- }
- } else {
- LIBS *= $$QT_LFLAGS_MYSQL
- QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
- }
-}
-
-win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) {
- LIBS *= -llibmysql
-}
+SOURCES = main.cpp
+include(../../../sql/drivers/mysql/qsql_mysql.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/oci/oci.pro b/src/plugins/sqldrivers/oci/oci.pro
index 3bf70a13f9..d7dcce9e35 100644
--- a/src/plugins/sqldrivers/oci/oci.pro
+++ b/src/plugins/sqldrivers/oci/oci.pro
@@ -1,13 +1,6 @@
-TARGET = qsqloci
+TARGET = qsqloci
-HEADERS = ../../../sql/drivers/oci/qsql_oci.h
-SOURCES = main.cpp \
- ../../../sql/drivers/oci/qsql_oci.cpp
-
-win32:LIBS *= -loci
-
-unix:!contains( LIBS, .*clnts.* ):LIBS *= -lclntsh
-
-macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ
+SOURCES = main.cpp
+include(../../../sql/drivers/oci/qsql_oci.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/odbc/odbc.pro b/src/plugins/sqldrivers/odbc/odbc.pro
index 2bf85f1f7e..677eb6eedf 100644
--- a/src/plugins/sqldrivers/odbc/odbc.pro
+++ b/src/plugins/sqldrivers/odbc/odbc.pro
@@ -1,19 +1,6 @@
-TARGET = qsqlodbc
+TARGET = qsqlodbc
-HEADERS = ../../../sql/drivers/odbc/qsql_odbc.h
-SOURCES = main.cpp \
- ../../../sql/drivers/odbc/qsql_odbc.cpp
-
-unix {
- !contains( LIBS, .*odbc.* ) {
- LIBS *= $$QT_LFLAGS_ODBC
- }
- DEFINES += UNICODE
-}
-
-win32 {
- !win32-borland:LIBS *= -lodbc32
- win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
-}
+SOURCES = main.cpp
+include(../../../sql/drivers/odbc/qsql_odbc.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/psql/psql.pro b/src/plugins/sqldrivers/psql/psql.pro
index 80a5348f5e..8276c0ae90 100644
--- a/src/plugins/sqldrivers/psql/psql.pro
+++ b/src/plugins/sqldrivers/psql/psql.pro
@@ -1,18 +1,6 @@
-TARGET = qsqlpsql
+TARGET = qsqlpsql
-HEADERS = ../../../sql/drivers/psql/qsql_psql.h
-SOURCES = main.cpp \
- ../../../sql/drivers/psql/qsql_psql.cpp
-
-unix|win32-g++*: {
- !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 -lws2_32 -ladvapi32
+SOURCES = main.cpp
+include(../../../sql/drivers/psql/qsql_psql.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/sqlite/sqlite.pro b/src/plugins/sqldrivers/sqlite/sqlite.pro
index fb312334c1..f4c1671a4b 100644
--- a/src/plugins/sqldrivers/sqlite/sqlite.pro
+++ b/src/plugins/sqldrivers/sqlite/sqlite.pro
@@ -1,18 +1,7 @@
-TARGET = qsqlite
+TARGET = qsqlite
-HEADERS = ../../../sql/drivers/sqlite/qsql_sqlite.h
-SOURCES = smain.cpp \
- ../../../sql/drivers/sqlite/qsql_sqlite.cpp
-
-!system-sqlite:!contains( LIBS, .*sqlite.* ) {
- CONFIG(release, debug|release):DEFINES *= NDEBUG
- DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
- INCLUDEPATH += ../../../3rdparty/sqlite
- SOURCES += ../../../3rdparty/sqlite/sqlite3.c
-} else {
- LIBS *= $$QT_LFLAGS_SQLITE
- QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
-}
+SOURCES = smain.cpp
+include(../../../sql/drivers/sqlite/qsql_sqlite.pri)
wince*: DEFINES += HAVE_LOCALTIME_S=0
diff --git a/src/plugins/sqldrivers/sqlite2/sqlite2.pro b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
index 88db22a63a..e6197b9906 100644
--- a/src/plugins/sqldrivers/sqlite2/sqlite2.pro
+++ b/src/plugins/sqldrivers/sqlite2/sqlite2.pro
@@ -1,9 +1,6 @@
-TARGET = qsqlite2
+TARGET = qsqlite2
-HEADERS = ../../../sql/drivers/sqlite2/qsql_sqlite2.h
-SOURCES = smain.cpp \
- ../../../sql/drivers/sqlite2/qsql_sqlite2.cpp
-
-!contains(LIBS, .*sqlite.*):LIBS *= -lsqlite
+SOURCES = smain.cpp
+include(../../../sql/drivers/sqlite2/qsql_sqlite2.pri)
include(../qsqldriverbase.pri)
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
new file mode 100644
index 0000000000..494c64c55f
--- /dev/null
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri
@@ -0,0 +1,40 @@
+# We just want to include the sqlite3 binaries for Symbian for platforms that do not have them.
+!symbian-abld:!symbian-sbsv2 {
+ !symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
+ symbian_sqlite3_zip_file = $$PWD/SQLite3_v9.2.zip
+
+ # The QMAKE_COPY section is to update timestamp on the file.
+ symbian_sqlite3_header.input = symbian_sqlite3_zip_file
+ symbian_sqlite3_header.output = sqlite3.h
+ !isEmpty(MOC_DIR):symbian_sqlite3_header.output = $$MOC_DIR/$$symbian_sqlite3_header.output
+ symbian_sqlite3_header.CONFIG = combine no_link
+ symbian_sqlite3_header.dependency_type = TYPE_C
+ symbian_sqlite3_header.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/include/stdapis/${QMAKE_FILE_OUT_BASE}.h \
+ && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.h ${QMAKE_FILE_OUT}.tmp \
+ && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.h \
+ && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
+ silent:symbian_sqlite3_header.commands = @echo unzipping $@ && $$symbian_sqlite3_header.commands
+ QMAKE_EXTRA_COMPILERS += symbian_sqlite3_header
+
+ # The QMAKE_COPY section is to update timestamp on the file.
+ symbian_sqlite3_dso.input = symbian_sqlite3_zip_file
+ symbian_sqlite3_dso.output = sqlite3.dso
+ !isEmpty(OBJECTS_DIR):symbian_sqlite3_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_dso.output
+ symbian_sqlite3_dso.CONFIG = combine no_link target_predeps
+ symbian_sqlite3_dso.commands = $$QMAKE_UNZIP -j ${QMAKE_FILE_NAME} epoc32/release/armv5/lib/${QMAKE_FILE_OUT_BASE}.dso \
+ && $$QMAKE_COPY ${QMAKE_FILE_OUT_BASE}.dso ${QMAKE_FILE_OUT}.tmp \
+ && $$QMAKE_DEL_FILE ${QMAKE_FILE_OUT_BASE}.dso \
+ && $$QMAKE_MOVE ${QMAKE_FILE_OUT}.tmp ${QMAKE_FILE_OUT}
+ silent:symbian_sqlite3_dso.commands = @echo unzipping $@ && $$symbian_sqlite3_dso.commands
+ QMAKE_EXTRA_COMPILERS += symbian_sqlite3_dso
+
+ symbian_sqlite3_ver_dso.input = symbian_sqlite3_zip_file
+ symbian_sqlite3_ver_dso.output = sqlite3{00060003}.dso
+ !isEmpty(OBJECTS_DIR):symbian_sqlite3_ver_dso.output = $$OBJECTS_DIR/$$symbian_sqlite3_ver_dso.output
+ symbian_sqlite3_ver_dso.CONFIG = $$symbian_sqlite3_dso.CONFIG
+ symbian_sqlite3_ver_dso.commands = $$symbian_sqlite3_dso.commands
+ QMAKE_EXTRA_COMPILERS += symbian_sqlite3_ver_dso
+
+ QMAKE_LIBDIR *= $$OBJECTS_DIR
+ }
+}
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
index 691cce1327..0d233e6d43 100644
--- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
@@ -2,7 +2,7 @@
TEMPLATE = subdirs
# We just want to export the sqlite3 binaries for Symbian for platforms that do not have them.
-symbian {
+symbian-abld|symbian-sbsv2 {
!symbian_no_export_sqlite:!exists($${EPOCROOT}epoc32/release/armv5/lib/sqlite3.dso) {
BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip"
}
diff --git a/src/plugins/sqldrivers/tds/tds.pro b/src/plugins/sqldrivers/tds/tds.pro
index 08a166baa9..b8e8ded321 100644
--- a/src/plugins/sqldrivers/tds/tds.pro
+++ b/src/plugins/sqldrivers/tds/tds.pro
@@ -1,15 +1,6 @@
-TARGET = qsqltds
+TARGET = qsqltds
-HEADERS = ../../../sql/drivers/tds/qsql_tds.h
-
-SOURCES = main.cpp \
- ../../../sql/drivers/tds/qsql_tds.cpp
-
-unix:!contains( LIBS, .*sybdb.* ):LIBS *= -lsybdb
-
-win32 {
- !win32-borland:LIBS *= -lNTWDBLIB
- win32-borland:LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB
-}
+SOURCES = main.cpp
+include(../../../sql/drivers/tds/qsql_tds.pri)
include(../qsqldriverbase.pri)
diff --git a/src/qbase.pri b/src/qbase.pri
index 064e67c1d3..f6af22f481 100644
--- a/src/qbase.pri
+++ b/src/qbase.pri
@@ -160,13 +160,25 @@ DEFINES *= QT_USE_FAST_OPERATOR_PLUS QT_USE_FAST_CONCATENATION
TARGET = $$qtLibraryTarget($$TARGET$$QT_LIBINFIX) #do this towards the end
+qtPrepareTool(QMAKE_LUPDATE, lupdate)
+qtPrepareTool(QMAKE_LRELEASE, lrelease)
+
moc_dir.name = moc_location
moc_dir.variable = QMAKE_MOC
uic_dir.name = uic_location
uic_dir.variable = QMAKE_UIC
-QMAKE_PKGCONFIG_VARIABLES += moc_dir uic_dir
+rcc_dir.name = rcc_location
+rcc_dir.variable = QMAKE_RCC
+
+lupdate_dir.name = lupdate_location
+lupdate_dir.variable = QMAKE_LUPDATE
+
+lrelease_dir.name = lrelease_location
+lrelease_dir.variable = QMAKE_LRELEASE
+
+QMAKE_PKGCONFIG_VARIABLES += moc_dir uic_dir rcc_dir lupdate_dir lrelease_dir
include(qt_targets.pri)
diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def
index 94be1bba5d..1a79f6322a 100644
--- a/src/s60installs/bwins/QtCoreu.def
+++ b/src/s60installs/bwins/QtCoreu.def
@@ -3122,7 +3122,7 @@ EXPORTS
?reset@QIODevice@@UAE_NXZ @ 3121 NONAME ; bool QIODevice::reset(void)
?reset@QMetaProperty@@QBE_NPAVQObject@@@Z @ 3122 NONAME ; bool QMetaProperty::reset(class QObject *) const
?reset@QTextStream@@QAEXXZ @ 3123 NONAME ; void QTextStream::reset(void)
- ?resetCurrentSender@QObjectPrivate@@SAXPAVQObject@@PAUSender@1@1@Z @ 3124 NONAME ABSENT ; void QObjectPrivate::resetCurrentSender(class QObject *, struct QObjectPrivate::Sender *, struct QObjectPrivate::Sender *)
+ ?resetCurrentSender@QObjectPrivate@@SAXPAVQObject@@PAUSender@1@1@Z @ 3124 NONAME ; void QObjectPrivate::resetCurrentSender(class QObject *, struct QObjectPrivate::Sender *, struct QObjectPrivate::Sender *)
?resetDeleteWatch@QObjectPrivate@@SAXPAV1@PAHH@Z @ 3125 NONAME ; void QObjectPrivate::resetDeleteWatch(class QObjectPrivate *, int *, int)
?resetStatus@QDataStream@@QAEXXZ @ 3126 NONAME ; void QDataStream::resetStatus(void)
?resetStatus@QTextStream@@QAEXXZ @ 3127 NONAME ; void QTextStream::resetStatus(void)
@@ -3281,7 +3281,7 @@ EXPORTS
?setCoords@QRectF@@QAEXMMMM@Z @ 3280 NONAME ; void QRectF::setCoords(float, float, float, float)
?setCurrent@QDir@@SA_NABVQString@@@Z @ 3281 NONAME ; bool QDir::setCurrent(class QString const &)
?setCurrentPath@QFSFileEngine@@SA_NABVQString@@@Z @ 3282 NONAME ; bool QFSFileEngine::setCurrentPath(class QString const &)
- ?setCurrentSender@QObjectPrivate@@SAPAUSender@1@PAVQObject@@PAU21@@Z @ 3283 NONAME ABSENT ; struct QObjectPrivate::Sender * QObjectPrivate::setCurrentSender(class QObject *, struct QObjectPrivate::Sender *)
+ ?setCurrentSender@QObjectPrivate@@SAPAUSender@1@PAVQObject@@PAU21@@Z @ 3283 NONAME ; struct QObjectPrivate::Sender * QObjectPrivate::setCurrentSender(class QObject *, struct QObjectPrivate::Sender *)
?setCurrentTime@QAbstractAnimation@@QAEXH@Z @ 3284 NONAME ; void QAbstractAnimation::setCurrentTime(int)
?setCurrentTime@QTimeLine@@QAEXH@Z @ 3285 NONAME ; void QTimeLine::setCurrentTime(int)
?setCurveShape@QTimeLine@@QAEXW4CurveShape@1@@Z @ 3286 NONAME ; void QTimeLine::setCurveShape(enum QTimeLine::CurveShape)
@@ -4417,71 +4417,69 @@ EXPORTS
?QBasicAtomicInt_testAndSetRelease@@YA_NPCHHH@Z @ 4416 NONAME ; bool QBasicAtomicInt_testAndSetRelease(int volatile *, int, int)
?QBasicAtomicInt_fetchAndStoreAcquire@@YAHPCHH@Z @ 4417 NONAME ; int QBasicAtomicInt_fetchAndStoreAcquire(int volatile *, int)
?QBasicAtomicInt_fetchAndAddAcquire@@YAHPCHH@Z @ 4418 NONAME ; int QBasicAtomicInt_fetchAndAddAcquire(int volatile *, int)
- ??0QString@@QAE@PBVQChar@@@Z @ 4419 NONAME ; QString::QString(class QChar const *)
- ??0QTextDecoder@@QAE@PBVQTextCodec@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4420 NONAME ; QTextDecoder::QTextDecoder(class QTextCodec const *, class QFlags<enum QTextCodec::ConversionFlag>)
- ??0QTextEncoder@@QAE@PBVQTextCodec@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4421 NONAME ; QTextEncoder::QTextEncoder(class QTextCodec const *, class QFlags<enum QTextCodec::ConversionFlag>)
- ??0QVariant@@QAE@ABVQEasingCurve@@@Z @ 4422 NONAME ; QVariant::QVariant(class QEasingCurve const &)
- ??5@YAAAVQDataStream@@AAV0@AAVQEasingCurve@@@Z @ 4423 NONAME ; class QDataStream & operator>>(class QDataStream &, class QEasingCurve &)
- ??6@YAAAVQDataStream@@AAV0@ABVQEasingCurve@@@Z @ 4424 NONAME ; class QDataStream & operator<<(class QDataStream &, class QEasingCurve const &)
- ??8QElapsedTimer@@QBE_NABV0@@Z @ 4425 NONAME ; bool QElapsedTimer::operator==(class QElapsedTimer const &) const
- ??9QElapsedTimer@@QBE_NABV0@@Z @ 4426 NONAME ; bool QElapsedTimer::operator!=(class QElapsedTimer const &) const
- ??M@YA_NABVQElapsedTimer@@0@Z @ 4427 NONAME ; bool operator<(class QElapsedTimer const &, class QElapsedTimer const &)
- ?append@QListData@@QAEPAPAXH@Z @ 4428 NONAME ; void * * QListData::append(int)
- ?clearHistory@QStateMachinePrivate@@QAEXXZ @ 4429 NONAME ; void QStateMachinePrivate::clearHistory(void)
- ?clockType@QElapsedTimer@@SA?AW4ClockType@1@XZ @ 4430 NONAME ; enum QElapsedTimer::ClockType QElapsedTimer::clockType(void)
- ?currentDateTimeUtc@QDateTime@@SA?AV1@XZ @ 4431 NONAME ; class QDateTime QDateTime::currentDateTimeUtc(void)
- ?currentMSecsSinceEpoch@QDateTime@@SA_JXZ @ 4432 NONAME ; long long QDateTime::currentMSecsSinceEpoch(void)
- ?detach@QListData@@QAEPAUData@1@H@Z @ 4433 NONAME ; struct QListData::Data * QListData::detach(int)
- ?detach_grow@QListData@@QAEPAUData@1@PAHH@Z @ 4434 NONAME ; struct QListData::Data * QListData::detach_grow(int *, int)
- ?elapsed@QElapsedTimer@@QBE_JXZ @ 4435 NONAME ; long long QElapsedTimer::elapsed(void) const
- ?fromMSecsSinceEpoch@QDateTime@@SA?AV1@_J@Z @ 4436 NONAME ; class QDateTime QDateTime::fromMSecsSinceEpoch(long long)
- ?hasExpired@QElapsedTimer@@QBE_N_J@Z @ 4437 NONAME ; bool QElapsedTimer::hasExpired(long long) const
- ?invalidate@QElapsedTimer@@QAEXXZ @ 4438 NONAME ; void QElapsedTimer::invalidate(void)
- ?isMonotonic@QElapsedTimer@@SA_NXZ @ 4439 NONAME ; bool QElapsedTimer::isMonotonic(void)
- ?isSharedWith@QByteArray@@QBE_NABV1@@Z @ 4440 NONAME ; bool QByteArray::isSharedWith(class QByteArray const &) const
- ?isSharedWith@QString@@QBE_NABV1@@Z @ 4441 NONAME ; bool QString::isSharedWith(class QString const &) const
- ?isValid@QElapsedTimer@@QBE_NXZ @ 4442 NONAME ; bool QElapsedTimer::isValid(void) const
- ?makeDecoder@QTextCodec@@QBEPAVQTextDecoder@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4443 NONAME ; class QTextDecoder * QTextCodec::makeDecoder(class QFlags<enum QTextCodec::ConversionFlag>) const
- ?makeEncoder@QTextCodec@@QBEPAVQTextEncoder@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4444 NONAME ; class QTextEncoder * QTextCodec::makeEncoder(class QFlags<enum QTextCodec::ConversionFlag>) const
- ?msecsSinceReference@QElapsedTimer@@QBE_JXZ @ 4445 NONAME ; long long QElapsedTimer::msecsSinceReference(void) const
- ?msecsTo@QElapsedTimer@@QBE_JABV1@@Z @ 4446 NONAME ; long long QElapsedTimer::msecsTo(class QElapsedTimer const &) const
- ?qDecodeDataUrl@@YA?AU?$QPair@VQString@@VQByteArray@@@@ABVQUrl@@@Z @ 4447 NONAME ; struct QPair<class QString, class QByteArray> qDecodeDataUrl(class QUrl const &)
- ?qDetectCPUFeatures@@YAIXZ @ 4448 NONAME ; unsigned int qDetectCPUFeatures(void)
+ ?validCodecs@QTextCodec@@CA_NXZ @ 4419 NONAME ; bool QTextCodec::validCodecs(void)
+ ?clearHistory@QStateMachinePrivate@@QAEXXZ @ 4420 NONAME ; void QStateMachinePrivate::clearHistory(void)
+ ?nativeArguments@QProcess@@QBE?AVQString@@XZ @ 4421 NONAME ; class QString QProcess::nativeArguments(void) const
+ ?detach@QListData@@QAEPAUData@1@H@Z @ 4422 NONAME ; struct QListData::Data * QListData::detach(int)
+ ?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4423 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *, int)
+ ?destroyed@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@@ZA @ 4424 NONAME ; void (*QAbstractDeclarativeData::destroyed)(class QAbstractDeclarativeData *, class QObject *)
+ ??M@YA_NABVQElapsedTimer@@0@Z @ 4425 NONAME ; bool operator<(class QElapsedTimer const &, class QElapsedTimer const &)
+ ?clockType@QElapsedTimer@@SA?AW4ClockType@1@XZ @ 4426 NONAME ; enum QElapsedTimer::ClockType QElapsedTimer::clockType(void)
+ ?isHighSurrogate@QChar@@SA_NI@Z @ 4427 NONAME ; bool QChar::isHighSurrogate(unsigned int)
+ ?start@QElapsedTimer@@QAEXXZ @ 4428 NONAME ; void QElapsedTimer::start(void)
+ ??0QVariant@@QAE@ABVQEasingCurve@@@Z @ 4429 NONAME ; QVariant::QVariant(class QEasingCurve const &)
+ ?isValid@QElapsedTimer@@QBE_NXZ @ 4430 NONAME ; bool QElapsedTimer::isValid(void) const
+ ?qt_metacast@QEventDispatcherSymbian@@UAEPAXPBD@Z @ 4431 NONAME ; void * QEventDispatcherSymbian::qt_metacast(char const *)
+ ?toMSecsSinceEpoch@QDateTime@@QBE_JXZ @ 4432 NONAME ; long long QDateTime::toMSecsSinceEpoch(void) const
+ ?hasExpired@QElapsedTimer@@QBE_N_J@Z @ 4433 NONAME ; bool QElapsedTimer::hasExpired(long long) const
+ ?makeEncoder@QTextCodec@@QBEPAVQTextEncoder@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4434 NONAME ; class QTextEncoder * QTextCodec::makeEncoder(class QFlags<enum QTextCodec::ConversionFlag>) const
+ ??9QElapsedTimer@@QBE_NABV0@@Z @ 4435 NONAME ; bool QElapsedTimer::operator!=(class QElapsedTimer const &) const
+ ?setRawData@QString@@QAEAAV1@PBVQChar@@H@Z @ 4436 NONAME ; class QString & QString::setRawData(class QChar const *, int)
+ ?registerTypedef@QMetaType@@SAHPBDH@Z @ 4437 NONAME ; int QMetaType::registerTypedef(char const *, int)
+ ??8QElapsedTimer@@QBE_NABV0@@Z @ 4438 NONAME ; bool QElapsedTimer::operator==(class QElapsedTimer const &) const
+ ?makeDecoder@QTextCodec@@QBEPAVQTextDecoder@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4439 NONAME ; class QTextDecoder * QTextCodec::makeDecoder(class QFlags<enum QTextCodec::ConversionFlag>) const
+ ?metaObject@QEventDispatcherSymbian@@UBEPBUQMetaObject@@XZ @ 4440 NONAME ; struct QMetaObject const * QEventDispatcherSymbian::metaObject(void) const
+ ?transitions@QState@@QBE?AV?$QList@PAVQAbstractTransition@@@@XZ @ 4441 NONAME ; class QList<class QAbstractTransition *> QState::transitions(void) const
+ ?qDetectCPUFeatures@@YAIXZ @ 4442 NONAME ; unsigned int qDetectCPUFeatures(void)
+ ?isSharedWith@QString@@QBE_NABV1@@Z @ 4443 NONAME ; bool QString::isSharedWith(class QString const &) const
+ ?parentChanged@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@1@ZA @ 4444 NONAME ; void (*QAbstractDeclarativeData::parentChanged)(class QAbstractDeclarativeData *, class QObject *, class QObject *)
+ ?currentMSecsSinceEpoch@QDateTime@@SA_JXZ @ 4445 NONAME ; long long QDateTime::currentMSecsSinceEpoch(void)
+ ?staticMetaObject@QEventDispatcherSymbian@@2UQMetaObject@@B @ 4446 NONAME ; struct QMetaObject const QEventDispatcherSymbian::staticMetaObject
+ ?msecsTo@QElapsedTimer@@QBE_JABV1@@Z @ 4447 NONAME ; long long QElapsedTimer::msecsTo(class QElapsedTimer const &) const
+ ?toEasingCurve@QVariant@@QBE?AVQEasingCurve@@XZ @ 4448 NONAME ; class QEasingCurve QVariant::toEasingCurve(void) const
?registerStreamOperators@QMetaType@@SAXHP6AXAAVQDataStream@@PBX@ZP6AX0PAX@Z@Z @ 4449 NONAME ; void QMetaType::registerStreamOperators(int, void (*)(class QDataStream &, void const *), void (*)(class QDataStream &, void *))
- ?registerTypedef@QMetaType@@SAHPBDH@Z @ 4450 NONAME ; int QMetaType::registerTypedef(char const *, int)
- ?replace@QByteArray@@QAEAAV1@HHPBDH@Z @ 4451 NONAME ; class QByteArray & QByteArray::replace(int, int, char const *, int)
- ?restart@QElapsedTimer@@QAE_JXZ @ 4452 NONAME ; long long QElapsedTimer::restart(void)
- ?secsTo@QElapsedTimer@@QBE_JABV1@@Z @ 4453 NONAME ; long long QElapsedTimer::secsTo(class QElapsedTimer const &) const
- ?setMSecsSinceEpoch@QDateTime@@QAEX_J@Z @ 4454 NONAME ; void QDateTime::setMSecsSinceEpoch(long long)
- ?start@QElapsedTimer@@QAEXXZ @ 4455 NONAME ; void QElapsedTimer::start(void)
- ?toEasingCurve@QVariant@@QBE?AVQEasingCurve@@XZ @ 4456 NONAME ; class QEasingCurve QVariant::toEasingCurve(void) const
- ?toMSecsSinceEpoch@QDateTime@@QBE_JXZ @ 4457 NONAME ; long long QDateTime::toMSecsSinceEpoch(void) const
- ?transitions@QState@@QBE?AV?$QList@PAVQAbstractTransition@@@@XZ @ 4458 NONAME ; class QList<class QAbstractTransition *> QState::transitions(void) const
- ?validCodecs@QTextCodec@@CA_NXZ @ 4459 NONAME ; bool QTextCodec::validCodecs(void)
- ?destroyed@QDeclarativeData@@2P6AXPAV1@PAVQObject@@@ZA @ 4460 NONAME ABSENT ; void (*QDeclarativeData::destroyed)(class QDeclarativeData *, class QObject *)
- ?parentChanged@QDeclarativeData@@2P6AXPAV1@PAVQObject@@1@ZA @ 4461 NONAME ABSENT ; void (*QDeclarativeData::parentChanged)(class QDeclarativeData *, class QObject *, class QObject *)
- ?parentChanged@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@1@ZA @ 4462 NONAME ; void (*QAbstractDeclarativeData::parentChanged)(class QAbstractDeclarativeData *, class QObject *, class QObject *)
- ?destroyed@QAbstractDeclarativeData@@2P6AXPAV1@PAVQObject@@@ZA @ 4463 NONAME ; void (*QAbstractDeclarativeData::destroyed)(class QAbstractDeclarativeData *, class QObject *)
- ?selectThread@QEventDispatcherSymbian@@AAEAAVQSelectThread@@XZ @ 4464 NONAME ; class QSelectThread & QEventDispatcherSymbian::selectThread(void)
- ?setRawData@QByteArray@@QAEAAV1@PBDI@Z @ 4465 NONAME ; class QByteArray & QByteArray::setRawData(char const *, unsigned int)
- ?setRawData@QString@@QAEAAV1@PBVQChar@@H@Z @ 4466 NONAME ; class QString & QString::setRawData(class QChar const *, int)
- ?getStaticMetaObject@QEventDispatcherSymbian@@SAABUQMetaObject@@XZ @ 4467 NONAME ; struct QMetaObject const & QEventDispatcherSymbian::getStaticMetaObject(void)
- ?isHighSurrogate@QChar@@SA_NI@Z @ 4468 NONAME ; bool QChar::isHighSurrogate(unsigned int)
- ?isLowSurrogate@QChar@@SA_NI@Z @ 4469 NONAME ; bool QChar::isLowSurrogate(unsigned int)
- ?metaObject@QEventDispatcherSymbian@@UBEPBUQMetaObject@@XZ @ 4470 NONAME ; struct QMetaObject const * QEventDispatcherSymbian::metaObject(void) const
- ?msecsTo@QDateTime@@QBE_JABV1@@Z @ 4471 NONAME ; long long QDateTime::msecsTo(class QDateTime const &) const
- ?qt_metacall@QEventDispatcherSymbian@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 4472 NONAME ; int QEventDispatcherSymbian::qt_metacall(enum QMetaObject::Call, int, void * *)
- ?qt_metacast@QEventDispatcherSymbian@@UAEPAXPBD@Z @ 4473 NONAME ; void * QEventDispatcherSymbian::qt_metacast(char const *)
- ?requiresSurrogates@QChar@@SA_NI@Z @ 4474 NONAME ; bool QChar::requiresSurrogates(unsigned int)
- ?symbianInit@QCoreApplicationPrivate@@QAEXXZ @ 4475 NONAME ; void QCoreApplicationPrivate::symbianInit(void)
- ?tr@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4476 NONAME ; class QString QEventDispatcherSymbian::tr(char const *, char const *)
- ?tr@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4477 NONAME ; class QString QEventDispatcherSymbian::tr(char const *, char const *, int)
- ?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4478 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *)
- ?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4479 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *, int)
- ?staticMetaObject@QEventDispatcherSymbian@@2UQMetaObject@@B @ 4480 NONAME ; struct QMetaObject const QEventDispatcherSymbian::staticMetaObject
+ ?replace@QByteArray@@QAEAAV1@HHPBDH@Z @ 4450 NONAME ; class QByteArray & QByteArray::replace(int, int, char const *, int)
+ ?elapsed@QElapsedTimer@@QBE_JXZ @ 4451 NONAME ; long long QElapsedTimer::elapsed(void) const
+ ??0QTextEncoder@@QAE@PBVQTextCodec@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4452 NONAME ; QTextEncoder::QTextEncoder(class QTextCodec const *, class QFlags<enum QTextCodec::ConversionFlag>)
+ ??6@YAAAVQDataStream@@AAV0@ABVQEasingCurve@@@Z @ 4453 NONAME ; class QDataStream & operator<<(class QDataStream &, class QEasingCurve const &)
+ ?qDecodeDataUrl@@YA?AU?$QPair@VQString@@VQByteArray@@@@ABVQUrl@@@Z @ 4454 NONAME ; struct QPair<class QString, class QByteArray> qDecodeDataUrl(class QUrl const &)
+ ?trUtf8@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4455 NONAME ; class QString QEventDispatcherSymbian::trUtf8(char const *, char const *)
+ ?setNativeArguments@QProcess@@QAEXABVQString@@@Z @ 4456 NONAME ; void QProcess::setNativeArguments(class QString const &)
+ ?msecsTo@QDateTime@@QBE_JABV1@@Z @ 4457 NONAME ; long long QDateTime::msecsTo(class QDateTime const &) const
+ ?tr@QEventDispatcherSymbian@@SA?AVQString@@PBD0H@Z @ 4458 NONAME ; class QString QEventDispatcherSymbian::tr(char const *, char const *, int)
+ ?setMSecsSinceEpoch@QDateTime@@QAEX_J@Z @ 4459 NONAME ; void QDateTime::setMSecsSinceEpoch(long long)
+ ?tr@QEventDispatcherSymbian@@SA?AVQString@@PBD0@Z @ 4460 NONAME ; class QString QEventDispatcherSymbian::tr(char const *, char const *)
+ ?isSharedWith@QByteArray@@QBE_NABV1@@Z @ 4461 NONAME ; bool QByteArray::isSharedWith(class QByteArray const &) const
+ ?secsTo@QElapsedTimer@@QBE_JABV1@@Z @ 4462 NONAME ; long long QElapsedTimer::secsTo(class QElapsedTimer const &) const
+ ??5@YAAAVQDataStream@@AAV0@AAVQEasingCurve@@@Z @ 4463 NONAME ; class QDataStream & operator>>(class QDataStream &, class QEasingCurve &)
+ ??0QString@@QAE@PBVQChar@@@Z @ 4464 NONAME ; QString::QString(class QChar const *)
+ ?append@QListData@@QAEPAPAXH@Z @ 4465 NONAME ; void * * QListData::append(int)
+ ?getStaticMetaObject@QEventDispatcherSymbian@@SAABUQMetaObject@@XZ @ 4466 NONAME ; struct QMetaObject const & QEventDispatcherSymbian::getStaticMetaObject(void)
+ ?peek@QIODevicePrivate@@UAE?AVQByteArray@@_J@Z @ 4467 NONAME ; class QByteArray QIODevicePrivate::peek(long long)
+ ?detach_grow@QListData@@QAEPAUData@1@PAHH@Z @ 4468 NONAME ; struct QListData::Data * QListData::detach_grow(int *, int)
+ ?symbianInit@QCoreApplicationPrivate@@QAEXXZ @ 4469 NONAME ; void QCoreApplicationPrivate::symbianInit(void)
+ ??0QTextDecoder@@QAE@PBVQTextCodec@@V?$QFlags@W4ConversionFlag@QTextCodec@@@@@Z @ 4470 NONAME ; QTextDecoder::QTextDecoder(class QTextCodec const *, class QFlags<enum QTextCodec::ConversionFlag>)
+ ?requiresSurrogates@QChar@@SA_NI@Z @ 4471 NONAME ; bool QChar::requiresSurrogates(unsigned int)
+ ?isLowSurrogate@QChar@@SA_NI@Z @ 4472 NONAME ; bool QChar::isLowSurrogate(unsigned int)
+ ?qt_metacall@QEventDispatcherSymbian@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 4473 NONAME ; int QEventDispatcherSymbian::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?setRawData@QByteArray@@QAEAAV1@PBDI@Z @ 4474 NONAME ; class QByteArray & QByteArray::setRawData(char const *, unsigned int)
+ ?fromMSecsSinceEpoch@QDateTime@@SA?AV1@_J@Z @ 4475 NONAME ; class QDateTime QDateTime::fromMSecsSinceEpoch(long long)
+ ?invalidate@QElapsedTimer@@QAEXXZ @ 4476 NONAME ; void QElapsedTimer::invalidate(void)
+ ?restart@QElapsedTimer@@QAE_JXZ @ 4477 NONAME ; long long QElapsedTimer::restart(void)
+ ?currentDateTimeUtc@QDateTime@@SA?AV1@XZ @ 4478 NONAME ; class QDateTime QDateTime::currentDateTimeUtc(void)
+ ?isMonotonic@QElapsedTimer@@SA_NXZ @ 4479 NONAME ; bool QElapsedTimer::isMonotonic(void)
+ ?peek@QIODevicePrivate@@UAE_JPAD_J@Z @ 4480 NONAME ; long long QIODevicePrivate::peek(char *, long long)
?textDirection@QLocale@@QBE?AW4LayoutDirection@Qt@@XZ @ 4481 NONAME ; enum Qt::LayoutDirection QLocale::textDirection(void) const
- ?peek@QIODevicePrivate@@UAE_JPAD_J@Z @ 4482 NONAME ; long long QIODevicePrivate::peek(char *, long long)
- ?peek@QIODevicePrivate@@UAE?AVQByteArray@@_J@Z @ 4483 NONAME ; class QByteArray QIODevicePrivate::peek(long long)
- ?nativeArguments@QProcess@@QBE?AVQString@@XZ @ 4484 NONAME ; class QString QProcess::nativeArguments(void) const
- ?setNativeArguments@QProcess@@QAEXABVQString@@@Z @ 4485 NONAME ; void QProcess::setNativeArguments(class QString const &)
+ ?msecsSinceReference@QElapsedTimer@@QBE_JXZ @ 4482 NONAME ; long long QElapsedTimer::msecsSinceReference(void) const
+ ?selectThread@QEventDispatcherSymbian@@AAEAAVQSelectThread@@XZ @ 4483 NONAME ; class QSelectThread & QEventDispatcherSymbian::selectThread(void)
diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def
index 8fdd72c218..480d9fff3e 100644
--- a/src/s60installs/bwins/QtDeclarativeu.def
+++ b/src/s60installs/bwins/QtDeclarativeu.def
@@ -12,7 +12,7 @@ EXPORTS
??0QDeclarativeText@@QAE@PAVQDeclarativeItem@@@Z @ 11 NONAME ; QDeclarativeText::QDeclarativeText(class QDeclarativeItem *)
?trUtf8@QDeclarativePixmapReply@@SA?AVQString@@PBD0H@Z @ 12 NONAME ABSENT ; class QString QDeclarativePixmapReply::trUtf8(char const *, char const *, int)
?propertyTypeName@QDeclarativeProperty@@QBEPBDXZ @ 13 NONAME ; char const * QDeclarativeProperty::propertyTypeName(void) const
- ?wantsFocusChanged@QDeclarativeItem@@IAEX_N@Z @ 14 NONAME ; void QDeclarativeItem::wantsFocusChanged(bool)
+ ?wantsFocusChanged@QDeclarativeItem@@IAEX_N@Z @ 14 NONAME ABSENT ; void QDeclarativeItem::wantsFocusChanged(bool)
?getStaticMetaObject@QDeclarativeDebugService@@SAABUQMetaObject@@XZ @ 15 NONAME ; struct QMetaObject const & QDeclarativeDebugService::getStaticMetaObject(void)
?setLeft@QDeclarativeAnchors@@QAEXABVQDeclarativeAnchorLine@@@Z @ 16 NONAME ; void QDeclarativeAnchors::setLeft(class QDeclarativeAnchorLine const &)
?qt_metacall@QDeclarativeExpression@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 17 NONAME ; int QDeclarativeExpression::qt_metacall(enum QMetaObject::Call, int, void * *)
@@ -61,7 +61,7 @@ EXPORTS
??0QDeclarativeDomObject@@QAE@XZ @ 60 NONAME ; QDeclarativeDomObject::QDeclarativeDomObject(void)
?errors@QDeclarativeDomDocument@@QBE?AV?$QList@VQDeclarativeError@@@@XZ @ 61 NONAME ; class QList<class QDeclarativeError> QDeclarativeDomDocument::errors(void) const
?toChanged@QDeclarativeTransition@@IAEXXZ @ 62 NONAME ; void QDeclarativeTransition::toChanged(void)
- ?registerAutoParentFunction@QDeclarativePrivate@@YAHP6A?AW4AutoParentResult@1@PAVQObject@@0@Z@Z @ 63 NONAME ; int QDeclarativePrivate::registerAutoParentFunction(enum QDeclarativePrivate::AutoParentResult (*)(class QObject *, class QObject *))
+ ?registerAutoParentFunction@QDeclarativePrivate@@YAHP6A?AW4AutoParentResult@1@PAVQObject@@0@Z@Z @ 63 NONAME ABSENT ; int QDeclarativePrivate::registerAutoParentFunction(enum QDeclarativePrivate::AutoParentResult (*)(class QObject *, class QObject *))
?objectOwnership@QDeclarativeEngine@@SA?AW4ObjectOwnership@1@PAVQObject@@@Z @ 64 NONAME ; enum QDeclarativeEngine::ObjectOwnership QDeclarativeEngine::objectOwnership(class QObject *)
??0QDeclarativeDebugWatch@@QAE@PAVQObject@@@Z @ 65 NONAME ; QDeclarativeDebugWatch::QDeclarativeDebugWatch(class QObject *)
?value@QDeclarativePropertyMap@@QBE?AVQVariant@@ABVQString@@@Z @ 66 NONAME ; class QVariant QDeclarativePropertyMap::value(class QString const &) const
@@ -79,7 +79,7 @@ EXPORTS
?isInvalid@QDeclarativeDomValue@@QBE_NXZ @ 78 NONAME ; bool QDeclarativeDomValue::isInvalid(void) const
?trUtf8@QDeclarativeText@@SA?AVQString@@PBD0H@Z @ 79 NONAME ; class QString QDeclarativeText::trUtf8(char const *, char const *, int)
??0QDeclarativeListReference@@QAE@ABV0@@Z @ 80 NONAME ; QDeclarativeListReference::QDeclarativeListReference(class QDeclarativeListReference const &)
- ?registerType@QDeclarativePrivate@@YAHABURegisterInterface@1@@Z @ 81 NONAME ; int QDeclarativePrivate::registerType(struct QDeclarativePrivate::RegisterInterface const &)
+ ?registerType@QDeclarativePrivate@@YAHABURegisterInterface@1@@Z @ 81 NONAME ABSENT ; int QDeclarativePrivate::registerType(struct QDeclarativePrivate::RegisterInterface const &)
?classBegin@QDeclarativeItem@@MAEXXZ @ 82 NONAME ; void QDeclarativeItem::classBegin(void)
?setTransformOrigin@QDeclarativeItem@@QAEXW4TransformOrigin@1@@Z @ 83 NONAME ; void QDeclarativeItem::setTransformOrigin(enum QDeclarativeItem::TransformOrigin)
?request@QDeclarativePixmapCache@@SAPAVQDeclarativePixmapReply@@PAVQDeclarativeEngine@@ABVQUrl@@HH@Z @ 84 NONAME ABSENT ; class QDeclarativePixmapReply * QDeclarativePixmapCache::request(class QDeclarativeEngine *, class QUrl const &, int, int)
@@ -265,7 +265,7 @@ EXPORTS
?readyRead@QPacketProtocol@@IAEXXZ @ 264 NONAME ; void QPacketProtocol::readyRead(void)
?qt_metacall@QDeclarativeValueType@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 265 NONAME ; int QDeclarativeValueType::qt_metacall(enum QMetaObject::Call, int, void * *)
?propertyType@QDeclarativePropertyPrivate@@QBEHXZ @ 266 NONAME ; int QDeclarativePropertyPrivate::propertyType(void) const
- ?engine@QDeclarativeView@@QAEPAVQDeclarativeEngine@@XZ @ 267 NONAME ; class QDeclarativeEngine * QDeclarativeView::engine(void)
+ ?engine@QDeclarativeView@@QAEPAVQDeclarativeEngine@@XZ @ 267 NONAME ABSENT ; class QDeclarativeEngine * QDeclarativeView::engine(void)
?inputMethodQuery@QDeclarativeItem@@MBE?AVQVariant@@W4InputMethodQuery@Qt@@@Z @ 268 NONAME ; class QVariant QDeclarativeItem::inputMethodQuery(enum Qt::InputMethodQuery) const
?sizeHint@QDeclarativeView@@UBE?AVQSize@@XZ @ 269 NONAME ; class QSize QDeclarativeView::sizeHint(void) const
?flags@QDeclarativeCustomParser@@QBE?AV?$QFlags@W4Flag@QDeclarativeCustomParser@@@@XZ @ 270 NONAME ; class QFlags<enum QDeclarativeCustomParser::Flag> QDeclarativeCustomParser::flags(void) const
@@ -409,7 +409,7 @@ EXPORTS
?addRef@QDeclarativePixmapReply@@AAEXXZ @ 408 NONAME ABSENT ; void QDeclarativePixmapReply::addRef(void)
?mouseReleaseEvent@QDeclarativeText@@MAEXPAVQGraphicsSceneMouseEvent@@@Z @ 409 NONAME ; void QDeclarativeText::mouseReleaseEvent(class QGraphicsSceneMouseEvent *)
?isCustomType@QDeclarativeDomObject@@QBE_NXZ @ 410 NONAME ; bool QDeclarativeDomObject::isCustomType(void) const
- ?registerType@QDeclarativePrivate@@YAHABURegisterType@1@@Z @ 411 NONAME ; int QDeclarativePrivate::registerType(struct QDeclarativePrivate::RegisterType const &)
+ ?registerType@QDeclarativePrivate@@YAHABURegisterType@1@@Z @ 411 NONAME ABSENT ; int QDeclarativePrivate::registerType(struct QDeclarativePrivate::RegisterType const &)
?radius@QDeclarativeRectangle@@QBEMXZ @ 412 NONAME ; float QDeclarativeRectangle::radius(void) const
??0QDeclarativeComponent@@AAE@PAVQDeclarativeEngine@@PAVQDeclarativeCompiledData@@HHPAVQObject@@@Z @ 413 NONAME ; QDeclarativeComponent::QDeclarativeComponent(class QDeclarativeEngine *, class QDeclarativeCompiledData *, int, int, class QObject *)
?resources_count@QDeclarativeItemPrivate@@SAHPAV?$QDeclarativeListProperty@VQObject@@@@@Z @ 414 NONAME ; int QDeclarativeItemPrivate::resources_count(class QDeclarativeListProperty<class QObject> *)
@@ -813,7 +813,7 @@ EXPORTS
??0QDeclarativeView@@QAE@ABVQUrl@@PAVQWidget@@@Z @ 812 NONAME ; QDeclarativeView::QDeclarativeView(class QUrl const &, class QWidget *)
?qt_metacall@QDeclarativePixmapReply@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 813 NONAME ABSENT ; int QDeclarativePixmapReply::qt_metacall(enum QMetaObject::Call, int, void * *)
?valueChanged@QDeclarativeExpression@@IAEXXZ @ 814 NONAME ; void QDeclarativeExpression::valueChanged(void)
- ?childrenChanged@QDeclarativeItem@@IAEXXZ @ 815 NONAME ; void QDeclarativeItem::childrenChanged(void)
+ ?childrenChanged@QDeclarativeItem@@IAEXXZ @ 815 NONAME ABSENT ; void QDeclarativeItem::childrenChanged(void)
??_EQDeclarativeView@@UAE@I@Z @ 816 NONAME ; QDeclarativeView::~QDeclarativeView(unsigned int)
?trUtf8@QDeclarativeStateGroup@@SA?AVQString@@PBD0H@Z @ 817 NONAME ; class QString QDeclarativeStateGroup::trUtf8(char const *, char const *, int)
?tag@QMetaMethodBuilder@@QBE?AVQByteArray@@XZ @ 818 NONAME ; class QByteArray QMetaMethodBuilder::tag(void) const
@@ -877,7 +877,7 @@ EXPORTS
?setWidth@QDeclarativeItemPrivate@@UAEXM@Z @ 876 NONAME ; void QDeclarativeItemPrivate::setWidth(float)
?staticMetaObject@QDeclarativeDebugWatch@@2UQMetaObject@@B @ 877 NONAME ; struct QMetaObject const QDeclarativeDebugWatch::staticMetaObject
??_EQDeclarativeContext@@UAE@I@Z @ 878 NONAME ; QDeclarativeContext::~QDeclarativeContext(unsigned int)
- ?rootContext@QDeclarativeView@@QAEPAVQDeclarativeContext@@XZ @ 879 NONAME ; class QDeclarativeContext * QDeclarativeView::rootContext(void)
+ ?rootContext@QDeclarativeView@@QAEPAVQDeclarativeContext@@XZ @ 879 NONAME ABSENT ; class QDeclarativeContext * QDeclarativeView::rootContext(void)
?staticMetaObject@QDeclarativeDebugQuery@@2UQMetaObject@@B @ 880 NONAME ; struct QMetaObject const QDeclarativeDebugQuery::staticMetaObject
??0QDeclarativeExtensionPlugin@@QAE@PAVQObject@@@Z @ 881 NONAME ; QDeclarativeExtensionPlugin::QDeclarativeExtensionPlugin(class QObject *)
??_EQDeclarativeOpenMetaObject@@UAE@I@Z @ 882 NONAME ; QDeclarativeOpenMetaObject::~QDeclarativeOpenMetaObject(unsigned int)
@@ -1077,7 +1077,7 @@ EXPORTS
??1QDeclarativeEngine@@UAE@XZ @ 1076 NONAME ; QDeclarativeEngine::~QDeclarativeEngine(void)
?debugId@QDeclarativeDebugContextReference@@QBEHXZ @ 1077 NONAME ; int QDeclarativeDebugContextReference::debugId(void) const
?propertyNameParts@QDeclarativeDomProperty@@QBE?AV?$QList@VQByteArray@@@@XZ @ 1078 NONAME ; class QList<class QByteArray> QDeclarativeDomProperty::propertyNameParts(void) const
- ?rootContext@QDeclarativeEngine@@QAEPAVQDeclarativeContext@@XZ @ 1079 NONAME ; class QDeclarativeContext * QDeclarativeEngine::rootContext(void)
+ ?rootContext@QDeclarativeEngine@@QAEPAVQDeclarativeContext@@XZ @ 1079 NONAME ABSENT ; class QDeclarativeContext * QDeclarativeEngine::rootContext(void)
?resetWidth@QDeclarativeItemPrivate@@UAEXXZ @ 1080 NONAME ; void QDeclarativeItemPrivate::resetWidth(void)
??AQDeclarativeOpenMetaObject@@QAEAAVQVariant@@ABVQByteArray@@@Z @ 1081 NONAME ; class QVariant & QDeclarativeOpenMetaObject::operator[](class QByteArray const &)
?bottom@QDeclarativeItemPrivate@@QBE?AVQDeclarativeAnchorLine@@XZ @ 1082 NONAME ; class QDeclarativeAnchorLine QDeclarativeItemPrivate::bottom(void) const
@@ -1182,7 +1182,7 @@ EXPORTS
??_EQDeclarativeEngineDebug@@UAE@I@Z @ 1181 NONAME ; QDeclarativeEngineDebug::~QDeclarativeEngineDebug(unsigned int)
?bottom@QDeclarativeScaleGrid@@QBEHXZ @ 1182 NONAME ; int QDeclarativeScaleGrid::bottom(void) const
?d_func@QDeclarativePropertyMap@@AAEPAVQDeclarativePropertyMapPrivate@@XZ @ 1183 NONAME ; class QDeclarativePropertyMapPrivate * QDeclarativePropertyMap::d_func(void)
- ?forceFocus@QDeclarativeItem@@QAEXXZ @ 1184 NONAME ; void QDeclarativeItem::forceFocus(void)
+ ?forceFocus@QDeclarativeItem@@QAEXXZ @ 1184 NONAME ABSENT ; void QDeclarativeItem::forceFocus(void)
?trUtf8@QDeclarativeView@@SA?AVQString@@PBD0@Z @ 1185 NONAME ; class QString QDeclarativeView::trUtf8(char const *, char const *)
??0QDeclarativeTransition@@QAE@PAVQObject@@@Z @ 1186 NONAME ; QDeclarativeTransition::QDeclarativeTransition(class QObject *)
?horizontalCenter@QDeclarativeAnchors@@QBE?AVQDeclarativeAnchorLine@@XZ @ 1187 NONAME ; class QDeclarativeAnchorLine QDeclarativeAnchors::horizontalCenter(void) const
@@ -1442,7 +1442,7 @@ EXPORTS
?drawRect@QDeclarativeRectangle@@AAEXAAVQPainter@@@Z @ 1441 NONAME ; void QDeclarativeRectangle::drawRect(class QPainter &)
?read@QDeclarativeProperty@@QBE?AVQVariant@@XZ @ 1442 NONAME ; class QVariant QDeclarativeProperty::read(void) const
?isEmpty@QDeclarativePropertyMap@@QBE_NXZ @ 1443 NONAME ; bool QDeclarativePropertyMap::isEmpty(void) const
- ?wantsFocus@QDeclarativeItem@@QBE_NXZ @ 1444 NONAME ; bool QDeclarativeItem::wantsFocus(void) const
+ ?wantsFocus@QDeclarativeItem@@QBE_NXZ @ 1444 NONAME ABSENT ; bool QDeclarativeItem::wantsFocus(void) const
??6@YAAAVQDataStream@@AAV0@ABUQDeclarativeObjectData@QDeclarativeEngineDebugServer@@@Z @ 1445 NONAME ; class QDataStream & operator<<(class QDataStream &, struct QDeclarativeEngineDebugServer::QDeclarativeObjectData const &)
?trUtf8@QDeclarativeDebugObjectQuery@@SA?AVQString@@PBD0H@Z @ 1446 NONAME ; class QString QDeclarativeDebugObjectQuery::trUtf8(char const *, char const *, int)
??0QDeclarativeBinding@@QAE@ABVQString@@PAVQObject@@PAVQDeclarativeContext@@1@Z @ 1447 NONAME ; QDeclarativeBinding::QDeclarativeBinding(class QString const &, class QObject *, class QDeclarativeContext *, class QObject *)
@@ -1676,4 +1676,12 @@ EXPORTS
??0QDeclarativeImageProvider@@QAE@W4ImageType@0@@Z @ 1675 NONAME ; QDeclarativeImageProvider::QDeclarativeImageProvider(enum QDeclarativeImageProvider::ImageType)
?setMethodBody@QDeclarativeEngineDebug@@QAE_NHABVQString@@0@Z @ 1676 NONAME ; bool QDeclarativeEngineDebug::setMethodBody(int, class QString const &, class QString const &)
?resetBindingForObject@QDeclarativeEngineDebug@@QAE_NHABVQString@@@Z @ 1677 NONAME ; bool QDeclarativeEngineDebug::resetBindingForObject(int, class QString const &)
+ ?forceActiveFocus@QDeclarativeItem@@QAEXXZ @ 1678 NONAME ; void QDeclarativeItem::forceActiveFocus(void)
+ ?activeFocusChanged@QDeclarativeItem@@IAEX_N@Z @ 1679 NONAME ; void QDeclarativeItem::activeFocusChanged(bool)
+ ?focusScopeItemChange@QDeclarativeItemPrivate@@UAEX_N@Z @ 1680 NONAME ; void QDeclarativeItemPrivate::focusScopeItemChange(bool)
+ ?hasActiveFocus@QDeclarativeItem@@QBE_NXZ @ 1681 NONAME ; bool QDeclarativeItem::hasActiveFocus(void) const
+ ?engine@QDeclarativeView@@QBEPAVQDeclarativeEngine@@XZ @ 1682 NONAME ; class QDeclarativeEngine * QDeclarativeView::engine(void) const
+ ?rootContext@QDeclarativeView@@QBEPAVQDeclarativeContext@@XZ @ 1683 NONAME ; class QDeclarativeContext * QDeclarativeView::rootContext(void) const
+ ?rootContext@QDeclarativeEngine@@QBEPAVQDeclarativeContext@@XZ @ 1684 NONAME ; class QDeclarativeContext * QDeclarativeEngine::rootContext(void) const
+ ?qmlregister@QDeclarativePrivate@@YAHW4RegistrationType@1@PAX@Z @ 1685 NONAME ; int QDeclarativePrivate::qmlregister(enum QDeclarativePrivate::RegistrationType, void *)
diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def
index 296901de51..78446885c6 100644
--- a/src/s60installs/bwins/QtGuiu.def
+++ b/src/s60installs/bwins/QtGuiu.def
@@ -2645,7 +2645,7 @@ EXPORTS
?childItems@QGraphicsItem@@QBE?AV?$QList@PAVQGraphicsItem@@@@XZ @ 2644 NONAME ; class QList<class QGraphicsItem *> QGraphicsItem::childItems(void) const
?children@QGraphicsItem@@QBE?AV?$QList@PAVQGraphicsItem@@@@XZ @ 2645 NONAME ; class QList<class QGraphicsItem *> QGraphicsItem::children(void) const
?childrenBoundingRect@QGraphicsItem@@QBE?AVQRectF@@XZ @ 2646 NONAME ; class QRectF QGraphicsItem::childrenBoundingRect(void) const
- ?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@@Z @ 2647 NONAME ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *)
+ ?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@@Z @ 2647 NONAME ABSENT ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *)
?childrenCheckState@QTreeWidgetItem@@ABE?AVQVariant@@H@Z @ 2648 NONAME ; class QVariant QTreeWidgetItem::childrenCheckState(int) const
?childrenClippedToShape@QGraphicsItemPrivate@@QBE_NXZ @ 2649 NONAME ; bool QGraphicsItemPrivate::childrenClippedToShape(void) const
?childrenCollapsible@QSplitter@@QBE_NXZ @ 2650 NONAME ; bool QSplitter::childrenCollapsible(void) const
@@ -12372,7 +12372,7 @@ EXPORTS
?staticMetaObject@QBoxLayout@@2UQMetaObject@@B @ 12371 NONAME ; struct QMetaObject const QBoxLayout::staticMetaObject
?qt_tab_all_widgets@@3_NA @ 12372 NONAME ; bool qt_tab_all_widgets
?staticMetaObject@QSpinBox@@2UQMetaObject@@B @ 12373 NONAME ; struct QMetaObject const QSpinBox::staticMetaObject
- ?scanCodeCache@QApplicationPrivate@@0V?$QHash@HI@@A @ 12374 NONAME ; class QHash<int, unsigned int> QApplicationPrivate::scanCodeCache
+ ?scanCodeCache@QApplicationPrivate@@0V?$QHash@HI@@A @ 12374 NONAME ABSENT ; class QHash<int, unsigned int> QApplicationPrivate::scanCodeCache
?staticMetaObject@QItemSelectionModel@@2UQMetaObject@@B @ 12375 NONAME ; struct QMetaObject const QItemSelectionModel::staticMetaObject
?staticMetaObject@QItemDelegate@@2UQMetaObject@@B @ 12376 NONAME ; struct QMetaObject const QItemDelegate::staticMetaObject
?staticMetaObject@QPushButton@@2UQMetaObject@@B @ 12377 NONAME ; struct QMetaObject const QPushButton::staticMetaObject
@@ -12879,4 +12879,11 @@ EXPORTS
?PreDocConstructL@QS60MainApplication@@UAEXXZ @ 12878 NONAME ; void QS60MainApplication::PreDocConstructL(void)
?NewAppServerL@QS60MainApplication@@UAEXAAPAVCApaAppServer@@@Z @ 12879 NONAME ; void QS60MainApplication::NewAppServerL(class CApaAppServer * &)
?HandleViewDeactivation@QS60MainAppUi@@UAEXABVTVwsViewId@@0@Z @ 12880 NONAME ; void QS60MainAppUi::HandleViewDeactivation(class TVwsViewId const &, class TVwsViewId const &)
+ ?timeout@QTapAndHoldGesture@@SAHXZ @ 12881 NONAME ; int QTapAndHoldGesture::timeout(void)
+ ?focusScopeItemChange@QGraphicsItemPrivate@@UAEX_N@Z @ 12882 NONAME ; void QGraphicsItemPrivate::focusScopeItemChange(bool)
+ ?setTimeout@QTapAndHoldGesture@@SAXH@Z @ 12883 NONAME ; void QTapAndHoldGesture::setTimeout(int)
+ ?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@_N@Z @ 12884 NONAME ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *, bool)
+ ?zScaleChanged@QGraphicsScale@@IAEXXZ @ 12885 NONAME ; void QGraphicsScale::zScaleChanged(void)
+ ?xScaleChanged@QGraphicsScale@@IAEXXZ @ 12886 NONAME ; void QGraphicsScale::xScaleChanged(void)
+ ?yScaleChanged@QGraphicsScale@@IAEXXZ @ 12887 NONAME ; void QGraphicsScale::yScaleChanged(void)
diff --git a/src/s60installs/bwins/QtNetworku.def b/src/s60installs/bwins/QtNetworku.def
index 9d4507bc43..48af60cbfc 100644
--- a/src/s60installs/bwins/QtNetworku.def
+++ b/src/s60installs/bwins/QtNetworku.def
@@ -962,186 +962,185 @@ 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 ABSENT ; void QNetworkAccessManager::networkAccessChanged(bool)
- ?networkAccessEnabled@QNetworkAccessManager@@QBE_NXZ @ 1049 NONAME ABSENT ; bool QNetworkAccessManager::networkAccessEnabled(void) const
- ?networkSessionOnline@QNetworkAccessManager@@IAEXXZ @ 1050 NONAME ABSENT ; 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 ABSENT ; 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
- ?allConfigurations@QNetworkConfigurationManagerPrivate@@QAE?AV?$QList@VQNetworkConfiguration@@@@V?$QFlags@W4StateFlag@QNetworkConfiguration@@@@@Z @ 1128 NONAME ; class QList<class QNetworkConfiguration> QNetworkConfigurationManagerPrivate::allConfigurations(class QFlags<enum QNetworkConfiguration::StateFlag>)
- ?configurationFromIdentifier@QNetworkConfigurationManagerPrivate@@QAE?AVQNetworkConfiguration@@ABVQString@@@Z @ 1129 NONAME ; class QNetworkConfiguration QNetworkConfigurationManagerPrivate::configurationFromIdentifier(class QString const &)
- ?configurationsInUse@QBearerEngine@@QBE_NXZ @ 1130 NONAME ; bool QBearerEngine::configurationsInUse(void) const
- ?defaultConfiguration@QNetworkConfigurationManagerPrivate@@QAE?AVQNetworkConfiguration@@XZ @ 1131 NONAME ; class QNetworkConfiguration QNetworkConfigurationManagerPrivate::defaultConfiguration(void)
- ?disablePolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1132 NONAME ; void QNetworkConfigurationManagerPrivate::disablePolling(void)
- ?enablePolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1133 NONAME ; void QNetworkConfigurationManagerPrivate::enablePolling(void)
- ?isOnline@QNetworkConfigurationManagerPrivate@@QAE_NXZ @ 1134 NONAME ; bool QNetworkConfigurationManagerPrivate::isOnline(void)
- ?networkAccessible@QNetworkAccessManager@@QBE?AW4NetworkAccessibility@1@XZ @ 1135 NONAME ; enum QNetworkAccessManager::NetworkAccessibility QNetworkAccessManager::networkAccessible(void) const
- ?networkAccessibleChanged@QNetworkAccessManager@@IAEXW4NetworkAccessibility@1@@Z @ 1136 NONAME ; void QNetworkAccessManager::networkAccessibleChanged(enum QNetworkAccessManager::NetworkAccessibility)
- ?networkSessionConnected@QNetworkAccessManager@@IAEXXZ @ 1137 NONAME ; void QNetworkAccessManager::networkSessionConnected(void)
- ?pollEngines@QNetworkConfigurationManagerPrivate@@AAEXXZ @ 1138 NONAME ; void QNetworkConfigurationManagerPrivate::pollEngines(void)
- ?qt_qhostinfo_clear_cache@@YAXXZ @ 1139 NONAME ABSENT ; void qt_qhostinfo_clear_cache(void)
- ?qt_qhostinfo_lookup@@YA?AVQHostInfo@@ABVQString@@PAVQObject@@PBDPA_NPAH@Z @ 1140 NONAME ; class QHostInfo qt_qhostinfo_lookup(class QString const &, class QObject *, char const *, bool *, int *)
- ?requiresPolling@QBearerEngine@@UBE_NXZ @ 1141 NONAME ; bool QBearerEngine::requiresPolling(void) const
+ ?qt_qhostinfo_clear_cache@@YAXXZ @ 964 NONAME ABSENT ; void qt_qhostinfo_clear_cache(void)
+ ?qt_qhostinfo_lookup@@YA?AVQHostInfo@@ABVQString@@PAVQObject@@PBDPA_NPAH@Z @ 965 NONAME ; class QHostInfo qt_qhostinfo_lookup(class QString const &, class QObject *, char const *, bool *, int *)
+ ?rawHeaderPairs@QNetworkReply@@QBEABV?$QList@U?$QPair@VQByteArray@@V1@@@@@XZ @ 966 NONAME ; class QList<struct QPair<class QByteArray, class QByteArray> > const & QNetworkReply::rawHeaderPairs(void) const
+ ?tr@QBearerEnginePlugin@@SA?AVQString@@PBD0H@Z @ 967 NONAME ; class QString QBearerEnginePlugin::tr(char const *, char const *, int)
+ ?qt_metacall@QNetworkConfigurationManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 968 NONAME ; int QNetworkConfigurationManager::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?configurationAdded@QNetworkConfigurationManagerPrivate@@AAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 969 NONAME ; void QNetworkConfigurationManagerPrivate::configurationAdded(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?metaObject@QNetworkConfigurationManagerPrivate@@UBEPBUQMetaObject@@XZ @ 970 NONAME ; struct QMetaObject const * QNetworkConfigurationManagerPrivate::metaObject(void) const
+ ??1QBearerEngineFactoryInterface@@UAE@XZ @ 971 NONAME ; QBearerEngineFactoryInterface::~QBearerEngineFactoryInterface(void)
+ ?setConfiguration@QNetworkAccessManager@@QAEXABVQNetworkConfiguration@@@Z @ 972 NONAME ; void QNetworkAccessManager::setConfiguration(class QNetworkConfiguration const &)
+ ?identifier@QNetworkConfiguration@@QBE?AVQString@@XZ @ 973 NONAME ; class QString QNetworkConfiguration::identifier(void) const
+ ??0QBearerEngine@@QAE@PAVQObject@@@Z @ 974 NONAME ; QBearerEngine::QBearerEngine(class QObject *)
+ ?isRoamingAvailable@QNetworkConfiguration@@QBE_NXZ @ 975 NONAME ; bool QNetworkConfiguration::isRoamingAvailable(void) const
+ ?quitPendingWaitsForOpened@QNetworkSessionPrivate@@IAEXXZ @ 976 NONAME ; void QNetworkSessionPrivate::quitPendingWaitsForOpened(void)
+ ?trUtf8@QNetworkSessionPrivate@@SA?AVQString@@PBD0H@Z @ 977 NONAME ; class QString QNetworkSessionPrivate::trUtf8(char const *, char const *, int)
+ ?setPrivateConfiguration@QNetworkSessionPrivate@@IBEXAAVQNetworkConfiguration@@V?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 978 NONAME ; void QNetworkSessionPrivate::setPrivateConfiguration(class QNetworkConfiguration &, class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>) const
+ ?trUtf8@QNetworkConfigurationManager@@SA?AVQString@@PBD0H@Z @ 979 NONAME ; class QString QNetworkConfigurationManager::trUtf8(char const *, char const *, int)
+ ?stateChanged@QNetworkSession@@IAEXW4State@1@@Z @ 980 NONAME ; void QNetworkSession::stateChanged(enum QNetworkSession::State)
+ ??1QNetworkConfigurationManagerPrivate@@UAE@XZ @ 981 NONAME ; QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate(void)
+ ?getStaticMetaObject@QBearerEnginePlugin@@SAABUQMetaObject@@XZ @ 982 NONAME ; struct QMetaObject const & QBearerEnginePlugin::getStaticMetaObject(void)
+ ?getStaticMetaObject@QNetworkConfigurationManagerPrivate@@SAABUQMetaObject@@XZ @ 983 NONAME ; struct QMetaObject const & QNetworkConfigurationManagerPrivate::getStaticMetaObject(void)
+ ??_EQNetworkConfigurationManagerPrivate@@UAE@I@Z @ 984 NONAME ; QNetworkConfigurationManagerPrivate::~QNetworkConfigurationManagerPrivate(unsigned int)
+ ?metaObject@QBearerEnginePlugin@@UBEPBUQMetaObject@@XZ @ 985 NONAME ; struct QMetaObject const * QBearerEnginePlugin::metaObject(void) const
+ ??4QNetworkConfiguration@@QAEAAV0@ABV0@@Z @ 986 NONAME ; class QNetworkConfiguration & QNetworkConfiguration::operator=(class QNetworkConfiguration const &)
+ ?metaObject@QBearerEngine@@UBEPBUQMetaObject@@XZ @ 987 NONAME ; struct QMetaObject const * QBearerEngine::metaObject(void) const
+ ?getStaticMetaObject@QBearerEngine@@SAABUQMetaObject@@XZ @ 988 NONAME ; struct QMetaObject const & QBearerEngine::getStaticMetaObject(void)
+ ?waitForOpened@QNetworkSession@@QAE_NH@Z @ 989 NONAME ; bool QNetworkSession::waitForOpened(int)
+ ??_EQBearerEngine@@UAE@I@Z @ 990 NONAME ; QBearerEngine::~QBearerEngine(unsigned int)
+ ?error@QNetworkSession@@IAEXW4SessionError@1@@Z @ 991 NONAME ; void QNetworkSession::error(enum QNetworkSession::SessionError)
+ ?stop@QNetworkSession@@QAEXXZ @ 992 NONAME ; void QNetworkSession::stop(void)
+ ?accept@QNetworkSession@@QAEXXZ @ 993 NONAME ; void QNetworkSession::accept(void)
+ ?qNetworkConfigurationManagerPrivate@@YAPAVQNetworkConfigurationManagerPrivate@@XZ @ 994 NONAME ; class QNetworkConfigurationManagerPrivate * qNetworkConfigurationManagerPrivate(void)
+ ?open@QNetworkSession@@QAEXXZ @ 995 NONAME ; void QNetworkSession::open(void)
+ ?newConfigurationActivated@QNetworkSession@@IAEXXZ @ 996 NONAME ; void QNetworkSession::newConfigurationActivated(void)
+ ?staticMetaObject@QNetworkSessionPrivate@@2UQMetaObject@@B @ 997 NONAME ; struct QMetaObject const QNetworkSessionPrivate::staticMetaObject
+ ?error@QNetworkSession@@QBE?AW4SessionError@1@XZ @ 998 NONAME ; enum QNetworkSession::SessionError QNetworkSession::error(void) const
+ ?qt_metacast@QBearerEngine@@UAEPAXPBD@Z @ 999 NONAME ; void * QBearerEngine::qt_metacast(char const *)
+ ?staticMetaObject@QNetworkSession@@2UQMetaObject@@B @ 1000 NONAME ; struct QMetaObject const QNetworkSession::staticMetaObject
+ ?trUtf8@QBearerEngine@@SA?AVQString@@PBD0@Z @ 1001 NONAME ; class QString QBearerEngine::trUtf8(char const *, char const *)
+ ?privateConfiguration@QNetworkSessionPrivate@@IBE?AV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@ABVQNetworkConfiguration@@@Z @ 1002 NONAME ; class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate> QNetworkSessionPrivate::privateConfiguration(class QNetworkConfiguration const &) const
+ ?isOnline@QNetworkConfigurationManagerPrivate@@QAE_NXZ @ 1003 NONAME ; bool QNetworkConfigurationManagerPrivate::isOnline(void)
+ ?state@QNetworkConfiguration@@QBE?AV?$QFlags@W4StateFlag@QNetworkConfiguration@@@@XZ @ 1004 NONAME ; class QFlags<enum QNetworkConfiguration::StateFlag> QNetworkConfiguration::state(void) const
+ ?configurationAdded@QNetworkConfigurationManagerPrivate@@IAEXABVQNetworkConfiguration@@@Z @ 1005 NONAME ; void QNetworkConfigurationManagerPrivate::configurationAdded(class QNetworkConfiguration const &)
+ ?defaultConfiguration@QNetworkConfigurationManager@@QBE?AVQNetworkConfiguration@@XZ @ 1006 NONAME ; class QNetworkConfiguration QNetworkConfigurationManager::defaultConfiguration(void) const
+ ?bytesReceived@QNetworkSession@@QBE_KXZ @ 1007 NONAME ; unsigned long long QNetworkSession::bytesReceived(void) const
+ ?updateConfigurations@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1008 NONAME ; void QNetworkConfigurationManagerPrivate::updateConfigurations(void)
+ ?errorString@QNetworkSession@@QBE?AVQString@@XZ @ 1009 NONAME ; class QString QNetworkSession::errorString(void) const
+ ?tr@QNetworkSession@@SA?AVQString@@PBD0H@Z @ 1010 NONAME ; class QString QNetworkSession::tr(char const *, char const *, int)
+ ??1QNetworkConfigurationManager@@UAE@XZ @ 1011 NONAME ; QNetworkConfigurationManager::~QNetworkConfigurationManager(void)
+ ?isOpen@QNetworkSession@@QBE_NXZ @ 1012 NONAME ; bool QNetworkSession::isOpen(void) const
+ ?configurationChanged@QNetworkConfigurationManager@@IAEXABVQNetworkConfiguration@@@Z @ 1013 NONAME ; void QNetworkConfigurationManager::configurationChanged(class QNetworkConfiguration const &)
+ ?configurationChanged@QNetworkConfigurationManagerPrivate@@AAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1014 NONAME ; void QNetworkConfigurationManagerPrivate::configurationChanged(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?configurationRemoved@QBearerEngine@@IAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1015 NONAME ; void QBearerEngine::configurationRemoved(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?qt_metacall@QBearerEnginePlugin@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1016 NONAME ; int QBearerEnginePlugin::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??0QBearerEnginePlugin@@QAE@PAVQObject@@@Z @ 1017 NONAME ; QBearerEnginePlugin::QBearerEnginePlugin(class QObject *)
+ ?trUtf8@QNetworkSession@@SA?AVQString@@PBD0@Z @ 1018 NONAME ; class QString QNetworkSession::trUtf8(char const *, char const *)
+ ?metaObject@QNetworkSessionPrivate@@UBEPBUQMetaObject@@XZ @ 1019 NONAME ; struct QMetaObject const * QNetworkSessionPrivate::metaObject(void) const
+ ??_EQNetworkConfigurationManager@@UAE@I@Z @ 1020 NONAME ; QNetworkConfigurationManager::~QNetworkConfigurationManager(unsigned int)
+ ?trUtf8@QNetworkSessionPrivate@@SA?AVQString@@PBD0@Z @ 1021 NONAME ; class QString QNetworkSessionPrivate::trUtf8(char const *, char const *)
+ ?bearerName@QNetworkConfiguration@@QBE?AVQString@@XZ @ 1022 NONAME ; class QString QNetworkConfiguration::bearerName(void) const
+ ?trUtf8@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0H@Z @ 1023 NONAME ; class QString QNetworkConfigurationManagerPrivate::trUtf8(char const *, char const *, int)
+ ?setSessionProperty@QNetworkSession@@QAEXABVQString@@ABVQVariant@@@Z @ 1024 NONAME ; void QNetworkSession::setSessionProperty(class QString const &, class QVariant const &)
+ ?qt_metacall@QNetworkSession@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1025 NONAME ; int QNetworkSession::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?staticMetaObject@QBearerEngine@@2UQMetaObject@@B @ 1026 NONAME ; struct QMetaObject const QBearerEngine::staticMetaObject
+ ?networkSessionConnected@QNetworkAccessManager@@IAEXXZ @ 1027 NONAME ; void QNetworkAccessManager::networkSessionConnected(void)
+ ??1QBearerEngine@@UAE@XZ @ 1028 NONAME ; QBearerEngine::~QBearerEngine(void)
+ ?capabilities@QNetworkConfigurationManagerPrivate@@QAE?AV?$QFlags@W4Capability@QNetworkConfigurationManager@@@@XZ @ 1029 NONAME ; class QFlags<enum QNetworkConfigurationManager::Capability> QNetworkConfigurationManagerPrivate::capabilities(void)
+ ??1QNetworkConfiguration@@QAE@XZ @ 1030 NONAME ; QNetworkConfiguration::~QNetworkConfiguration(void)
+ ??0QNetworkConfigurationManagerPrivate@@QAE@XZ @ 1031 NONAME ; QNetworkConfigurationManagerPrivate::QNetworkConfigurationManagerPrivate(void)
+ ?preferredConfigurationChanged@QNetworkSession@@IAEXABVQNetworkConfiguration@@_N@Z @ 1032 NONAME ; void QNetworkSession::preferredConfigurationChanged(class QNetworkConfiguration const &, bool)
+ ?isValid@QNetworkConfiguration@@QBE_NXZ @ 1033 NONAME ; bool QNetworkConfiguration::isValid(void) const
+ ?configurationAdded@QBearerEngine@@IAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1034 NONAME ; void QBearerEngine::configurationAdded(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ??1QNetworkSession@@UAE@XZ @ 1035 NONAME ; QNetworkSession::~QNetworkSession(void)
+ ?qt_metacast@QBearerEnginePlugin@@UAEPAXPBD@Z @ 1036 NONAME ; void * QBearerEnginePlugin::qt_metacast(char const *)
+ ??0QNetworkSession@@QAE@ABVQNetworkConfiguration@@PAVQObject@@@Z @ 1037 NONAME ; QNetworkSession::QNetworkSession(class QNetworkConfiguration const &, class QObject *)
+ ?error@QNetworkSessionPrivate@@IAEXW4SessionError@QNetworkSession@@@Z @ 1038 NONAME ; void QNetworkSessionPrivate::error(enum QNetworkSession::SessionError)
+ ?name@QNetworkConfiguration@@QBE?AVQString@@XZ @ 1039 NONAME ; class QString QNetworkConfiguration::name(void) const
+ ?close@QNetworkSession@@QAEXXZ @ 1040 NONAME ; void QNetworkSession::close(void)
+ ?sessionProperty@QNetworkSession@@QBE?AVQVariant@@ABVQString@@@Z @ 1041 NONAME ; class QVariant QNetworkSession::sessionProperty(class QString const &) const
+ ?engines@QNetworkConfigurationManagerPrivate@@QAE?AV?$QList@PAVQBearerEngine@@@@XZ @ 1042 NONAME ; class QList<class QBearerEngine *> QNetworkConfigurationManagerPrivate::engines(void)
+ ?isOnline@QNetworkConfigurationManager@@QBE_NXZ @ 1043 NONAME ; bool QNetworkConfigurationManager::isOnline(void) const
+ ?capabilities@QNetworkConfigurationManager@@QBE?AV?$QFlags@W4Capability@QNetworkConfigurationManager@@@@XZ @ 1044 NONAME ; class QFlags<enum QNetworkConfigurationManager::Capability> QNetworkConfigurationManager::capabilities(void) const
+ ?configurationRemoved@QNetworkConfigurationManagerPrivate@@AAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1045 NONAME ; void QNetworkConfigurationManagerPrivate::configurationRemoved(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ??0QNetworkConfiguration@@QAE@ABV0@@Z @ 1046 NONAME ; QNetworkConfiguration::QNetworkConfiguration(class QNetworkConfiguration const &)
+ ?setPriority@QNetworkRequest@@QAEXW4Priority@1@@Z @ 1047 NONAME ; void QNetworkRequest::setPriority(enum QNetworkRequest::Priority)
+ ?disconnectNotify@QNetworkSession@@MAEXPBD@Z @ 1048 NONAME ; void QNetworkSession::disconnectNotify(char const *)
+ ?metaObject@QNetworkSession@@UBEPBUQMetaObject@@XZ @ 1049 NONAME ; struct QMetaObject const * QNetworkSession::metaObject(void) const
+ ?trUtf8@QBearerEngine@@SA?AVQString@@PBD0H@Z @ 1050 NONAME ; class QString QBearerEngine::trUtf8(char const *, char const *, int)
+ ?configuration@QNetworkSession@@QBE?AVQNetworkConfiguration@@XZ @ 1051 NONAME ; class QNetworkConfiguration QNetworkSession::configuration(void) const
+ ?closed@QNetworkSessionPrivate@@IAEXXZ @ 1052 NONAME ; void QNetworkSessionPrivate::closed(void)
+ ??1QNetworkSessionPrivate@@UAE@XZ @ 1053 NONAME ; QNetworkSessionPrivate::~QNetworkSessionPrivate(void)
+ ?staticMetaObject@QNetworkConfigurationManager@@2UQMetaObject@@B @ 1054 NONAME ; struct QMetaObject const QNetworkConfigurationManager::staticMetaObject
+ ?tr@QNetworkConfigurationManager@@SA?AVQString@@PBD0H@Z @ 1055 NONAME ; class QString QNetworkConfigurationManager::tr(char const *, char const *, int)
+ ?tr@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0H@Z @ 1056 NONAME ; class QString QNetworkConfigurationManagerPrivate::tr(char const *, char const *, int)
+ ?configurationChanged@QBearerEngine@@IAEXV?$QExplicitlySharedDataPointer@VQNetworkConfigurationPrivate@@@@@Z @ 1057 NONAME ; void QBearerEngine::configurationChanged(class QExplicitlySharedDataPointer<class QNetworkConfigurationPrivate>)
+ ?tr@QBearerEngine@@SA?AVQString@@PBD0@Z @ 1058 NONAME ; class QString QBearerEngine::tr(char const *, char const *)
+ ??0QNetworkConfiguration@@QAE@XZ @ 1059 NONAME ; QNetworkConfiguration::QNetworkConfiguration(void)
+ ?configurationRemoved@QNetworkConfigurationManager@@IAEXABVQNetworkConfiguration@@@Z @ 1060 NONAME ; void QNetworkConfigurationManager::configurationRemoved(class QNetworkConfiguration const &)
+ ?preferredConfigurationChanged@QNetworkSessionPrivate@@IAEXABVQNetworkConfiguration@@_N@Z @ 1061 NONAME ; void QNetworkSessionPrivate::preferredConfigurationChanged(class QNetworkConfiguration const &, bool)
+ ??1QBearerEnginePlugin@@UAE@XZ @ 1062 NONAME ; QBearerEnginePlugin::~QBearerEnginePlugin(void)
+ ?tr@QNetworkSession@@SA?AVQString@@PBD0@Z @ 1063 NONAME ; class QString QNetworkSession::tr(char const *, char const *)
+ ??0QNetworkConfigurationManager@@QAE@PAVQObject@@@Z @ 1064 NONAME ; QNetworkConfigurationManager::QNetworkConfigurationManager(class QObject *)
+ ?qt_metacall@QNetworkConfigurationManagerPrivate@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1065 NONAME ; int QNetworkConfigurationManagerPrivate::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ??_EQNetworkSession@@UAE@I@Z @ 1066 NONAME ; QNetworkSession::~QNetworkSession(unsigned int)
+ ??9QNetworkConfiguration@@QBE_NABV0@@Z @ 1067 NONAME ; bool QNetworkConfiguration::operator!=(class QNetworkConfiguration const &) const
+ ?configurationsInUse@QBearerEngine@@QBE_NXZ @ 1068 NONAME ; bool QBearerEngine::configurationsInUse(void) const
+ ?tr@QBearerEngine@@SA?AVQString@@PBD0H@Z @ 1069 NONAME ; class QString QBearerEngine::tr(char const *, char const *, int)
+ ?configuration@QNetworkAccessManager@@QBE?AVQNetworkConfiguration@@XZ @ 1070 NONAME ; class QNetworkConfiguration QNetworkAccessManager::configuration(void) const
+ ?tr@QNetworkSessionPrivate@@SA?AVQString@@PBD0@Z @ 1071 NONAME ; class QString QNetworkSessionPrivate::tr(char const *, char const *)
+ ?activeTime@QNetworkSession@@QBE_KXZ @ 1072 NONAME ; unsigned long long QNetworkSession::activeTime(void) const
+ ?state@QNetworkSession@@QBE?AW4State@1@XZ @ 1073 NONAME ; enum QNetworkSession::State QNetworkSession::state(void) const
+ ?disablePolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1074 NONAME ; void QNetworkConfigurationManagerPrivate::disablePolling(void)
+ ?getStaticMetaObject@QNetworkSessionPrivate@@SAABUQMetaObject@@XZ @ 1075 NONAME ; struct QMetaObject const & QNetworkSessionPrivate::getStaticMetaObject(void)
+ ?configurationAdded@QNetworkConfigurationManager@@IAEXABVQNetworkConfiguration@@@Z @ 1076 NONAME ; void QNetworkConfigurationManager::configurationAdded(class QNetworkConfiguration const &)
+ ?tr@QNetworkSessionPrivate@@SA?AVQString@@PBD0H@Z @ 1077 NONAME ; class QString QNetworkSessionPrivate::tr(char const *, char const *, int)
+ ?performAsyncConfigurationUpdate@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1078 NONAME ; void QNetworkConfigurationManagerPrivate::performAsyncConfigurationUpdate(void)
+ ?trUtf8@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0@Z @ 1079 NONAME ; class QString QNetworkConfigurationManagerPrivate::trUtf8(char const *, char const *)
+ ?networkAccessible@QNetworkAccessManager@@QBE?AW4NetworkAccessibility@1@XZ @ 1080 NONAME ; enum QNetworkAccessManager::NetworkAccessibility QNetworkAccessManager::networkAccessible(void) const
+ ?setOption@QAuthenticator@@QAEXABVQString@@ABVQVariant@@@Z @ 1081 NONAME ; void QAuthenticator::setOption(class QString const &, class QVariant const &)
+ ?trUtf8@QBearerEnginePlugin@@SA?AVQString@@PBD0H@Z @ 1082 NONAME ; class QString QBearerEnginePlugin::trUtf8(char const *, char const *, int)
+ ?trUtf8@QNetworkConfigurationManager@@SA?AVQString@@PBD0@Z @ 1083 NONAME ; class QString QNetworkConfigurationManager::trUtf8(char const *, char const *)
+ ?allConfigurations@QNetworkConfigurationManager@@QBE?AV?$QList@VQNetworkConfiguration@@@@V?$QFlags@W4StateFlag@QNetworkConfiguration@@@@@Z @ 1084 NONAME ; class QList<class QNetworkConfiguration> QNetworkConfigurationManager::allConfigurations(class QFlags<enum QNetworkConfiguration::StateFlag>) const
+ ?requiresPolling@QBearerEngine@@UBE_NXZ @ 1085 NONAME ; bool QBearerEngine::requiresPolling(void) const
+ ?priority@QNetworkRequest@@QBE?AW4Priority@1@XZ @ 1086 NONAME ; enum QNetworkRequest::Priority QNetworkRequest::priority(void) const
+ ?networkAccessibleChanged@QNetworkAccessManager@@IAEXW4NetworkAccessibility@1@@Z @ 1087 NONAME ; void QNetworkAccessManager::networkAccessibleChanged(enum QNetworkAccessManager::NetworkAccessibility)
+ ??8QNetworkConfiguration@@QBE_NABV0@@Z @ 1088 NONAME ; bool QNetworkConfiguration::operator==(class QNetworkConfiguration const &) const
+ ?option@QAuthenticator@@QBE?AVQVariant@@ABVQString@@@Z @ 1089 NONAME ; class QVariant QAuthenticator::option(class QString const &) const
+ ?tr@QBearerEnginePlugin@@SA?AVQString@@PBD0@Z @ 1090 NONAME ; class QString QBearerEnginePlugin::tr(char const *, char const *)
+ ?configurationFromIdentifier@QNetworkConfigurationManager@@QBE?AVQNetworkConfiguration@@ABVQString@@@Z @ 1091 NONAME ; class QNetworkConfiguration QNetworkConfigurationManager::configurationFromIdentifier(class QString const &) const
+ ??_EQBearerEnginePlugin@@UAE@I@Z @ 1092 NONAME ; QBearerEnginePlugin::~QBearerEnginePlugin(unsigned int)
+ ?children@QNetworkConfiguration@@QBE?AV?$QList@VQNetworkConfiguration@@@@XZ @ 1093 NONAME ; class QList<class QNetworkConfiguration> QNetworkConfiguration::children(void) const
+ ?activeConfiguration@QNetworkAccessManager@@QBE?AVQNetworkConfiguration@@XZ @ 1094 NONAME ; class QNetworkConfiguration QNetworkAccessManager::activeConfiguration(void) const
+ ?defaultConfiguration@QNetworkConfigurationManagerPrivate@@QAE?AVQNetworkConfiguration@@XZ @ 1095 NONAME ; class QNetworkConfiguration QNetworkConfigurationManagerPrivate::defaultConfiguration(void)
+ ?getStaticMetaObject@QNetworkSession@@SAABUQMetaObject@@XZ @ 1096 NONAME ; struct QMetaObject const & QNetworkSession::getStaticMetaObject(void)
+ ?qt_metacast@QNetworkSession@@UAEPAXPBD@Z @ 1097 NONAME ; void * QNetworkSession::qt_metacast(char const *)
+ ?updateCompleted@QBearerEngine@@IAEXXZ @ 1098 NONAME ; void QBearerEngine::updateCompleted(void)
+ ?qt_metacall@QNetworkSessionPrivate@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1099 NONAME ; int QNetworkSessionPrivate::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?onlineStateChanged@QNetworkConfigurationManager@@IAEX_N@Z @ 1100 NONAME ; void QNetworkConfigurationManager::onlineStateChanged(bool)
+ ?getStaticMetaObject@QNetworkConfigurationManager@@SAABUQMetaObject@@XZ @ 1101 NONAME ; struct QMetaObject const & QNetworkConfigurationManager::getStaticMetaObject(void)
+ ??0QNetworkSessionPrivate@@QAE@XZ @ 1102 NONAME ; QNetworkSessionPrivate::QNetworkSessionPrivate(void)
+ ?qt_metacast@QNetworkConfigurationManager@@UAEPAXPBD@Z @ 1103 NONAME ; void * QNetworkConfigurationManager::qt_metacast(char const *)
+ ?configurationChanged@QNetworkConfigurationManagerPrivate@@IAEXABVQNetworkConfiguration@@@Z @ 1104 NONAME ; void QNetworkConfigurationManagerPrivate::configurationChanged(class QNetworkConfiguration const &)
+ ?staticMetaObject@QBearerEnginePlugin@@2UQMetaObject@@B @ 1105 NONAME ; struct QMetaObject const QBearerEnginePlugin::staticMetaObject
+ ?qt_metacast@QNetworkConfigurationManagerPrivate@@UAEPAXPBD@Z @ 1106 NONAME ; void * QNetworkConfigurationManagerPrivate::qt_metacast(char const *)
+ ?newConfigurationActivated@QNetworkSessionPrivate@@IAEXXZ @ 1107 NONAME ; void QNetworkSessionPrivate::newConfigurationActivated(void)
+ ?qt_metacast@QNetworkSessionPrivate@@UAEPAXPBD@Z @ 1108 NONAME ; void * QNetworkSessionPrivate::qt_metacast(char const *)
+ ?startPolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1109 NONAME ; void QNetworkConfigurationManagerPrivate::startPolling(void)
+ ?allConfigurations@QNetworkConfigurationManagerPrivate@@QAE?AV?$QList@VQNetworkConfiguration@@@@V?$QFlags@W4StateFlag@QNetworkConfiguration@@@@@Z @ 1110 NONAME ; class QList<class QNetworkConfiguration> QNetworkConfigurationManagerPrivate::allConfigurations(class QFlags<enum QNetworkConfiguration::StateFlag>)
+ ?connectNotify@QNetworkSession@@MAEXPBD@Z @ 1111 NONAME ; void QNetworkSession::connectNotify(char const *)
+ ?onlineStateChanged@QNetworkConfigurationManagerPrivate@@IAEX_N@Z @ 1112 NONAME ; void QNetworkConfigurationManagerPrivate::onlineStateChanged(bool)
+ ?bytesWritten@QNetworkSession@@QBE_KXZ @ 1113 NONAME ; unsigned long long QNetworkSession::bytesWritten(void) const
+ ?sendCustomRequest@QNetworkAccessManager@@QAEPAVQNetworkReply@@ABVQNetworkRequest@@ABVQByteArray@@PAVQIODevice@@@Z @ 1114 NONAME ; class QNetworkReply * QNetworkAccessManager::sendCustomRequest(class QNetworkRequest const &, class QByteArray const &, class QIODevice *)
+ ?addPendingConnection@QTcpServer@@IAEXPAVQTcpSocket@@@Z @ 1115 NONAME ; void QTcpServer::addPendingConnection(class QTcpSocket *)
+ ?ignore@QNetworkSession@@QAEXXZ @ 1116 NONAME ; void QNetworkSession::ignore(void)
+ ?updateConfigurations@QNetworkConfigurationManager@@QAEXXZ @ 1117 NONAME ; void QNetworkConfigurationManager::updateConfigurations(void)
+ ?stateChanged@QNetworkSessionPrivate@@IAEXW4State@QNetworkSession@@@Z @ 1118 NONAME ; void QNetworkSessionPrivate::stateChanged(enum QNetworkSession::State)
+ ?setALREnabled@QNetworkSessionPrivate@@UAEX_N@Z @ 1119 NONAME ; void QNetworkSessionPrivate::setALREnabled(bool)
+ ?configurationRemoved@QNetworkConfigurationManagerPrivate@@IAEXABVQNetworkConfiguration@@@Z @ 1120 NONAME ; void QNetworkConfigurationManagerPrivate::configurationRemoved(class QNetworkConfiguration const &)
+ ?qt_metacall@QBearerEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1121 NONAME ; int QBearerEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
+ ?interface@QNetworkSession@@QBE?AVQNetworkInterface@@XZ @ 1122 NONAME ; class QNetworkInterface QNetworkSession::interface(void) const
+ ?opened@QNetworkSession@@IAEXXZ @ 1123 NONAME ; void QNetworkSession::opened(void)
+ ?type@QNetworkConfiguration@@QBE?AW4Type@1@XZ @ 1124 NONAME ; enum QNetworkConfiguration::Type QNetworkConfiguration::type(void) const
+ ?migrate@QNetworkSession@@QAEXXZ @ 1125 NONAME ; void QNetworkSession::migrate(void)
+ ?closed@QNetworkSession@@IAEXXZ @ 1126 NONAME ; void QNetworkSession::closed(void)
+ ?pollEngines@QNetworkConfigurationManagerPrivate@@AAEXXZ @ 1127 NONAME ; void QNetworkConfigurationManagerPrivate::pollEngines(void)
+ ?staticMetaObject@QNetworkConfigurationManagerPrivate@@2UQMetaObject@@B @ 1128 NONAME ; struct QMetaObject const QNetworkConfigurationManagerPrivate::staticMetaObject
+ ?reject@QNetworkSession@@QAEXXZ @ 1129 NONAME ; void QNetworkSession::reject(void)
+ ?options@QAuthenticator@@QBE?AV?$QHash@VQString@@VQVariant@@@@XZ @ 1130 NONAME ; class QHash<class QString, class QVariant> QAuthenticator::options(void) const
+ ?purpose@QNetworkConfiguration@@QBE?AW4Purpose@1@XZ @ 1131 NONAME ; enum QNetworkConfiguration::Purpose QNetworkConfiguration::purpose(void) const
+ ?configurationFromIdentifier@QNetworkConfigurationManagerPrivate@@QAE?AVQNetworkConfiguration@@ABVQString@@@Z @ 1132 NONAME ; class QNetworkConfiguration QNetworkConfigurationManagerPrivate::configurationFromIdentifier(class QString const &)
+ ?abort@QNetworkConfigurationManagerPrivate@@IAEXXZ @ 1133 NONAME ; void QNetworkConfigurationManagerPrivate::abort(void)
+ ?tr@QNetworkConfigurationManager@@SA?AVQString@@PBD0@Z @ 1134 NONAME ; class QString QNetworkConfigurationManager::tr(char const *, char const *)
+ ?trUtf8@QNetworkSession@@SA?AVQString@@PBD0H@Z @ 1135 NONAME ; class QString QNetworkSession::trUtf8(char const *, char const *, int)
+ ?trUtf8@QBearerEnginePlugin@@SA?AVQString@@PBD0@Z @ 1136 NONAME ; class QString QBearerEnginePlugin::trUtf8(char const *, char const *)
+ ??_EQNetworkSessionPrivate@@UAE@I@Z @ 1137 NONAME ; QNetworkSessionPrivate::~QNetworkSessionPrivate(unsigned int)
+ ?configurationUpdateComplete@QNetworkConfigurationManagerPrivate@@IAEXXZ @ 1138 NONAME ; void QNetworkConfigurationManagerPrivate::configurationUpdateComplete(void)
+ ?metaObject@QNetworkConfigurationManager@@UBEPBUQMetaObject@@XZ @ 1139 NONAME ; struct QMetaObject const * QNetworkConfigurationManager::metaObject(void) const
+ ?tr@QNetworkConfigurationManagerPrivate@@SA?AVQString@@PBD0@Z @ 1140 NONAME ; class QString QNetworkConfigurationManagerPrivate::tr(char const *, char const *)
+ ?updateCompleted@QNetworkConfigurationManager@@IAEXXZ @ 1141 NONAME ; void QNetworkConfigurationManager::updateCompleted(void)
?setNetworkAccessible@QNetworkAccessManager@@QAEXW4NetworkAccessibility@1@@Z @ 1142 NONAME ; void QNetworkAccessManager::setNetworkAccessible(enum QNetworkAccessManager::NetworkAccessibility)
- ?startPolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1143 NONAME ; void QNetworkConfigurationManagerPrivate::startPolling(void)
- ?capabilities@QNetworkConfigurationManagerPrivate@@QAE?AV?$QFlags@W4Capability@QNetworkConfigurationManager@@@@XZ @ 1144 NONAME ; class QFlags<enum QNetworkConfigurationManager::Capability> QNetworkConfigurationManagerPrivate::capabilities(void)
- ?addPendingConnection@QTcpServer@@IAEXPAVQTcpSocket@@@Z @ 1145 NONAME ; void QTcpServer::addPendingConnection(class QTcpSocket *)
+ ??_EQBearerEngineFactoryInterface@@UAE@I@Z @ 1143 NONAME ; QBearerEngineFactoryInterface::~QBearerEngineFactoryInterface(unsigned int)
+ ?enablePolling@QNetworkConfigurationManagerPrivate@@QAEXXZ @ 1144 NONAME ; void QNetworkConfigurationManagerPrivate::enablePolling(void)
diff --git a/src/s60installs/bwins/QtOpenVGu.def b/src/s60installs/bwins/QtOpenVGu.def
index f398055125..14523836eb 100644
--- a/src/s60installs/bwins/QtOpenVGu.def
+++ b/src/s60installs/bwins/QtOpenVGu.def
@@ -164,12 +164,11 @@ EXPORTS
?qt_vg_create_context@@YAPAVQEglContext@@PAVQPaintDevice@@H@Z @ 163 NONAME ; class QEglContext * qt_vg_create_context(class QPaintDevice *, int)
?reclaimImages@QVGPixmapData@@UAEXXZ @ 164 NONAME ; void QVGPixmapData::reclaimImages(void)
?hibernate@QVGPixmapData@@UAEXXZ @ 165 NONAME ; void QVGPixmapData::hibernate(void)
- ?drawStaticTextItem@QVGPaintEngine@@UAEXPAVQStaticTextItem@@@Z @ 166 NONAME ; void QVGPaintEngine::drawStaticTextItem(class QStaticTextItem *)
- ?drawPixmapFragments@QVGPaintEngine@@UAEXPBVPixmapFragment@QPainter@@HABVQPixmap@@V?$QFlags@W4PixmapFragmentHint@QPainter@@@@@Z @ 167 NONAME ; void QVGPaintEngine::drawPixmapFragments(class QPainter::PixmapFragment const *, int, class QPixmap const &, class QFlags<enum QPainter::PixmapFragmentHint>)
- ?drawCachedGlyphs@QVGPaintEngine@@QAE_NHPBIABVQFont@@PAVQFontEngine@@ABVQPointF@@@Z @ 168 NONAME ABSENT ; bool QVGPaintEngine::drawCachedGlyphs(int, unsigned int const *, class QFont const &, class QFontEngine *, class QPointF const &)
- ?supportsStaticContents@QVGEGLWindowSurfaceDirect@@UBE_NXZ @ 169 NONAME ; bool QVGEGLWindowSurfaceDirect::supportsStaticContents(void) const
- ?scroll@QVGEGLWindowSurfacePrivate@@UAE_NPAVQWidget@@ABVQRegion@@HH@Z @ 170 NONAME ; bool QVGEGLWindowSurfacePrivate::scroll(class QWidget *, class QRegion const &, int, int)
- ?scroll@QVGEGLWindowSurfaceDirect@@UAE_NPAVQWidget@@ABVQRegion@@HH@Z @ 171 NONAME ; bool QVGEGLWindowSurfaceDirect::scroll(class QWidget *, class QRegion const &, int, int)
- ?supportsStaticContents@QVGEGLWindowSurfacePrivate@@UBE_NXZ @ 172 NONAME ; bool QVGEGLWindowSurfacePrivate::supportsStaticContents(void) const
- ?drawCachedGlyphs@QVGPaintEngine@@QAE_NHPBIABVQFont@@PAVQFontEngine@@ABVQPointF@@PBUQFixedPoint@@@Z @ 173 NONAME ; bool QVGPaintEngine::drawCachedGlyphs(int, unsigned int const *, class QFont const &, class QFontEngine *, class QPointF const &, struct QFixedPoint const *)
+ ?supportsStaticContents@QVGEGLWindowSurfaceDirect@@UBE_NXZ @ 166 NONAME ; bool QVGEGLWindowSurfaceDirect::supportsStaticContents(void) const
+ ?scroll@QVGEGLWindowSurfacePrivate@@UAE_NPAVQWidget@@ABVQRegion@@HH@Z @ 167 NONAME ; bool QVGEGLWindowSurfacePrivate::scroll(class QWidget *, class QRegion const &, int, int)
+ ?scroll@QVGEGLWindowSurfaceDirect@@UAE_NPAVQWidget@@ABVQRegion@@HH@Z @ 168 NONAME ; bool QVGEGLWindowSurfaceDirect::scroll(class QWidget *, class QRegion const &, int, int)
+ ?supportsStaticContents@QVGEGLWindowSurfacePrivate@@UBE_NXZ @ 169 NONAME ; bool QVGEGLWindowSurfacePrivate::supportsStaticContents(void) const
+ ?drawCachedGlyphs@QVGPaintEngine@@QAE_NHPBIABVQFont@@PAVQFontEngine@@ABVQPointF@@PBUQFixedPoint@@@Z @ 170 NONAME ; bool QVGPaintEngine::drawCachedGlyphs(int, unsigned int const *, class QFont const &, class QFontEngine *, class QPointF const &, struct QFixedPoint const *)
+ ?drawPixmapFragments@QVGPaintEngine@@UAEXPBVPixmapFragment@QPainter@@HABVQPixmap@@V?$QFlags@W4PixmapFragmentHint@QPainter@@@@@Z @ 171 NONAME ; void QVGPaintEngine::drawPixmapFragments(class QPainter::PixmapFragment const *, int, class QPixmap const &, class QFlags<enum QPainter::PixmapFragmentHint>)
+ ?drawStaticTextItem@QVGPaintEngine@@UAEXPAVQStaticTextItem@@@Z @ 172 NONAME ; void QVGPaintEngine::drawStaticTextItem(class QStaticTextItem *)
diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def
index dd5103fe3c..9a3cefa2ec 100644
--- a/src/s60installs/eabi/QtDeclarativeu.def
+++ b/src/s60installs/eabi/QtDeclarativeu.def
@@ -44,7 +44,7 @@ EXPORTS
_ZN16QDeclarativeInfoD1Ev @ 43 NONAME
_ZN16QDeclarativeInfoD2Ev @ 44 NONAME
_ZN16QDeclarativeItem10classBeginEv @ 45 NONAME
- _ZN16QDeclarativeItem10forceFocusEv @ 46 NONAME
+ _ZN16QDeclarativeItem10forceFocusEv @ 46 NONAME ABSENT
_ZN16QDeclarativeItem10itemChangeEN13QGraphicsItem18GraphicsItemChangeERK8QVariant @ 47 NONAME
_ZN16QDeclarativeItem10resetWidthEv @ 48 NONAME
_ZN16QDeclarativeItem10sceneEventEP6QEvent @ 49 NONAME
@@ -59,7 +59,7 @@ EXPORTS
_ZN16QDeclarativeItem13parentChangedEPS_ @ 58 NONAME
_ZN16QDeclarativeItem13setParentItemEPS_ @ 59 NONAME
_ZN16QDeclarativeItem13smoothChangedEb @ 60 NONAME
- _ZN16QDeclarativeItem15childrenChangedEv @ 61 NONAME
+ _ZN16QDeclarativeItem15childrenChangedEv @ 61 NONAME ABSENT
_ZN16QDeclarativeItem15geometryChangedERK6QRectFS2_ @ 62 NONAME
_ZN16QDeclarativeItem15keyReleaseEventEP9QKeyEvent @ 63 NONAME
_ZN16QDeclarativeItem16inputMethodEventEP17QInputMethodEvent @ 64 NONAME
@@ -69,7 +69,7 @@ EXPORTS
_ZN16QDeclarativeItem17componentCompleteEv @ 68 NONAME
_ZN16QDeclarativeItem17setBaselineOffsetEf @ 69 NONAME
_ZN16QDeclarativeItem17setImplicitHeightEf @ 70 NONAME
- _ZN16QDeclarativeItem17wantsFocusChangedEb @ 71 NONAME
+ _ZN16QDeclarativeItem17wantsFocusChangedEb @ 71 NONAME ABSENT
_ZN16QDeclarativeItem18keyPressPreHandlerEP9QKeyEvent @ 72 NONAME
_ZN16QDeclarativeItem18setTransformOriginENS_15TransformOriginE @ 73 NONAME
_ZN16QDeclarativeItem19childrenRectChangedERK6QRectF @ 74 NONAME
@@ -143,7 +143,7 @@ EXPORTS
_ZN16QDeclarativeView11qt_metacallEN11QMetaObject4CallEiPPv @ 142 NONAME
_ZN16QDeclarativeView11qt_metacastEPKc @ 143 NONAME
_ZN16QDeclarativeView11resizeEventEP12QResizeEvent @ 144 NONAME
- _ZN16QDeclarativeView11rootContextEv @ 145 NONAME
+ _ZN16QDeclarativeView11rootContextEv @ 145 NONAME ABSENT
_ZN16QDeclarativeView12sceneResizedE5QSize @ 146 NONAME
_ZN16QDeclarativeView13setResizeModeENS_10ResizeModeE @ 147 NONAME
_ZN16QDeclarativeView13setRootObjectEP7QObject @ 148 NONAME
@@ -151,7 +151,7 @@ EXPORTS
_ZN16QDeclarativeView15continueExecuteEv @ 150 NONAME
_ZN16QDeclarativeView16staticMetaObjectE @ 151 NONAME DATA 16
_ZN16QDeclarativeView19getStaticMetaObjectEv @ 152 NONAME
- _ZN16QDeclarativeView6engineEv @ 153 NONAME
+ _ZN16QDeclarativeView6engineEv @ 153 NONAME ABSENT
_ZN16QDeclarativeView9setSourceERK4QUrl @ 154 NONAME
_ZN16QDeclarativeViewC1EP7QWidget @ 155 NONAME
_ZN16QDeclarativeViewC1ERK4QUrlP7QWidget @ 156 NONAME
@@ -202,7 +202,7 @@ EXPORTS
_ZN18QDeclarativeEngine10setBaseUrlERK4QUrl @ 201 NONAME
_ZN18QDeclarativeEngine11qt_metacallEN11QMetaObject4CallEiPPv @ 202 NONAME
_ZN18QDeclarativeEngine11qt_metacastEPKc @ 203 NONAME
- _ZN18QDeclarativeEngine11rootContextEv @ 204 NONAME
+ _ZN18QDeclarativeEngine11rootContextEv @ 204 NONAME ABSENT
_ZN18QDeclarativeEngine12importPluginERK7QStringS2_PS0_ @ 205 NONAME
_ZN18QDeclarativeEngine13addImportPathERK7QString @ 206 NONAME
_ZN18QDeclarativeEngine13addPluginPathERK7QString @ 207 NONAME
@@ -385,9 +385,9 @@ EXPORTS
_ZN19QDeclarativeDomListD1Ev @ 384 NONAME
_ZN19QDeclarativeDomListD2Ev @ 385 NONAME
_ZN19QDeclarativeDomListaSERKS_ @ 386 NONAME
- _ZN19QDeclarativePrivate12registerTypeERKNS_12RegisterTypeE @ 387 NONAME
- _ZN19QDeclarativePrivate12registerTypeERKNS_17RegisterInterfaceE @ 388 NONAME
- _ZN19QDeclarativePrivate26registerAutoParentFunctionEPFNS_16AutoParentResultEP7QObjectS2_E @ 389 NONAME
+ _ZN19QDeclarativePrivate12registerTypeERKNS_12RegisterTypeE @ 387 NONAME ABSENT
+ _ZN19QDeclarativePrivate12registerTypeERKNS_17RegisterInterfaceE @ 388 NONAME ABSENT
+ _ZN19QDeclarativePrivate26registerAutoParentFunctionEPFNS_16AutoParentResultEP7QObjectS2_E @ 389 NONAME ABSENT
_ZN19QDeclarativePrivate30qdeclarativeelement_destructorEP7QObject @ 390 NONAME
_ZN19QListModelInterface10itemsMovedEiii @ 391 NONAME
_ZN19QListModelInterface11qt_metacallEN11QMetaObject4CallEiPPv @ 392 NONAME
@@ -1075,7 +1075,7 @@ EXPORTS
_ZNK15QPacketProtocol17maximumPacketSizeEv @ 1074 NONAME
_ZNK16QDeclarativeItem10metaObjectEv @ 1075 NONAME
_ZNK16QDeclarativeItem10parentItemEv @ 1076 NONAME
- _ZNK16QDeclarativeItem10wantsFocusEv @ 1077 NONAME
+ _ZNK16QDeclarativeItem10wantsFocusEv @ 1077 NONAME ABSENT
_ZNK16QDeclarativeItem10widthValidEv @ 1078 NONAME
_ZNK16QDeclarativeItem11heightValidEv @ 1079 NONAME
_ZNK16QDeclarativeItem11mapFromItemERK12QScriptValueff @ 1080 NONAME
@@ -1707,4 +1707,11 @@ EXPORTS
_ZN25QDeclarativeImageProviderC2ENS_9ImageTypeE @ 1706 NONAME
_ZNK25QDeclarativeImageProvider9imageTypeEv @ 1707 NONAME
_ZN23QDeclarativeEngineDebug21resetBindingForObjectEiRK7QString @ 1708 NONAME
+ _ZN16QDeclarativeItem16forceActiveFocusEv @ 1709 NONAME
+ _ZN16QDeclarativeItem18activeFocusChangedEb @ 1710 NONAME
+ _ZNK16QDeclarativeItem14hasActiveFocusEv @ 1711 NONAME
+ _ZNK16QDeclarativeView11rootContextEv @ 1712 NONAME
+ _ZNK16QDeclarativeView6engineEv @ 1713 NONAME
+ _ZNK18QDeclarativeEngine11rootContextEv @ 1714 NONAME
+ _ZN19QDeclarativePrivate11qmlregisterENS_16RegistrationTypeEPv @ 1715 NONAME
diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def
index 018cba25ce..a22b4d9304 100644
--- a/src/s60installs/eabi/QtGuiu.def
+++ b/src/s60installs/eabi/QtGuiu.def
@@ -4294,7 +4294,7 @@ EXPORTS
_ZN19QApplicationPrivate13animate_comboE @ 4293 NONAME DATA 1
_ZN19QApplicationPrivate13mouse_buttonsE @ 4294 NONAME DATA 4
_ZN19QApplicationPrivate13notify_helperEP7QObjectP6QEvent @ 4295 NONAME
- _ZN19QApplicationPrivate13scanCodeCacheE @ 4296 NONAME DATA 4
+ _ZN19QApplicationPrivate13scanCodeCacheE @ 4296 NONAME DATA 4 ABSENT
_ZN19QApplicationPrivate13setSystemFontERK5QFont @ 4297 NONAME
_ZN19QApplicationPrivate13styleOverrideE @ 4298 NONAME DATA 4
_ZN19QApplicationPrivate14autoSipEnabledE @ 4299 NONAME DATA 1
@@ -4675,7 +4675,7 @@ EXPORTS
_ZN20QGraphicsItemPrivate20removeExtraItemCacheEv @ 4674 NONAME
_ZN20QGraphicsItemPrivate23appendGraphicsTransformEP18QGraphicsTransform @ 4675 NONAME
_ZN20QGraphicsItemPrivate25movableAncestorIsSelectedEPK13QGraphicsItem @ 4676 NONAME
- _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectF @ 4677 NONAME
+ _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectF @ 4677 NONAME ABSENT
_ZN20QGraphicsItemPrivate26invalidateDepthRecursivelyEv @ 4678 NONAME
_ZN20QGraphicsItemPrivate28ensureSequentialSiblingIndexEv @ 4679 NONAME
_ZN20QGraphicsItemPrivate29ensureSceneTransformRecursiveEPP13QGraphicsItem @ 4680 NONAME
@@ -12084,4 +12084,11 @@ EXPORTS
_ZThn24_N13QS60MainAppUi15ProcessCommandLEi @ 12083 NONAME
_ZThn40_N13QS60MainAppUi15MopSupplyObjectE8TTypeUid @ 12084 NONAME
_ZThn92_N13QS60MainAppUi22HandleViewDeactivationERK10TVwsViewIdS2_ @ 12085 NONAME
+ _ZN18QTapAndHoldGesture10setTimeoutEi @ 12086 NONAME
+ _ZN18QTapAndHoldGesture7timeoutEv @ 12087 NONAME
+ _ZN20QGraphicsItemPrivate20focusScopeItemChangeEb @ 12088 NONAME
+ _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectFb @ 12089 NONAME
+ _ZN14QGraphicsScale13xScaleChangedEv @ 12090 NONAME
+ _ZN14QGraphicsScale13yScaleChangedEv @ 12091 NONAME
+ _ZN14QGraphicsScale13zScaleChangedEv @ 12092 NONAME
diff --git a/src/s60installs/eabi/QtNetworku.def b/src/s60installs/eabi/QtNetworku.def
index 3cc36443a9..eb30832b11 100644
--- a/src/s60installs/eabi/QtNetworku.def
+++ b/src/s60installs/eabi/QtNetworku.def
@@ -1164,4 +1164,7 @@ EXPORTS
_ZTV35QNetworkConfigurationManagerPrivate @ 1163 NONAME
_ZThn8_N19QBearerEnginePluginD0Ev @ 1164 NONAME
_ZThn8_N19QBearerEnginePluginD1Ev @ 1165 NONAME
+ _ZN14QAuthenticator9setOptionERK7QStringRK8QVariant @ 1166 NONAME
+ _ZNK14QAuthenticator6optionERK7QString @ 1167 NONAME
+ _ZNK14QAuthenticator7optionsEv @ 1168 NONAME
diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro
index 4addb84c0e..8a8167b4eb 100644
--- a/src/s60installs/s60installs.pro
+++ b/src/s60installs/s60installs.pro
@@ -57,8 +57,8 @@ symbian: {
bearerPluginLocation = $${EPOCROOT}epoc32/release/$(PLATFORM)/$(TARGET)
bearerStubZ = $${EPOCROOT}$${HW_ZDIR}$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin
BLD_INF_RULES.prj_exports += \
- "qsymbianbearer.qtplugin $$bearerStubZ" \
- "qsymbianbearer.qtplugin $${EPOCROOT}epoc32/winscw/c$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin"
+ "qsymbianbearer.qtplugin /$${HW_ZDIR}$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin" \
+ "qsymbianbearer.qtplugin /epoc32/winscw/c$${QT_PLUGINS_BASE_DIR}/bearer/qsymbianbearer$${QT_LIBINFIX}.qtplugin"
} else {
pluginLocations = $$QT_BUILD_TREE/plugins/s60
bearerPluginLocation = $$QT_BUILD_TREE/plugins/bearer
diff --git a/src/s60main/s60main.pro b/src/s60main/s60main.pro
index 9ea308049a..a273897187 100644
--- a/src/s60main/s60main.pro
+++ b/src/s60main/s60main.pro
@@ -29,6 +29,7 @@ symbian {
# Having MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA will cause s60main.lib be unlinkable
# against GCCE apps, so remove it
MMP_RULES -= $$MMP_RULES_DONT_EXPORT_ALL_CLASS_IMPEDIMENTA
+ linux-armcc:QMAKE_CXXFLAGS *= --export_all_vtbl
} else {
error("$$_FILE_ is intended only for Symbian!")
}
diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp
index 3f08e749df..1a111008b1 100644
--- a/src/script/api/qscriptcontext.cpp
+++ b/src/script/api/qscriptcontext.cpp
@@ -323,6 +323,9 @@ QScriptValue QScriptContext::argumentsObject() const
When a function is called as constructor, the thisObject()
contains the newly constructed object to be initialized.
+
+ \note This function is only guarenteed to work for a context
+ corresponding to native functions.
*/
bool QScriptContext::isCalledAsConstructor() const
{
@@ -413,6 +416,9 @@ void QScriptContext::setReturnValue(const QScriptValue &result)
object provides access to the local variables associated with this
context.
+ \note The activation object might not be available if there is no
+ active QScriptEngineAgent, as it might be optimized.
+
\sa argument(), argumentsObject()
*/
@@ -472,6 +478,10 @@ QScriptValue QScriptContext::activationObject() const
activation.
If \a activation is not an object, this function does nothing.
+
+ \note For a context corresponding to a JavaScript function, this is only
+ guarenteed to work if there was an QScriptEngineAgent active on the
+ engine while the function was evaluated.
*/
void QScriptContext::setActivationObject(const QScriptValue &activation)
{
diff --git a/src/script/api/qscriptcontextinfo.cpp b/src/script/api/qscriptcontextinfo.cpp
index ebb17706cc..a90e0146af 100644
--- a/src/script/api/qscriptcontextinfo.cpp
+++ b/src/script/api/qscriptcontextinfo.cpp
@@ -53,8 +53,7 @@ QT_BEGIN_NAMESPACE
current statement.
If the called function is executing Qt Script code, you can obtain
- the script location with the functions fileName(), lineNumber() and
- columnNumber().
+ the script location with the functions fileName() and lineNumber().
You can obtain the starting line number and ending line number of a
Qt Script function definition with functionStartLineNumber() and
@@ -317,13 +316,7 @@ int QScriptContextInfo::lineNumber() const
}
/*!
- Returns the column number corresponding to the statement being
- executed, or -1 if the column number is not available.
-
- The column number is only available if Qt Script code is being
- executed.
-
- \sa lineNumber(), fileName()
+ \obsolete
*/
int QScriptContextInfo::columnNumber() const
{
diff --git a/src/script/api/qscriptcontextinfo.h b/src/script/api/qscriptcontextinfo.h
index d0b3f2121d..64a1e15082 100644
--- a/src/script/api/qscriptcontextinfo.h
+++ b/src/script/api/qscriptcontextinfo.h
@@ -69,7 +69,9 @@ public:
qint64 scriptId() const;
QString fileName() const;
int lineNumber() const;
- int columnNumber() const;
+#ifdef QT_DEPRECATED
+ QT_DEPRECATED int columnNumber() const;
+#endif
QString functionName() const;
FunctionType functionType() const;
diff --git a/src/script/api/qscriptengine.cpp b/src/script/api/qscriptengine.cpp
index 7bccffe014..8560214380 100644
--- a/src/script/api/qscriptengine.cpp
+++ b/src/script/api/qscriptengine.cpp
@@ -44,7 +44,6 @@
#include "CodeBlock.h"
#include "Error.h"
-#include "JSLock.h"
#include "Interpreter.h"
#include "PrototypeFunction.h"
@@ -152,8 +151,7 @@ QT_BEGIN_NAMESPACE
evaluation caused an exception by calling hasUncaughtException(). In
that case, you can call toString() on the error object to obtain an
error message. The current uncaught exception is also available
- through uncaughtException(). You can obtain a human-readable
- backtrace of the exception with uncaughtExceptionBacktrace().
+ through uncaughtException().
Calling clearExceptions() will cause any uncaught exceptions to be
cleared.
@@ -1003,7 +1001,6 @@ QScriptEnginePrivate::~QScriptEnginePrivate()
detachAllRegisteredScriptStrings();
qDeleteAll(m_qobjectData);
qDeleteAll(m_typeInfos);
- JSC::JSLock lock(false);
globalData->heap.destroy();
globalData->deref();
while (freeScriptValues) {
@@ -1292,7 +1289,6 @@ bool QScriptEnginePrivate::isCollecting() const
void QScriptEnginePrivate::collectGarbage()
{
- JSC::JSLock lock(false);
QScript::APIShim shim(this);
globalData->heap.collectAllGarbage();
}
@@ -1322,7 +1318,6 @@ JSC::JSValue QScriptEnginePrivate::evaluateHelper(JSC::ExecState *exec, intptr_t
bool &compile)
{
Q_Q(QScriptEngine);
- JSC::JSLock lock(false); // ### hmmm
QBoolBlocker inEvalBlocker(inEval, true);
q->currentContext()->activationObject(); //force the creation of a context for native function;
@@ -2800,8 +2795,7 @@ void QScriptEnginePrivate::popContext()
The exception state is cleared when evaluate() is called.
- \sa uncaughtException(), uncaughtExceptionLineNumber(),
- uncaughtExceptionBacktrace()
+ \sa uncaughtException(), uncaughtExceptionLineNumber()
*/
bool QScriptEngine::hasUncaughtException() const
{
@@ -2819,7 +2813,6 @@ bool QScriptEngine::hasUncaughtException() const
message.
\sa hasUncaughtException(), uncaughtExceptionLineNumber(),
- uncaughtExceptionBacktrace()
*/
QScriptValue QScriptEngine::uncaughtException() const
{
@@ -2839,7 +2832,7 @@ QScriptValue QScriptEngine::uncaughtException() const
Line numbers are 1-based, unless a different base was specified as
the second argument to evaluate().
- \sa hasUncaughtException(), uncaughtExceptionBacktrace()
+ \sa hasUncaughtException()
*/
int QScriptEngine::uncaughtExceptionLineNumber() const
{
@@ -2851,7 +2844,7 @@ int QScriptEngine::uncaughtExceptionLineNumber() const
/*!
Returns a human-readable backtrace of the last uncaught exception.
- Each line is of the form \c{<function-name>(<arguments>)@<file-name>:<line-number>}.
+ It is in the form \c{<function-name>()@<file-name>:<line-number>}.
\sa uncaughtException()
*/
@@ -4196,6 +4189,7 @@ void QScriptEngine::setAgent(QScriptEngineAgent *agent)
"cannot set agent belonging to different engine");
return;
}
+ QScript::APIShim shim(d);
if (d->activeAgent)
QScriptEngineAgentPrivate::get(d->activeAgent)->detach();
d->activeAgent = agent;
diff --git a/src/script/api/qscriptengineagent.cpp b/src/script/api/qscriptengineagent.cpp
index 28905e8505..b1f131ed23 100644
--- a/src/script/api/qscriptengineagent.cpp
+++ b/src/script/api/qscriptengineagent.cpp
@@ -117,6 +117,8 @@ void QScriptEngineAgentPrivate::attach()
if (engine->originalGlobalObject()->debugger())
engine->originalGlobalObject()->setDebugger(0);
JSC::Debugger::attach(engine->originalGlobalObject());
+ if (!QScriptEnginePrivate::get(engine)->isEvaluating())
+ JSC::Debugger::recompileAllJSFunctions(engine->globalData);
}
void QScriptEngineAgentPrivate::detach()
@@ -134,9 +136,12 @@ void QScriptEngineAgentPrivate::returnEvent(const JSC::DebuggerCallFrame& frame,
void QScriptEngineAgentPrivate::exceptionThrow(const JSC::DebuggerCallFrame& frame, intptr_t sourceID, bool hasHandler)
{
JSC::CallFrame *oldFrame = engine->currentFrame;
+ int oldAgentLineNumber = engine->agentLineNumber;
engine->currentFrame = frame.callFrame();
QScriptValue value(engine->scriptValueFromJSCValue(frame.exception()));
+ engine->agentLineNumber = value.property(QLatin1String("lineNumber")).toInt32();
q_ptr->exceptionThrow(sourceID, value, hasHandler);
+ engine->agentLineNumber = oldAgentLineNumber;
engine->currentFrame = oldFrame;
engine->setCurrentException(value);
};
@@ -367,9 +372,8 @@ void QScriptEngineAgent::functionExit(qint64 scriptId,
/*!
This function is called when the engine is about to execute a new
statement in the script identified by \a scriptId. The statement
- begins on the line and column specified by \a lineNumber and \a
- columnNumber. This event is not generated for native Qt Script
- functions.
+ begins on the line and column specified by \a lineNumber
+ This event is not generated for native Qt Script functions.
Reimplement this function to handle this event. For example, a
debugger implementation could reimplement this function to provide
@@ -378,6 +382,8 @@ void QScriptEngineAgent::functionExit(qint64 scriptId,
The default implementation does nothing.
+ \note \a columnNumber is undefined
+
\sa scriptLoad(), functionEntry()
*/
void QScriptEngineAgent::positionChange(qint64 scriptId,
diff --git a/src/script/api/qscriptvalue.cpp b/src/script/api/qscriptvalue.cpp
index 451d1b0eac..f6390bb0be 100644
--- a/src/script/api/qscriptvalue.cpp
+++ b/src/script/api/qscriptvalue.cpp
@@ -1268,6 +1268,7 @@ QDateTime QScriptValue::toDateTime() const
Q_D(const QScriptValue);
if (!d || !d->engine)
return QDateTime();
+ QScript::APIShim shim(d->engine);
return QScriptEnginePrivate::toDateTime(d->engine->currentFrame, d->jscValue);
}
@@ -1284,6 +1285,7 @@ QRegExp QScriptValue::toRegExp() const
Q_D(const QScriptValue);
if (!d || !d->engine)
return QRegExp();
+ QScript::APIShim shim(d->engine);
return QScriptEnginePrivate::toRegExp(d->engine->currentFrame, d->jscValue);
}
#endif // QT_NO_REGEXP
@@ -1303,6 +1305,7 @@ QObject *QScriptValue::toQObject() const
Q_D(const QScriptValue);
if (!d || !d->engine)
return 0;
+ QScript::APIShim shim(d->engine);
return QScriptEnginePrivate::toQObject(d->engine->currentFrame, d->jscValue);
}
@@ -1317,6 +1320,7 @@ const QMetaObject *QScriptValue::toQMetaObject() const
Q_D(const QScriptValue);
if (!d || !d->engine)
return 0;
+ QScript::APIShim shim(d->engine);
return QScriptEnginePrivate::toQMetaObject(d->engine->currentFrame, d->jscValue);
}
@@ -1407,6 +1411,7 @@ QScriptValue QScriptValue::property(quint32 arrayIndex,
Q_D(const QScriptValue);
if (!d || !d->isObject())
return QScriptValue();
+ QScript::APIShim shim(d->engine);
return d->engine->scriptValueFromJSCValue(d->property(arrayIndex, mode));
}
@@ -1434,6 +1439,7 @@ void QScriptValue::setProperty(quint32 arrayIndex, const QScriptValue &value,
"cannot set value created in a different engine");
return;
}
+ QScript::APIShim shim(d->engine);
JSC::JSValue jsValue = d->engine->scriptValueToJSCValue(value);
d->setProperty(arrayIndex, jsValue, flags);
}
diff --git a/src/script/api/qscriptvalue_p.h b/src/script/api/qscriptvalue_p.h
index 853c6c81a3..8f286dbe55 100644
--- a/src/script/api/qscriptvalue_p.h
+++ b/src/script/api/qscriptvalue_p.h
@@ -103,7 +103,7 @@ public:
qint64 objectId()
{
- if ( (type == JavaScriptCore) && (engine) )
+ if ( (type == JavaScriptCore) && (engine) && jscValue.isCell() )
return (qint64)jscValue.asCell();
else
return -1;
diff --git a/src/script/bridge/qscriptdeclarativeobject.cpp b/src/script/bridge/qscriptdeclarativeobject.cpp
index 6e08b83d69..f330ac019e 100644
--- a/src/script/bridge/qscriptdeclarativeobject.cpp
+++ b/src/script/bridge/qscriptdeclarativeobject.cpp
@@ -88,6 +88,7 @@ void DeclarativeObjectDelegate::put(QScriptObject* object, JSC::ExecState *exec,
JSC::JSValue value, JSC::PutPropertySlot &slot)
{
QScriptEnginePrivate *engine = scriptEngineFromExec(exec);
+ QScript::SaveFrameHelper saveFrame(engine, exec);
QScriptDeclarativeClass::Identifier identifier = (void *)propertyName.ustring().rep();
QScriptDeclarativeClassPrivate *p = QScriptDeclarativeClassPrivate::get(m_class);
@@ -144,7 +145,7 @@ JSC::JSValue DeclarativeObjectDelegate::call(JSC::ExecState *exec, JSC::JSObject
QScriptDeclarativeClass *scriptClass = static_cast<DeclarativeObjectDelegate*>(delegate)->m_class;
QScriptEnginePrivate *eng_p = scriptEngineFromExec(exec);
- JSC::ExecState *oldFrame = eng_p->currentFrame;
+ QScript::SaveFrameHelper saveFrame(eng_p, exec);
eng_p->pushContext(exec, thisValue, args, callee);
QScriptContext *ctxt = eng_p->contextForFrame(eng_p->currentFrame);
@@ -153,7 +154,6 @@ JSC::JSValue DeclarativeObjectDelegate::call(JSC::ExecState *exec, JSC::JSObject
scriptClass->call(static_cast<DeclarativeObjectDelegate*>(delegate)->m_object, ctxt);
eng_p->popContext();
- eng_p->currentFrame = oldFrame;
return (JSC::JSValue &)(result);
}
diff --git a/src/sql/drivers/db2/qsql_db2.pri b/src/sql/drivers/db2/qsql_db2.pri
new file mode 100644
index 0000000000..16557f0e00
--- /dev/null
+++ b/src/sql/drivers/db2/qsql_db2.pri
@@ -0,0 +1,8 @@
+HEADERS += $$PWD/qsql_db2.h
+SOURCES += $$PWD/qsql_db2.cpp
+
+unix {
+ !contains(LIBS, .*db2.*):LIBS += -ldb2
+} else:!win32-borland {
+ !contains(LIBS, .*db2.*):LIBS += -ldb2cli
+}
diff --git a/src/sql/drivers/drivers.pri b/src/sql/drivers/drivers.pri
index 05e7265120..87cc0b1d9e 100644
--- a/src/sql/drivers/drivers.pri
+++ b/src/sql/drivers/drivers.pri
@@ -1,119 +1,11 @@
-contains(sql-drivers, all ) {
- sql-driver += psql mysql odbc oci tds db2 sqlite ibase
-}
-
-contains(sql-drivers, psql) {
- HEADERS += drivers/psql/qsql_psql.h
- SOURCES += drivers/psql/qsql_psql.cpp
-
- 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
- } else:win32:!contains(LIBS, .*pq.* ) LIBS *= -llibpq -lws2_32 -ladvapi32
-}
-
-contains(sql-drivers, mysql) {
- HEADERS += drivers/mysql/qsql_mysql.h
- SOURCES += drivers/mysql/qsql_mysql.cpp
-
- unix {
- isEmpty(QT_LFLAGS_MYSQL) {
- !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
- use_libmysqlclient_r:LIBS *= -lmysqlclient_r
- else:LIBS *= -lmysqlclient
- }
- } else {
- LIBS *= $$QT_LFLAGS_MYSQL
- QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
- }
- }
-
- win32:!contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*) {
- !win32-g++*:LIBS *= -llibmysql
- else:LIBS *= -lmysql
- }
-}
-
-contains(sql-drivers, odbc) {
- HEADERS += drivers/odbc/qsql_odbc.h
- SOURCES += drivers/odbc/qsql_odbc.cpp
-
- mac:!contains( LIBS, .*odbc.* ):LIBS *= -liodbc
- unix:!contains( LIBS, .*odbc.* ):LIBS *= -lodbc
- unix:DEFINES += UNICODE
-
- win32 {
- !win32-borland:LIBS *= -lodbc32
- else:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
- }
-}
-
-contains(sql-drivers, oci) {
- HEADERS += drivers/oci/qsql_oci.h
- SOURCES += drivers/oci/qsql_oci.cpp
-
- unix:!contains( LIBS, .*clnts.* ):LIBS += -lclntsh
-
- win32:LIBS += -loci
-}
-
-contains(sql-drivers, tds) {
- HEADERS += drivers/tds/qsql_tds.h
- SOURCES += drivers/tds/qsql_tds.cpp
-
- unix:LIBS += -L$SYBASE/lib -lsybdb
-
- win32 {
- !win32-borland:LIBS += -lNTWDBLIB
- else:LIBS += $(BCB)/lib/PSDK/NTWDBLIB.LIB
- }
-}
-
-contains(sql-drivers, db2) {
- HEADERS += drivers/db2/qsql_db2.h
- SOURCES += drivers/db2/qsql_db2.cpp
-
- unix:LIBS += -ldb2
-
- win32 {
- !win32-borland:LIBS += -ldb2cli
-# else:LIBS += $(BCB)/lib/PSDK/db2cli.lib
- }
-}
-
-contains(sql-drivers, ibase) {
- HEADERS += drivers/ibase/qsql_ibase.h
- SOURCES += drivers/ibase/qsql_ibase.cpp
-
- unix:LIBS *= -lgds
-
- win32 {
- !win32-borland:LIBS *= -lgds32_ms
- else:LIBS += gds32.lib
- }
-}
-
-contains(sql-drivers, sqlite2) {
- HEADERS += drivers/sqlite2/qsql_sqlite2.h
- SOURCES += drivers/sqlite2/qsql_sqlite2.cpp
- !contains(LIBS, .*sqlite.*):LIBS *= -lsqlite
-}
-
-contains(sql-drivers, sqlite) {
- !system-sqlite:!contains( LIBS, .*sqlite3.* ) {
- CONFIG(release, debug|release):DEFINES *= NDEBUG
- DEFINES += SQLITE_OMIT_LOAD_EXTENSION SQLITE_OMIT_COMPLETE
- INCLUDEPATH += ../3rdparty/sqlite
- SOURCES += ../3rdparty/sqlite/sqlite3.c
- } else {
- LIBS *= $$QT_LFLAGS_SQLITE
- QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
- }
-
- HEADERS += drivers/sqlite/qsql_sqlite.h
- SOURCES += drivers/sqlite/qsql_sqlite.cpp
-}
+contains(sql-drivers, all):sql-driver += psql mysql odbc oci tds db2 sqlite ibase
+
+contains(sql-drivers, psql):include($$PWD/psql/qsql_psql.pri)
+contains(sql-drivers, mysql):include($$PWD/mysql/qsql_mysql.pri)
+contains(sql-drivers, odbc):include($$PWD/odbc/qsql_odbc.pri)
+contains(sql-drivers, oci):include($$PWD/oci/qsql_oci.pri)
+contains(sql-drivers, tds):include($$PWD/tds/qsql_tds.pri)
+contains(sql-drivers, db2):include($$PWD/db2/qsql_db2.pri)
+contains(sql-drivers, ibase):include($$PWD/ibase/qsql_ibase.pri)
+contains(sql-drivers, sqlite2):include($$PWD/sqlite2/qsql_sqlite2.pri)
+contains(sql-drivers, sqlite):include($$PWD/sqlite/qsql_sqlite.pri)
diff --git a/src/sql/drivers/ibase/qsql_ibase.pri b/src/sql/drivers/ibase/qsql_ibase.pri
new file mode 100644
index 0000000000..33fbb0de30
--- /dev/null
+++ b/src/sql/drivers/ibase/qsql_ibase.pri
@@ -0,0 +1,11 @@
+HEADERS += $$PWD/qsql_ibase.h
+SOURCES += $$PWD/qsql_ibase.cpp
+
+unix {
+ !contains(LIBS, .*gds.*):!contains(LIBS, .*libfb.*):LIBS += -lgds
+} else {
+ !contains(LIBS, .*gds.*):!contains(LIBS, .*fbclient.*) {
+ win32-borland:LIBS += gds32.lib
+ else:LIBS += -lgds32_ms
+ }
+}
diff --git a/src/sql/drivers/mysql/qsql_mysql.pri b/src/sql/drivers/mysql/qsql_mysql.pri
new file mode 100644
index 0000000000..1b9c3dd8ca
--- /dev/null
+++ b/src/sql/drivers/mysql/qsql_mysql.pri
@@ -0,0 +1,16 @@
+HEADERS += $$PWD/qsql_mysql.h
+SOURCES += $$PWD/qsql_mysql.cpp
+
+unix {
+ isEmpty(QT_LFLAGS_MYSQL) {
+ !contains(LIBS, .*mysqlclient.*):!contains(LIBS, .*mysqld.*) {
+ use_libmysqlclient_r:LIBS += -lmysqlclient_r
+ else:LIBS += -lmysqlclient
+ }
+ } else {
+ LIBS *= $$QT_LFLAGS_MYSQL
+ QMAKE_CXXFLAGS *= $$QT_CFLAGS_MYSQL
+ }
+} else {
+ !contains(LIBS, .*mysql.*):!contains(LIBS, .*mysqld.*):LIBS += -llibmysql
+}
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp
index 2f0cfdce58..e11cf75f23 100644
--- a/src/sql/drivers/oci/qsql_oci.cpp
+++ b/src/sql/drivers/oci/qsql_oci.cpp
@@ -93,8 +93,17 @@ enum { QOCIEncoding = 2002 }; // AL16UTF16LE
enum { QOCIEncoding = 2000 }; // AL16UTF16
#endif
-static const ub1 CSID_NCHAR = SQLCS_NCHAR;
+// Always set the OCI_ATTR_CHARSET_FORM to SQLCS_NCHAR is safe
+// because Oracle server will deal with the implicit Conversion
+// Between CHAR and NCHAR.
+// see: http://download.oracle.com/docs/cd/A91202_01/901_doc/appdev.901/a89857/oci05bnd.htm#422705
+static const ub1 qOraCharsetForm = SQLCS_NCHAR;
+
+#if defined (OCI_UTF16ID)
+static const ub2 qOraCharset = OCI_UTF16ID;
+#else
static const ub2 qOraCharset = OCI_UCS2ID;
+#endif
typedef QVarLengthArray<sb2, 32> IndicatorArray;
typedef QVarLengthArray<ub2, 32> SizeArray;
@@ -209,12 +218,24 @@ void QOCIResultPrivate::setCharset(OCIBind* hbnd)
OCI_HTYPE_BIND,
// this const cast is safe since OCI doesn't touch
// the charset.
+ const_cast<void *>(static_cast<const void *>(&qOraCharsetForm)),
+ 0,
+ OCI_ATTR_CHARSET_FORM,
+ err);
+ if (r != 0)
+ qOraWarning("QOCIResultPrivate::setCharset: Couldn't set OCI_ATTR_CHARSET_FORM: ", err);
+
+ r = OCIAttrSet(hbnd,
+ OCI_HTYPE_BIND,
+ // this const cast is safe since OCI doesn't touch
+ // the charset.
const_cast<void *>(static_cast<const void *>(&qOraCharset)),
0,
OCI_ATTR_CHARSET_ID,
err);
if (r != 0)
qOraWarning("QOCIResultPrivate::setCharset: Couldn't set OCI_ATTR_CHARSET_ID: ", err);
+
}
int QOCIResultPrivate::bindValue(OCIStmt *sql, OCIBind **hbnd, OCIError *err, int pos,
@@ -648,7 +669,7 @@ QByteArray qMakeOraDate(const QDateTime& dt)
QDateTime qMakeDate(const char* oraDate)
{
- int century = oraDate[0];
+ int century = uchar(oraDate[0]);
if(century >= 100){
int year = uchar(oraDate[1]);
year = ((century-100)*100) + (year-100);
@@ -939,6 +960,17 @@ void QOCICols::setCharset(OCIDefine* dfn)
OCI_HTYPE_DEFINE,
// this const cast is safe since OCI doesn't touch
// the charset.
+ const_cast<void *>(static_cast<const void *>(&qOraCharsetForm)),
+ 0,
+ OCI_ATTR_CHARSET_FORM,
+ d->err);
+ if (r != 0)
+ qOraWarning("QOCIResultPrivate::setCharset: Couldn't set OCI_ATTR_CHARSET_FORM: ", d->err);
+
+ r = OCIAttrSet(dfn,
+ OCI_HTYPE_DEFINE,
+ // this const cast is safe since OCI doesn't touch
+ // the charset.
const_cast<void *>(static_cast<const void *>(&qOraCharset)),
0,
OCI_ATTR_CHARSET_ID,
diff --git a/src/sql/drivers/oci/qsql_oci.pri b/src/sql/drivers/oci/qsql_oci.pri
new file mode 100644
index 0000000000..60ccc4c227
--- /dev/null
+++ b/src/sql/drivers/oci/qsql_oci.pri
@@ -0,0 +1,9 @@
+HEADERS += $$PWD/qsql_oci.h
+SOURCES += $$PWD/qsql_oci.cpp
+
+unix {
+ !contains(LIBS, .*clnts.*):LIBS += -lclntsh
+} else {
+ LIBS *= -loci
+}
+macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ
diff --git a/src/sql/drivers/odbc/qsql_odbc.pri b/src/sql/drivers/odbc/qsql_odbc.pri
new file mode 100644
index 0000000000..66a8d51af0
--- /dev/null
+++ b/src/sql/drivers/odbc/qsql_odbc.pri
@@ -0,0 +1,13 @@
+HEADERS += $$PWD/qsql_odbc.h
+SOURCES += $$PWD/qsql_odbc.cpp
+
+unix {
+ DEFINES += UNICODE
+ !contains(LIBS, .*odbc.*) {
+ macx:LIBS += -liodbc
+ else:LIBS += $$QT_LFLAGS_ODBC
+ }
+} else {
+ win32-borland:LIBS *= $(BCB)/lib/PSDK/odbc32.lib
+ else:LIBS *= -lodbc32
+}
diff --git a/src/sql/drivers/psql/qsql_psql.pri b/src/sql/drivers/psql/qsql_psql.pri
new file mode 100644
index 0000000000..97db4beb59
--- /dev/null
+++ b/src/sql/drivers/psql/qsql_psql.pri
@@ -0,0 +1,13 @@
+HEADERS += $$PWD/qsql_psql.h
+SOURCES += $$PWD/qsql_psql.cpp
+
+unix|win32-g++* {
+ !static:!isEmpty(QT_LFLAGS_PSQL) {
+ !contains(QT_CONFIG, system-zlib): QT_LFLAGS_PSQL -= -lz
+ LIBS *= $$QT_LFLAGS_PSQL
+ QMAKE_CXXFLAGS *= $$QT_CFLAGS_PSQL
+ }
+ !contains(LIBS, .*pq.*):LIBS += -lpq
+} else {
+ !contains(LIBS, .*pq.*):LIBS += -llibpq -lws2_32 -ladvapi32
+}
diff --git a/src/sql/drivers/sqlite/qsql_sqlite.pri b/src/sql/drivers/sqlite/qsql_sqlite.pri
new file mode 100644
index 0000000000..78a4e49979
--- /dev/null
+++ b/src/sql/drivers/sqlite/qsql_sqlite.pri
@@ -0,0 +1,11 @@
+HEADERS += $$PWD/qsql_sqlite.h
+SOURCES += $$PWD/qsql_sqlite.cpp
+
+symbian:include($$QT_SOURCE_TREE/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pri)
+
+!system-sqlite:!contains(LIBS, .*sqlite3.*) {
+ include($$PWD/../../../3rdparty/sqlite.pri)
+} else {
+ LIBS *= $$QT_LFLAGS_SQLITE
+ QMAKE_CXXFLAGS *= $$QT_CFLAGS_SQLITE
+}
diff --git a/src/sql/drivers/sqlite2/qsql_sqlite2.pri b/src/sql/drivers/sqlite2/qsql_sqlite2.pri
new file mode 100644
index 0000000000..9a9f6cdf9e
--- /dev/null
+++ b/src/sql/drivers/sqlite2/qsql_sqlite2.pri
@@ -0,0 +1,4 @@
+HEADERS += $$PWD/qsql_sqlite2.h
+SOURCES += $$PWD/qsql_sqlite2.cpp
+
+!contains(LIBS, .*sqlite.*):LIBS += -lsqlite
diff --git a/src/sql/drivers/tds/qsql_tds.h b/src/sql/drivers/tds/qsql_tds.h
index f23a672f92..3594a4d00f 100644
--- a/src/sql/drivers/tds/qsql_tds.h
+++ b/src/sql/drivers/tds/qsql_tds.h
@@ -48,7 +48,10 @@
#ifdef Q_OS_WIN32
#define WIN32_LEAN_AND_MEAN
+#ifndef Q_USE_SYBASE
#define DBNTWIN32 // indicates 32bit windows dblib
+#endif
+#include <winsock2.h>
#include <QtCore/qt_windows.h>
#include <sqlfront.h>
#include <sqldb.h>
diff --git a/src/sql/drivers/tds/qsql_tds.pri b/src/sql/drivers/tds/qsql_tds.pri
new file mode 100644
index 0000000000..c552ead1a7
--- /dev/null
+++ b/src/sql/drivers/tds/qsql_tds.pri
@@ -0,0 +1,10 @@
+HEADERS += $$PWD/qsql_tds.h
+SOURCES += $$PWD/qsql_tds.cpp
+
+unix {
+ !contains(LIBS, .*sybdb.*):LIBS += -lsybdb
+} else:win32-borland {
+ LIBS *= $(BCB)/lib/PSDK/NTWDBLIB.LIB
+} else {
+ LIBS *= -lNTWDBLIB
+}
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 76bc2b06bb..2ab37deed6 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -60,7 +60,10 @@
#include "../drivers/oci/qsql_oci.h"
#endif
#ifdef QT_SQL_TDS
+// conflicting RETCODE typedef between odbc and freetds
+#define RETCODE DBRETCODE
#include "../drivers/tds/qsql_tds.h"
+#undef RETCODE
#endif
#ifdef QT_SQL_DB2
#include "../drivers/db2/qsql_db2.h"
diff --git a/src/svg/qsvgstyle.cpp b/src/svg/qsvgstyle.cpp
index 0d1bad9cb0..f228a7799d 100644
--- a/src/svg/qsvgstyle.cpp
+++ b/src/svg/qsvgstyle.cpp
@@ -241,7 +241,7 @@ void QSvgFontStyle::apply(QPainter *p, const QSvgNode *, QSvgExtraStates &states
}
if (m_sizeSet)
- font.setPointSize(m_qfont.pointSizeF());
+ font.setPointSizeF(m_qfont.pointSizeF());
if (m_styleSet)
font.setStyle(m_qfont.style());
diff --git a/src/svg/qsvgstyle_p.h b/src/svg/qsvgstyle_p.h
index af3b4e57d0..dfea12c56d 100644
--- a/src/svg/qsvgstyle_p.h
+++ b/src/svg/qsvgstyle_p.h
@@ -338,7 +338,7 @@ public:
{
// Store the _pixel_ size in the font. Since QFont::setPixelSize() only takes an int, call
// QFont::SetPointSize() instead. Set proper font size just before rendering.
- m_qfont.setPointSize(size);
+ m_qfont.setPointSizeF(size);
m_sizeSet = 1;
}
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 63e22cccd3..17f1a6b3b0 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -54,7 +54,6 @@
#include <QtCore/qdir.h>
#include <QtCore/qprocess.h>
#include <QtCore/qdebug.h>
-#include <QtCore/qlibraryinfo.h>
#include "QtTest/private/qtestlog_p.h"
#include "QtTest/private/qtesttable_p.h"
@@ -1008,9 +1007,6 @@ static void qParseArgs(int argc, char *argv[])
" -iterations n : Sets the number of accumulation iterations.\n"
" -median n : Sets the number of median iterations.\n"
" -vb : Print out verbose benchmarking information.\n"
-#if !defined(QT_NO_PROCESS) && !defined(QT_NO_SETTINGS)
- " -chart : Create chart based on the benchmark result.\n"
-#endif
"\n"
" -help : This help\n";
@@ -1128,12 +1124,8 @@ static void qParseArgs(int argc, char *argv[])
} else if (strcmp(argv[i], "-vb") == 0) {
QBenchmarkGlobalData::current->verboseOutput = true;
-#if !defined(QT_NO_PROCESS) && !defined(QT_NO_SETTINGS)
} else if (strcmp(argv[i], "-chart") == 0) {
- QBenchmarkGlobalData::current->createChart = true;
- QTestLog::setLogMode(QTestLog::XML);
- QTestLog::redirectOutput("results.xml");
-#endif
+ fprintf(stderr, "Warning: `-chart' option is not available\n");
} else if (strcmp(argv[i], "-qws") == 0) {
// do nothing
} else if (strcmp(argv[i], "-graphicssystem") == 0) {
@@ -1743,26 +1735,6 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
}
#endif
-
-#if !defined(QT_NO_PROCESS) && !defined(QT_NO_SETTINGS)
- if (QBenchmarkGlobalData::current->createChart) {
- QString chartLocation = QLibraryInfo::location(QLibraryInfo::BinariesPath);
-#ifdef Q_OS_WIN
- chartLocation += QLatin1String("/../tools/qtestlib/chart/release/chart.exe");
-#else
- chartLocation += QLatin1String("/../tools/qtestlib/chart/chart");
-#endif
- if (QFile::exists(chartLocation)) {
- QProcess p;
- p.setProcessChannelMode(QProcess::ForwardedChannels);
- p.start(chartLocation, QStringList() << QLatin1String("results.xml"));
- p.waitForFinished(-1);
- } else {
- qDebug() << QLatin1String("Could not find the chart tool in ") + chartLocation + QLatin1String(", please make sure it is compiled.");
- }
- }
-#endif
-
#if defined(QTEST_NOEXITCODE)
return 0;
#else
diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp
index 10a80f332e..84d1567254 100644
--- a/src/tools/moc/moc.cpp
+++ b/src/tools/moc/moc.cpp
@@ -1208,6 +1208,12 @@ bool Moc::until(Token target) {
default: break;
}
}
+
+ //when searching commas within the default argument, we should take care of template depth (anglecount)
+ // unfortunatelly, we do not have enough semantic information to know if '<' is the operator< or
+ // the begining of a template type. so we just use heuristics.
+ int possible = -1;
+
while (index < symbols.size()) {
Token t = symbols.at(index++).token;
switch (t) {
@@ -1226,8 +1232,16 @@ bool Moc::until(Token target) {
&& braceCount <= 0
&& brackCount <= 0
&& parenCount <= 0
- && (target != RANGLE || angleCount <= 0))
+ && (target != RANGLE || angleCount <= 0)) {
+ if (target != COMMA || angleCount <= 0)
+ return true;
+ possible = index;
+ }
+
+ if (target == COMMA && t == EQ && possible != -1) {
+ index = possible;
return true;
+ }
if (braceCount < 0 || brackCount < 0 || parenCount < 0
|| (target == RANGLE && angleCount < 0)) {
@@ -1235,6 +1249,12 @@ bool Moc::until(Token target) {
break;
}
}
+
+ if(target == COMMA && angleCount != 0 && possible != -1) {
+ index = possible;
+ return true;
+ }
+
return false;
}