summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIain <qt-info@nokia.com>2009-05-26 15:17:31 (GMT)
committerIain <qt-info@nokia.com>2009-05-26 15:17:31 (GMT)
commit82f8c6fbc0006d08638a397941f170e2bee6460d (patch)
tree3fc8b33e139a28d17482b9fe7bd349896cbd5ece
parent8d9b58cde5d1ad6c6684bcc3516cd3782b946bfc (diff)
parent4998ad5f72314b48ad8c8115b64f4cb4b747c2bc (diff)
downloadQt-82f8c6fbc0006d08638a397941f170e2bee6460d.zip
Qt-82f8c6fbc0006d08638a397941f170e2bee6460d.tar.gz
Qt-82f8c6fbc0006d08638a397941f170e2bee6460d.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt-s60-public
-rwxr-xr-x.hgignore4
-rw-r--r--bin/build_release_package.pl60
-rwxr-xr-xconfigure30
-rwxr-xr-xconfigure.exebin868352 -> 535040 bytes
-rw-r--r--demos/boxes/glextensions.h7
-rw-r--r--demos/demos.pro2
-rw-r--r--dist/changes-4.5.227
-rw-r--r--doc/src/accessible.qdoc2
-rw-r--r--doc/src/credits.qdoc2
-rw-r--r--doc/src/deployment.qdoc2
-rw-r--r--doc/src/examples/codeeditor.qdoc2
-rw-r--r--doc/src/examples/containerextension.qdoc2
-rw-r--r--doc/src/examples/fancybrowser.qdoc103
-rw-r--r--doc/src/examples/fortuneserver.qdoc2
-rw-r--r--doc/src/examples/ftp.qdoc4
-rw-r--r--doc/src/examples/icons.qdoc2
-rw-r--r--doc/src/examples/musicplayerexample.qdoc2
-rw-r--r--doc/src/examples/qobjectxmlmodel.qdoc2
-rw-r--r--doc/src/examples/tabdialog.qdoc2
-rw-r--r--doc/src/examples/tooltips.qdoc2
-rw-r--r--doc/src/examples/trafficinfo.qdoc2
-rw-r--r--doc/src/examples/transformations.qdoc2
-rw-r--r--doc/src/examples/trollprint.qdoc2
-rw-r--r--doc/src/images/inputdialogs.pngbin4244 -> 30369 bytes
-rw-r--r--doc/src/layout.qdoc22
-rw-r--r--doc/src/licenses.qdoc2
-rw-r--r--doc/src/mac-differences.qdoc2
-rw-r--r--doc/src/model-view-programming.qdoc2
-rw-r--r--doc/src/phonon-api.qdoc2
-rw-r--r--doc/src/porting4-overview.qdoc6
-rw-r--r--doc/src/q3valuelist.qdoc2
-rw-r--r--doc/src/qalgorithms.qdoc2
-rw-r--r--doc/src/qmake-manual.qdoc9
-rw-r--r--doc/src/qset.qdoc2
-rw-r--r--doc/src/qstyles.qdoc261
-rw-r--r--doc/src/qtdesigner.qdoc2
-rw-r--r--doc/src/qtscriptdebugger-manual.qdoc2
-rw-r--r--doc/src/snippets/code/doc_src_layout.qdoc45
-rw-r--r--doc/src/snippets/sqldatabase/sqldatabase.cpp2
-rw-r--r--doc/src/stylesheet.qdoc16
-rw-r--r--doc/src/tech-preview/known-issues.html2
-rw-r--r--doc/src/timers.qdoc4
-rw-r--r--doc/src/xquery-introduction.qdoc2
-rw-r--r--examples/opengl/hellogl_es/hellogl_es.pro12
-rw-r--r--examples/webkit/fancybrowser/mainwindow.cpp20
-rw-r--r--examples/webkit/fancybrowser/mainwindow.h4
-rw-r--r--examples/xmlpatterns/trafficinfo/main.cpp2
-rw-r--r--examples/xmlpatterns/trafficinfo/mainwindow.cpp2
-rw-r--r--examples/xmlpatterns/trafficinfo/mainwindow.h2
-rw-r--r--examples/xmlpatterns/trafficinfo/stationdialog.cpp2
-rw-r--r--examples/xmlpatterns/trafficinfo/stationdialog.h2
-rw-r--r--examples/xmlpatterns/trafficinfo/stationquery.cpp2
-rw-r--r--examples/xmlpatterns/trafficinfo/stationquery.h2
-rw-r--r--examples/xmlpatterns/trafficinfo/timequery.cpp2
-rw-r--r--examples/xmlpatterns/trafficinfo/timequery.h2
-rw-r--r--mkspecs/common/symbian/symbian.conf2
-rw-r--r--mkspecs/features/win32/ltcg.prf5
-rw-r--r--mkspecs/win32-msvc2005/qmake.conf7
-rw-r--r--mkspecs/win32-msvc2008/qmake.conf7
-rw-r--r--mkspecs/wince50standard-mipsii-msvc2008/default_post.prf2
-rw-r--r--qmake/generators/xmloutput.cpp2
-rw-r--r--src/3rdparty/phonon/phonon/phonon_export.h6
-rw-r--r--src/3rdparty/phonon/phonon/phononnamespace.h5
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog140
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp27
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp12
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp2
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp19
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp13
-rw-r--r--src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h3
-rw-r--r--src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp1
-rw-r--r--src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp11
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog25
-rw-r--r--src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp8
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp39
-rw-r--r--src/corelib/arch/qatomic_mips.h106
-rw-r--r--src/corelib/concurrent/qfuturewatcher.cpp2
-rw-r--r--src/corelib/concurrent/qtconcurrentiteratekernel.cpp6
-rw-r--r--src/corelib/concurrent/qtconcurrentiteratekernel.h10
-rw-r--r--src/corelib/concurrent/qtconcurrentthreadengine.h1
-rw-r--r--src/corelib/global/qglobal.h4
-rw-r--r--src/corelib/io/qdiriterator.cpp4
-rw-r--r--src/corelib/io/qfile.cpp26
-rw-r--r--src/corelib/io/qfsfileengine.cpp122
-rw-r--r--src/corelib/io/qfsfileengine_unix.cpp11
-rw-r--r--src/corelib/io/qfsfileengine_win.cpp83
-rw-r--r--src/corelib/io/qiodevice.cpp7
-rw-r--r--src/corelib/io/qprocess_unix.cpp23
-rw-r--r--src/corelib/io/qresource.cpp2
-rw-r--r--src/corelib/io/qsettings.cpp2
-rw-r--r--src/corelib/io/qtemporaryfile.cpp96
-rw-r--r--src/corelib/io/qurl.cpp6
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp4
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian.cpp170
-rw-r--r--src/corelib/kernel/qeventdispatcher_symbian_p.h54
-rw-r--r--src/corelib/kernel/qobject.cpp30
-rw-r--r--src/corelib/kernel/qobject_p.h1
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp4
-rw-r--r--src/corelib/kernel/qsharedmemory_unix.cpp4
-rw-r--r--src/corelib/kernel/qsystemsemaphore_p.h4
-rw-r--r--src/corelib/kernel/qtimer.cpp2
-rw-r--r--src/corelib/kernel/qtranslator.cpp4
-rw-r--r--src/corelib/kernel/qvariant.cpp5
-rw-r--r--src/corelib/tools/qbytearraymatcher.h2
-rw-r--r--src/corelib/tools/qhash.cpp220
-rw-r--r--src/corelib/tools/qhash.h5
-rw-r--r--src/corelib/tools/qlocale.cpp801
-rw-r--r--src/corelib/tools/qlocale_symbian.cpp840
-rw-r--r--src/corelib/tools/qrect.cpp2
-rw-r--r--src/corelib/tools/qsharedpointer_impl.h21
-rw-r--r--src/corelib/tools/qsize.cpp2
-rw-r--r--src/corelib/tools/qstring.cpp4
-rw-r--r--src/corelib/tools/qstringlist.cpp2
-rw-r--r--src/corelib/tools/qtimeline.cpp4
-rw-r--r--src/corelib/tools/tools.pri1
-rw-r--r--src/dbus/qdbusintegrator.cpp11
-rw-r--r--src/gui/dialogs/qmessagebox.cpp13
-rw-r--r--src/gui/dialogs/qpagesetupdialog.cpp6
-rw-r--r--src/gui/dialogs/qpagesetupdialog_mac.mm3
-rw-r--r--src/gui/dialogs/qsidebar.cpp4
-rw-r--r--src/gui/dialogs/qwizard.cpp4
-rw-r--r--src/gui/dialogs/qwizard_win.cpp5
-rw-r--r--src/gui/dialogs/qwizard_win_p.h2
-rw-r--r--src/gui/embedded/qscreen_qws.cpp2
-rw-r--r--src/gui/embedded/qsoundqss_qws.cpp40
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp4
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp21
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.cpp14
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp14
-rw-r--r--src/gui/gui.pro5
-rw-r--r--src/gui/image/qicon.cpp5
-rw-r--r--src/gui/image/qimage.cpp2
-rw-r--r--src/gui/image/qpixmap.cpp2
-rw-r--r--src/gui/image/qpixmap_win.cpp1
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp8
-rw-r--r--src/gui/itemviews/qitemdelegate.cpp5
-rw-r--r--src/gui/itemviews/qlistwidget.cpp2
-rw-r--r--src/gui/itemviews/qstyleditemdelegate.cpp3
-rw-r--r--src/gui/kernel/qapplication.cpp6
-rw-r--r--src/gui/kernel/qapplication_s60.cpp40
-rw-r--r--src/gui/kernel/qclipboard.cpp2
-rw-r--r--src/gui/kernel/qcocoapanel_mac.mm11
-rw-r--r--src/gui/kernel/qcocoawindow_mac.mm13
-rw-r--r--src/gui/kernel/qevent.cpp13
-rw-r--r--src/gui/kernel/qshortcutmap.cpp1
-rw-r--r--src/gui/kernel/qt_s60_p.h1
-rw-r--r--src/gui/kernel/qwidget.cpp23
-rw-r--r--src/gui/kernel/qwidget_mac.mm14
-rw-r--r--src/gui/painting/qcolor.cpp12
-rw-r--r--src/gui/painting/qcolormap_x11.cpp4
-rw-r--r--src/gui/painting/qemulationpaintengine.cpp22
-rw-r--r--src/gui/painting/qpainter.cpp4
-rw-r--r--src/gui/painting/qpainterpath.cpp2
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp11
-rw-r--r--src/gui/painting/qtransform.cpp8
-rw-r--r--src/gui/styles/gtksymbols.cpp27
-rw-r--r--src/gui/styles/qcommonstyle.cpp2
-rw-r--r--src/gui/styles/qgtkstyle.cpp13
-rw-r--r--src/gui/styles/qmacstyle_mac.mm161
-rw-r--r--src/gui/styles/qs60style.cpp992
-rw-r--r--src/gui/styles/qs60style_p.h50
-rw-r--r--src/gui/styles/qs60style_simulated.cpp22
-rw-r--r--src/gui/styles/qs60style_symbian.cpp234
-rw-r--r--src/gui/text/qcssparser.cpp19
-rw-r--r--src/gui/text/qfont.cpp14
-rw-r--r--src/gui/text/qfont_x11.cpp11
-rw-r--r--src/gui/text/qfontdatabase_x11.cpp2
-rw-r--r--src/gui/text/qfontengine_ft.cpp2
-rw-r--r--src/gui/text/qfontengine_mac.mm4
-rw-r--r--src/gui/text/qfontengine_win.cpp6
-rw-r--r--src/gui/text/qtextengine.cpp40
-rw-r--r--src/gui/text/qtextformat.cpp2
-rw-r--r--src/gui/text/qtexttable.cpp7
-rw-r--r--src/gui/util/qundostack.cpp2
-rw-r--r--src/gui/widgets/qcalendarwidget.cpp2
-rw-r--r--src/gui/widgets/qcombobox.cpp22
-rw-r--r--src/gui/widgets/qcombobox_p.h6
-rw-r--r--src/gui/widgets/qlcdnumber.cpp2
-rw-r--r--src/gui/widgets/qlineedit.cpp2
-rw-r--r--src/gui/widgets/qmainwindow.cpp8
-rw-r--r--src/gui/widgets/qmdiarea.cpp2
-rw-r--r--src/gui/widgets/qmenu_p.h2
-rw-r--r--src/gui/widgets/qmenu_wince.cpp2
-rw-r--r--src/gui/widgets/qmenubar.cpp2
-rw-r--r--src/gui/widgets/qscrollarea.cpp2
-rw-r--r--src/gui/widgets/qsplitter.cpp2
-rw-r--r--src/gui/widgets/qtabwidget.cpp2
-rw-r--r--src/gui/widgets/qtoolbox.cpp2
-rw-r--r--src/network/access/qhttp.cpp6
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp34
-rw-r--r--src/network/access/qhttpnetworkreply.cpp59
-rw-r--r--src/network/access/qhttpnetworkreply_p.h2
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp42
-rw-r--r--src/network/access/qnetworkdiskcache.cpp6
-rw-r--r--src/network/kernel/qauthenticator.cpp9
-rw-r--r--src/network/kernel/qhostinfo_win.cpp15
-rw-r--r--src/network/kernel/qnetworkinterface.cpp2
-rw-r--r--src/network/kernel/qnetworkproxy.cpp4
-rw-r--r--src/network/kernel/qurlinfo.cpp4
-rw-r--r--src/network/socket/qabstractsocket.cpp4
-rw-r--r--src/network/socket/qhttpsocketengine.cpp4
-rw-r--r--src/network/socket/qlocalserver.cpp4
-rw-r--r--src/network/socket/qlocalsocket_unix.cpp3
-rw-r--r--src/network/socket/qnativesocketengine_p.h37
-rw-r--r--src/network/socket/qnativesocketengine_unix.cpp61
-rw-r--r--src/network/socket/qnativesocketengine_win.cpp35
-rw-r--r--src/opengl/qgl.cpp50
-rw-r--r--src/opengl/qgl_win.cpp16
-rw-r--r--src/opengl/qgl_wince.cpp3
-rw-r--r--src/opengl/qgl_x11.cpp30
-rw-r--r--src/plugins/accessible/widgets/rangecontrols.h2
-rw-r--r--src/plugins/accessible/widgets/simplewidgets.h1
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp3
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp2
-rw-r--r--src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp13
-rw-r--r--src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp12
-rw-r--r--src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro4
-rw-r--r--src/qt3support/network/q3http.cpp2
-rw-r--r--src/qt3support/network/q3urloperator.cpp2
-rw-r--r--src/qt3support/widgets/q3action.cpp2
-rw-r--r--src/qt3support/widgets/q3groupbox.cpp4
-rw-r--r--src/qt3support/widgets/q3popupmenu.cpp2
-rw-r--r--src/qt3support/widgets/q3progressbar.cpp2
-rw-r--r--src/qt3support/widgets/q3scrollview.cpp2
-rw-r--r--src/s60installs/qt_libs.pro2
-rw-r--r--src/script/qscriptvalueiterator.cpp4
-rw-r--r--src/scripttools/debugging/qscriptenginedebugger.cpp13
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.cpp18
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp134
-rw-r--r--src/sql/drivers/oci/qsql_oci.cpp12
-rw-r--r--src/sql/kernel/qsqldatabase.cpp2
-rw-r--r--src/sql/kernel/qsqlquery.cpp2
-rw-r--r--src/src.pro4
-rw-r--r--src/svg/qsvghandler.cpp15
-rw-r--r--src/testlib/qtest_global.h4
-rw-r--r--src/xml/sax/qxml.cpp2
-rw-r--r--src/xmlpatterns/expr/qpath.cpp2
-rw-r--r--src/xmlpatterns/expr/qxsltsimplecontentconstructor.cpp2
-rw-r--r--tests/auto/_networkselftest/_networkselftest.pro6
-rw-r--r--tests/auto/_networkselftest/tst_networkselftest.cpp592
-rw-r--r--tests/auto/auto.pro3
-rw-r--r--tests/auto/macgui/tst_gui.cpp7
-rw-r--r--tests/auto/network-settings.h31
-rw-r--r--tests/auto/q3socketdevice/tst_q3socketdevice.cpp7
-rw-r--r--tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp53
-rw-r--r--tests/auto/qcolor/tst_qcolor.cpp21
-rw-r--r--tests/auto/qcombobox/tst_qcombobox.cpp24
-rw-r--r--tests/auto/qcssparser/tst_cssparser.cpp13
-rw-r--r--tests/auto/qfile/copy-fallback.qrc5
-rw-r--r--tests/auto/qfile/test/test.pro2
-rw-r--r--tests/auto/qfile/tst_qfile.cpp37
-rw-r--r--tests/auto/qftp/tst_qftp.cpp4
-rw-r--r--tests/auto/qfuture/tst_qfuture.cpp2
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp110
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp4
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp24
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp85
-rw-r--r--tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp3
-rw-r--r--tests/auto/qimage/tst_qimage.cpp6
-rw-r--r--tests/auto/qiodevice/tst_qiodevice.cpp2
-rw-r--r--tests/auto/qitemdelegate/tst_qitemdelegate.cpp78
-rw-r--r--tests/auto/qitemmodel/tst_qitemmodel.cpp2
-rw-r--r--tests/auto/qitemview/tst_qitemview.cpp2
-rw-r--r--tests/auto/qlibrary/lib2/lib2.pro7
-rw-r--r--tests/auto/qlibrary/qlibrary.pro13
-rw-r--r--tests/auto/qlocalsocket/lackey/lackey.pro2
-rw-r--r--tests/auto/qlocalsocket/test/test.pro3
-rw-r--r--tests/auto/qlocalsocket/tst_qlocalsocket.cpp12
-rw-r--r--tests/auto/qmake/testcompiler.cpp6
-rw-r--r--tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp10
-rw-r--r--tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp3
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp135
-rw-r--r--tests/auto/qobjectrace/tst_qobjectrace.cpp89
-rw-r--r--tests/auto/qprinter/tst_qprinter.cpp5
-rw-r--r--tests/auto/qprocess/tst_qprocess.cpp10
-rw-r--r--tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp33
-rw-r--r--tests/auto/qsharedpointer/tst_qsharedpointer.cpp137
-rw-r--r--tests/auto/qsidebar/tst_qsidebar.cpp9
-rw-r--r--tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp13
-rw-r--r--tests/auto/qsplitter/tst_qsplitter.cpp5
-rw-r--r--tests/auto/qsqlquery/tst_qsqlquery.cpp22
-rw-r--r--tests/auto/qsslsocket/qsslsocket.pro20
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp76
-rw-r--r--tests/auto/qtcpsocket/tst_qtcpsocket.cpp20
-rw-r--r--tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp38
-rw-r--r--tests/auto/qtessellator/testtessellator.cpp2
-rw-r--r--tests/auto/qtessellator/tst_tessellator.cpp8
-rw-r--r--tests/auto/qtessellator/utils.cpp2
-rw-r--r--tests/auto/qthreadonce/tst_qthreadonce.cpp2
-rw-r--r--tests/auto/qtimer/tst_qtimer.cpp87
-rw-r--r--tests/auto/qwidget/tst_qwidget.cpp1
-rw-r--r--tests/auto/qxmlstream/XML-Test-Suite-LICENSE.txt59
-rw-r--r--tests/auto/uic/baseline/languagesdialog.ui.h12
-rw-r--r--tests/auto/utf8/tst_utf8.cpp309
-rw-r--r--tests/auto/utf8/utf8.pro3
-rwxr-xr-xtests/benchmarks/qiodevice/main.cpp2
-rwxr-xr-xtests/benchmarks/qiodevice/qiodevice.pro1
-rw-r--r--tools/assistant/tools/assistant/assistant.qchbin368640 -> 368640 bytes
-rw-r--r--tools/assistant/tools/assistant/bookmarkmanager.cpp77
-rw-r--r--tools/assistant/tools/assistant/contentwindow.cpp9
-rw-r--r--tools/assistant/tools/assistant/indexwindow.cpp9
-rw-r--r--tools/assistant/tools/assistant/mainwindow.cpp30
-rw-r--r--tools/configure/configureapp.cpp17
-rw-r--r--tools/designer/src/components/formeditor/formwindow_widgetstack.cpp6
-rw-r--r--tools/designer/src/components/formeditor/formwindow_widgetstack.h3
-rw-r--r--tools/designer/src/lib/shared/formwindowbase.cpp10
-rw-r--r--tools/designer/src/lib/shared/formwindowbase_p.h3
-rw-r--r--tools/designer/src/lib/shared/qdesigner_propertycommand.cpp4
-rw-r--r--tools/designer/src/uitools/quiloader.cpp194
-rw-r--r--tools/linguist/shared/java.cpp16
-rw-r--r--tools/macdeployqt/shared/shared.cpp4
-rw-r--r--tools/porting/src/portingrules.cpp2
-rw-r--r--tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp6
-rw-r--r--translations/assistant_de.qmbin20332 -> 18688 bytes
-rw-r--r--translations/assistant_de.ts110
-rw-r--r--translations/assistant_ja.ts395
-rw-r--r--translations/designer_de.qmbin152455 -> 151189 bytes
-rw-r--r--translations/designer_de.ts12
-rw-r--r--translations/linguist_de.qmbin47074 -> 45915 bytes
-rw-r--r--translations/linguist_de.ts365
-rw-r--r--translations/qt_de.qmbin181913 -> 181348 bytes
-rw-r--r--translations/qt_de.ts110
-rw-r--r--translations/qt_help_de.qmbin9381 -> 9583 bytes
-rw-r--r--translations/qt_help_de.ts2
-rw-r--r--util/install/archive/archive.pro9
-rw-r--r--util/install/archive/qarchive.cpp471
-rw-r--r--util/install/archive/qarchive.h138
-rw-r--r--util/install/configure_installer.cache30
-rw-r--r--util/install/install.pro9
-rw-r--r--util/install/keygen/keygen.pro13
-rw-r--r--util/install/keygen/keyinfo.cpp164
-rw-r--r--util/install/keygen/keyinfo.h123
-rw-r--r--util/install/keygen/main.cpp250
-rw-r--r--util/install/mac/licensedlg.ui134
-rw-r--r--util/install/mac/licensedlgimpl.cpp65
-rw-r--r--util/install/mac/licensedlgimpl.h55
-rw-r--r--util/install/mac/mac.pro11
-rw-r--r--util/install/mac/main.cpp117
-rw-r--r--util/install/mac/unpackage.icnsbin29372 -> 0 bytes
-rw-r--r--util/install/mac/unpackdlg.ui330
-rw-r--r--util/install/mac/unpackdlgimpl.cpp200
-rw-r--r--util/install/mac/unpackdlgimpl.h63
-rw-r--r--util/install/package/main.cpp397
-rw-r--r--util/install/package/package.pro25
-rw-r--r--util/install/win/archive.cpp115
-rw-r--r--util/install/win/archive.h49
-rw-r--r--util/install/win/dialogs/folderdlg.ui184
-rw-r--r--util/install/win/dialogs/folderdlgimpl.cpp119
-rw-r--r--util/install/win/dialogs/folderdlgimpl.h65
-rw-r--r--util/install/win/environment.cpp362
-rw-r--r--util/install/win/environment.h73
-rw-r--r--util/install/win/globalinformation.cpp168
-rw-r--r--util/install/win/globalinformation.h93
-rw-r--r--util/install/win/install-edu.rc3
-rw-r--r--util/install/win/install-eval.rc3
-rw-r--r--util/install/win/install-noncommercial.rc4
-rw-r--r--util/install/win/install-qsa.rc5
-rw-r--r--util/install/win/install.icobin2998 -> 0 bytes
-rw-r--r--util/install/win/install.rc4
-rw-r--r--util/install/win/main.cpp100
-rw-r--r--util/install/win/pages/buildpage.ui92
-rw-r--r--util/install/win/pages/configpage.ui474
-rw-r--r--util/install/win/pages/finishpage.ui63
-rw-r--r--util/install/win/pages/folderspage.ui259
-rw-r--r--util/install/win/pages/licenseagreementpage.ui202
-rw-r--r--util/install/win/pages/licensepage.ui264
-rw-r--r--util/install/win/pages/optionspage.ui503
-rw-r--r--util/install/win/pages/pages.cpp349
-rw-r--r--util/install/win/pages/pages.h226
-rw-r--r--util/install/win/pages/progresspage.ui78
-rw-r--r--util/install/win/pages/sidedecoration.ui108
-rw-r--r--util/install/win/pages/sidedecorationimpl.cpp205
-rw-r--r--util/install/win/pages/sidedecorationimpl.h70
-rw-r--r--util/install/win/pages/winintropage.ui39
-rw-r--r--util/install/win/qt.arq3
-rw-r--r--util/install/win/resource.cpp162
-rw-r--r--util/install/win/resource.h77
-rw-r--r--util/install/win/setupwizardimpl.cpp2571
-rw-r--r--util/install/win/setupwizardimpl.h276
-rw-r--r--util/install/win/setupwizardimpl_config.cpp1564
-rw-r--r--util/install/win/shell.cpp472
-rw-r--r--util/install/win/shell.h87
-rw-r--r--util/install/win/uninstaller/quninstall.pro7
-rw-r--r--util/install/win/uninstaller/uninstall.ui167
-rw-r--r--util/install/win/uninstaller/uninstaller.cpp142
-rw-r--r--util/install/win/uninstaller/uninstallimpl.cpp75
-rw-r--r--util/install/win/uninstaller/uninstallimpl.h54
-rw-r--r--util/install/win/win.pro136
-rwxr-xr-xutil/webkit/mkdist-webkit2
393 files changed, 6682 insertions, 16140 deletions
diff --git a/.hgignore b/.hgignore
index 784d507..eb6ff05 100755
--- a/.hgignore
+++ b/.hgignore
@@ -5,6 +5,8 @@ syntax: glob
*~
*.a
+*.la
+*.pc
*.core
*.moc
*.o
@@ -45,7 +47,9 @@ bin/rcc*
bin/uic*
bin/qcollectiongenerator
bin/qhelpgenerator
+bin/macdeployqt
tools/qdoc3/qdoc3*
+tools/macdeployqt/macchangeqt/macchangeqt
#configure.cache
mkspecs/default
mkspecs/qconfig.pri
diff --git a/bin/build_release_package.pl b/bin/build_release_package.pl
index 0a35062..0df5995 100644
--- a/bin/build_release_package.pl
+++ b/bin/build_release_package.pl
@@ -16,57 +16,58 @@ if (@ARGV)
my $cert = shift(@ARGV);
my $certKey = shift(@ARGV);
my $releaseDir = shift(@ARGV);
+ my $qtRootDir = shift(@ARGV);
my $epocroot = shift(@ARGV);
if ($build eq "")
{
print("HW build parameter required!\n");
- exit;
+ exit 1;
}
if ($cert eq "")
{
print("Signing certificate parameter required!\n");
- exit;
+ exit 2;
}
if ($certKey eq "")
{
print("Signing certificate key parameter required!\n");
- exit;
+ exit 3;
}
if ($releaseDir eq "")
{
print("Release directory parameter required!\n");
- exit;
+ exit 4;
}
- if ($epocroot eq "")
+ if ($qtRootDir eq "")
{
- $epocroot = "\\";
+ $qtRootDir = cwd();
+ $qtRootDir =~ s/\//\\/g;
}
- if ($epocroot =~ m/.*[^\\]$/)
- {
- $epocroot = "${epocroot}\\";
- }
+ # Lose the ending separator is any
+ $qtRootDir =~ s/\\$//;
+ $epocroot =~ s/\\$//;
+ chdir($qtRootDir);
+
+ # Lose the drive designator from epocroot
$epocroot =~ s/.://;
my $releaseDirQt = "${releaseDir}\\qt";
my $releaseDirEpocroot = "${releaseDir}\\epocroot";
- my $releaseDirSis = "${releaseDir}\\sis";
-
- my $qtRootDir = cwd();
- $qtRootDir =~ s/\//\\/g; # Fix dir separators
+ my $releaseDirSis = $releaseDirQt; # Put sis files to Qt source dir root
my $qtRootDirForMatch = $qtRootDir; # Double backslashes so that variable can be used in matching
- $qtRootDirForMatch =~ s/\\/\\\\/;
+ $qtRootDirForMatch =~ s/\\/\\\\/g;
my $pkgFileName = "src\\s60installs\\qt_libs_${platform}_${build}.pkg";
- my $hwBuildDir = "${epocroot}epoc32\\release\\$platform\\$build";
+ my $hwBuildDir = "${epocroot}\\epoc32\\release\\$platform\\$build";
my $armDbgDir = "epoc32\\release\\armv5\\udeb";
my $armRelDir = "epoc32\\release\\armv5\\urel";
my $gcceDbgDir = "epoc32\\release\\gcce\\udeb";
@@ -76,21 +77,23 @@ if (@ARGV)
# clean up old stuff
system("rd /S /Q ${releaseDir} 2> NUL");
- system("rd /S /Q ${epocroot}epoc32\\build 2> NUL"); # Just in case env is not clean
+ system("rd /S /Q ${epocroot}\\epoc32\\build 2> NUL"); # Just in case env is not clean
# Copy the whole thing over to the release dir before it gets polluted
print("Copying clean tree...\n");
my $tempExcludeFile = "${releaseDir}\\__temp_exclude.txt";
system("mkdir ${releaseDir} 2>NUL");
- runSystemCmd("echo \\.git\\ > ${tempExcludeFile}");
+ runSystemCmd("echo ${qtRootDir}\\.git\\ > ${tempExcludeFile}");
+ runSystemCmd("echo ${qtRootDir}\\tests\\ >> ${tempExcludeFile}");
+ runSystemCmd("echo ${qtRootDir}\\util\\ >> ${tempExcludeFile}");
runSystemCmd("xcopy ${qtRootDir} ${releaseDirQt} /E /I /H /Q /EXCLUDE:${tempExcludeFile}");
system("del /F /Q ${tempExcludeFile} 2> NUL");
# Clear archive flag from all items in \epoc32\release\armv5\urel and \epoc32\release\armv5\lib
# as those will have the binaries used for all platforms and builds.
runSystemCmd("attrib -A ${hwBuildDir}\\*");
- runSystemCmd("attrib -A ${epocroot}${armLibDir}\\*");
- runSystemCmd("attrib -A ${epocroot}${winscwDbgDir}\\*");
+ runSystemCmd("attrib -A ${epocroot}\\${armLibDir}\\*");
+ runSystemCmd("attrib -A ${epocroot}\\${winscwDbgDir}\\*");
# Build Qt
runSystemCmd("configure -platform win32-mwc -xplatform symbian-abld -openssl-linked -qt-sql-sqlite -system-sqlite -nokia-developer");
@@ -168,8 +171,8 @@ if (@ARGV)
system("del /F /Q ${releaseDirEpocroot}\\${armRelDir}\\*.sym 2> NUL");
runSystemCmd("xcopy ${releaseDirEpocroot}\\${armDbgDir}\\* ${releaseDirEpocroot}\\${gcceDbgDir} /F /R /Y /I /D");
runSystemCmd("xcopy ${releaseDirEpocroot}\\${armRelDir}\\* ${releaseDirEpocroot}\\${gcceRelDir} /F /R /Y /I /D");
- runSystemCmd("xcopy ${epocroot}${armLibDir}\\* ${releaseDirEpocroot}\\${armLibDir} /A /F /R /Y /I /D");
- runSystemCmd("xcopy ${epocroot}${winscwDbgDir}\\* ${releaseDirEpocroot}\\${winscwDbgDir} /A /F /R /Y /I /D");
+ runSystemCmd("xcopy ${epocroot}\\${armLibDir}\\* ${releaseDirEpocroot}\\${armLibDir} /A /F /R /Y /I /D");
+ runSystemCmd("xcopy ${epocroot}\\${winscwDbgDir}\\* ${releaseDirEpocroot}\\${winscwDbgDir} /A /F /R /Y /I /D");
# Create unsigned sis and Rnd signed sisx
my @pkgPathElements = split(/\\/, $pkgFileName);
@@ -177,20 +180,21 @@ if (@ARGV)
my @pkgSuffixElements = split(/\./, $pathlessPkgFile);
pop(@pkgSuffixElements);
my $sisFileName = join("", @pkgSuffixElements).".sis";
+ my $rndSisFileName = join("", @pkgSuffixElements)."_rnd.sisx";
system("mkdir ${releaseDirSis}");
runSystemCmd("makesis ${pkgFileName} ${releaseDirSis}\\${sisFileName}");
- runSystemCmd("signsis ${releaseDirSis}\\${sisFileName} ${releaseDirSis}\\${sisFileName}x ${cert} ${certKey}");
+ runSystemCmd("signsis ${releaseDirSis}\\${sisFileName} ${releaseDirSis}\\${rndSisFileName} ${cert} ${certKey}");
}
else
{
print("Usage:\n");
- print("build_release_package.pl <hw platform> <hw build> <signing cert> <signing cert key> <release directory> [EPOCROOT]\n");
- print("EPOCROOT is optional, defaults to '\\'\n");
+ print("build_release_package.pl <hw platform> <hw build> <signing cert> <signing cert key> <release directory> [QTROOT] [EPOCROOT]\n");
+ print("QTROOT and EPOCROOT are optional; QTROOT defaults to current dir and EPOCROOT defaults to '\\'\n");
print("1) Clean up the env. (abld reallyclean & delete \\my\\epoc\\root\\build folder)\n");
- print("2) Run \"build_release_package.pl armv5 udeb \\rd.cer \\rd-key.pem \\my_release_dir [\\my\\epoc\\root\\]>\"\n");
+ print("2) Run \"build_release_package.pl armv5 udeb \\rd.cer \\rd-key.pem \\my_release_dir [\\my\\qt\\root\\] [\\my\\epoc\\root\\]>\"\n");
print(" to build Qt and create the release package structure and sis file.\n");
print(" Note: Run in the Qt root directory.\n");
- print("3) Optional: Get the sis signed with commercial certificate\n");
+ print("3) Optional: Get the sis signed with commercial certificate (can be found in qt directory under release directory)\n");
print("4) Zip up the release directory contents\n");
}
@@ -200,6 +204,6 @@ sub runSystemCmd
if ($error_code != 0)
{
print("'$_[0]' call failed: error code == $error_code\n");
- exit;
+ exit 5;
}
}
diff --git a/configure b/configure
index bd77174..4cf7499 100755
--- a/configure
+++ b/configure
@@ -202,7 +202,7 @@ earlyArgParse()
VAL=$1
fi
;;
- h|help|--help|-help)
+ -h|help|--help|-help)
if [ "$VAL" = "yes" ]; then
OPT_HELP="$VAL"
COMMERCIAL_USER="no" #doesn't matter we will display the help
@@ -2703,22 +2703,24 @@ fi
if [ "$PLATFORM_MAC" = "yes" ]; then
# check -arch arguments for validity.
ALLOWED="x86 ppc x86_64 ppc64 i386"
- for i in $CFG_MAC_ARCHS
+ # Save the list so we can re-write it using only valid values
+ CFG_MAC_ARCHS_IN="$CFG_MAC_ARCHS"
+ CFG_MAC_ARCHS=
+ for i in $CFG_MAC_ARCHS_IN
do
if echo "$ALLOWED" | grep -w -v "$i" > /dev/null 2>&1; then
echo "Unknown architecture: \"$i\". Supported architectures: x86[i386] ppc x86_64 ppc64";
exit 2;
fi
- done
-
-# replace "i386" with "x86" to support configuring with -arch i386 as an alias for x86.
- CFG_MAC_ARCHS="${CFG_MAC_ARCHS/i386/x86}"
-
-# Build commmand line arguments we can pass to the compiler during configure tests
-# by prefixing each arch with "-arch".
- CFG_MAC_ARCHS_GCC_FORMAT="${CFG_MAC_ARCHS/x86/i386}"
- for ARCH in $CFG_MAC_ARCHS_GCC_FORMAT; do
- MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $ARCH"
+ if [ "$i" = "i386" -o "$i" = "x86" ]; then
+ # These are synonymous values
+ # CFG_MAC_ARCHS requires x86 while GCC requires i386
+ CFG_MAC_ARCHS="$CFG_MAC_ARCHS x86"
+ MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch i386"
+ else
+ CFG_MAC_ARCHS="$CFG_MAC_ARCHS $i"
+ MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $i"
+ fi
done
fi
@@ -4128,14 +4130,14 @@ if true; then ###[ '!' -f "$outpath/bin/qmake" ];
EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(CARBON_CFLAGS)"
EXTRA_OBJS="qsettings_mac.o qcore_mac.o"
EXTRA_SRCS="\"$relpath/src/corelib/io/qsettings_mac.cpp\" \"$relpath/src/corelib/kernel/qcore_mac.cpp\""
- if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then
+ if echo "$CFG_MAC_ARCHS" | grep x86 > /dev/null 2>&1; then # matches both x86 and x86_64
X86_CFLAGS="-arch i386"
X86_LFLAGS="-arch i386"
EXTRA_CFLAGS="$X86_CFLAGS $EXTRA_CFLAGS"
EXTRA_CXXFLAGS="$X86_CFLAGS $EXTRA_CXXFLAGS"
EXTRA_LFLAGS="$EXTRA_LFLAGS $X86_LFLAGS"
fi
- if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then
+ if echo "$CFG_MAC_ARCHS" | grep ppc > /dev/null 2>&1; then # matches both ppc and ppc64
PPC_CFLAGS="-arch ppc"
PPC_LFLAGS="-arch ppc"
EXTRA_CFLAGS="$PPC_CFLAGS $EXTRA_CFLAGS"
diff --git a/configure.exe b/configure.exe
index 9bbf555..30383d8 100755
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/demos/boxes/glextensions.h b/demos/boxes/glextensions.h
index 74617d6..7ba3b32 100644
--- a/demos/boxes/glextensions.h
+++ b/demos/boxes/glextensions.h
@@ -120,8 +120,11 @@ glUnmapBuffer
//#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
#endif
+#ifndef GL_ARB_vertex_buffer_object
+typedef ptrdiff_t GLsizeiptrARB;
+#endif
+
#ifndef GL_VERSION_1_5
-typedef ptrdiff_t GLsizeiptr;
#define GL_ARRAY_BUFFER 0x8892
#define GL_ELEMENT_ARRAY_BUFFER 0x8893
#define GL_READ_WRITE 0x88BA
@@ -185,7 +188,7 @@ typedef void (APIENTRY *_glTexImage3D) (GLenum, GLint, GLenum, GLsizei, GLsizei,
typedef void (APIENTRY *_glGenBuffers) (GLsizei, GLuint *);
typedef void (APIENTRY *_glBindBuffer) (GLenum, GLuint);
-typedef void (APIENTRY *_glBufferData) (GLenum, GLsizeiptr, const GLvoid *, GLenum);
+typedef void (APIENTRY *_glBufferData) (GLenum, GLsizeiptrARB, const GLvoid *, GLenum);
typedef void (APIENTRY *_glDeleteBuffers) (GLsizei, const GLuint *);
typedef void *(APIENTRY *_glMapBuffer) (GLenum, GLenum);
typedef GLboolean (APIENTRY *_glUnmapBuffer) (GLenum);
diff --git a/demos/demos.pro b/demos/demos.pro
index 1c98b9e..3856591 100644
--- a/demos/demos.pro
+++ b/demos/demos.pro
@@ -35,7 +35,7 @@ contains(QT_BUILD_PARTS, tools):{
wince*: SUBDIRS += demos_sqlbrowser
}
}
-contains(QT_CONFIG, phonon)!static:SUBDIRS += demos_mediaplayer
+contains(QT_CONFIG, phonon):!static:SUBDIRS += demos_mediaplayer
contains(QT_CONFIG, webkit):contains(QT_CONFIG, svg):SUBDIRS += demos_browser
# install
diff --git a/dist/changes-4.5.2 b/dist/changes-4.5.2
index a772bf7..1e00208 100644
--- a/dist/changes-4.5.2
+++ b/dist/changes-4.5.2
@@ -24,6 +24,8 @@ General Improvements
--------------------
- Documentation and Examples
+ * Added a new example (fancy browser) which shows how to use jQuery
+ in QtWebKit.
Third party components
----------------------
@@ -33,6 +35,16 @@ Third party components
* Library *
****************************************************************************
+- QtWebKit
+ * Backported fixes for critical bugs, memory leaks, and crashes from
+ WebKit trunk (with revision numbers) related to:
+ Canvas (r40546, r41221 r41355, r42996, r43645)
+ Memory (r41527, r43764, r43828, r43830)
+ JavaScript (r39882, r40086, r40131, r40133)
+ Rendering (r41285, r41296, r41659, r42887)
+ Network (r41664, r42516, r42747)
+ Plugins (r41346, r43550, r43915, r43917, r43923)
+ Clipboard (r41360)
****************************************************************************
* Database Drivers *
@@ -78,7 +90,17 @@ Qt for Windows CE
- Designer
-
+ * [248769] Fixed a bug affecting the display of keyboard shortcuts in
+ the detailed view of the action editor.
+ * [251092] Fixed a bug preventing entering local file names for QUrl-type
+ properties on Windows.
+ * [251691] Fixed dynamic re-translation of table headers.
+ * [252251] Improved readability of the property editor when using the
+ KDE Obsidian Coast theme.
+ * [253236] Fixed a regression bug triggered by forms with a size policy
+ of 'Fixed' on the main cointainer.
+ * [253278] Made it possible to set QString-type properties using
+ QDesignerFormWindowCursor::setProperty().
- Linguist
- Linguist GUI
@@ -95,7 +117,8 @@ Qt for Windows CE
- uic
-
+ * [252333] Fixed a regression crash triggered by using icons with
+ different pixmaps for QIcon states.
- uic3
diff --git a/doc/src/accessible.qdoc b/doc/src/accessible.qdoc
index 090da86..ad9f4f1 100644
--- a/doc/src/accessible.qdoc
+++ b/doc/src/accessible.qdoc
@@ -527,7 +527,7 @@
on plugins, consult the plugins \l{How to Create Qt
Plugins}{overview document}.
- You can omit the the first macro unless you want the plugin
+ You can omit the first macro unless you want the plugin
to be statically linked with the application.
\section2 Implementing Interface Factories
diff --git a/doc/src/credits.qdoc b/doc/src/credits.qdoc
index 114e28d..6b48514 100644
--- a/doc/src/credits.qdoc
+++ b/doc/src/credits.qdoc
@@ -188,7 +188,7 @@
Jesper K. Pedersen <blackie atklaralvdalens-datakonsult.se>\br
Jim Lauchlan <jim.lauchlan at gecm.com>\br
Joachim Backes <backes at rhrk.uni-kl.de>\br
- Jochen R&ouml;mmler <jochen at concept.de>\br
+ Jochen R\ouml\c{}mmler <jochen at concept.de>\br
Jochen Scharrlach <jscharrl at BA-Stuttgart.De>\br
Joe Croft <jcroft at swbell.net>\br
Joel Lindholm <wizball at kewl.campus.luth.se>\br
diff --git a/doc/src/deployment.qdoc b/doc/src/deployment.qdoc
index bcfa93d..446c91b 100644
--- a/doc/src/deployment.qdoc
+++ b/doc/src/deployment.qdoc
@@ -1247,7 +1247,7 @@
\snippet doc/src/snippets/code/doc_src_deployment.qdoc 48
Then we update the source code in \c tools/plugandpaint/main.cpp
- to look for the the new plugins. After constructing the
+ to look for the new plugins. After constructing the
QApplication, we add the following code:
\snippet doc/src/snippets/code/doc_src_deployment.qdoc 49
diff --git a/doc/src/examples/codeeditor.qdoc b/doc/src/examples/codeeditor.qdoc
index 669ab45..d218d0d 100644
--- a/doc/src/examples/codeeditor.qdoc
+++ b/doc/src/examples/codeeditor.qdoc
@@ -67,7 +67,7 @@
QTextEdit because it is optimized for handling plain text. See
the QPlainTextEdit class description for details.
- QPlainTextEdit lets us add selections in addition to the the
+ QPlainTextEdit lets us add selections in addition to the
selection the user can make with the mouse or keyboard. We use
this functionality to highlight the current line. More on this
later.
diff --git a/doc/src/examples/containerextension.qdoc b/doc/src/examples/containerextension.qdoc
index a4fbcea..6d29cf6 100644
--- a/doc/src/examples/containerextension.qdoc
+++ b/doc/src/examples/containerextension.qdoc
@@ -305,7 +305,7 @@
MultiPageWidget class \l
{designer/containerextension/multipagewidget.cpp}{implementation}).
Finally, we implicitly force an update of the page's property
- sheet by calling the the
+ sheet by calling the
QDesignerPropertySheetExtension::setChanged() function.
\snippet examples/designer/containerextension/multipagewidgetplugin.cpp 4
diff --git a/doc/src/examples/fancybrowser.qdoc b/doc/src/examples/fancybrowser.qdoc
index 9001c20..631aff9 100644
--- a/doc/src/examples/fancybrowser.qdoc
+++ b/doc/src/examples/fancybrowser.qdoc
@@ -40,12 +40,109 @@
****************************************************************************/
/*!
- \example webkit/fancybrowser
- \title Fancy Browser Example
+ \example webkit/fancybrowser
+ \title Fancy Browser Example
The Fancy Browser example shows how to use jQuery with QtWebKit to
- make a web browser with some special effects and content manipulation.
+ create a web browser with special effects and content
+ manipulation.
\image fancybrowser-example.png
+ The application makes use of QWebFrame::evaluateJavaScript to
+ evaluate the jQuery JavaScript code. A QMainWindow with a QWebView
+ as central widget builds up the browser itself.
+
+ \section1 MainWindow Class Definition
+
+ The \c MainWindow class inherits QMainWindow. It implements a number of
+ slots to perform actions on both the application and on the web content.
+
+ \snippet examples/webkit/fancybrowser/mainwindow.h 1
+
+ We also declare a QString that contains the jQuery, a QWebView
+ that displays the web content, and a QLineEdit that acts as the
+ address bar.
+
+ \section1 MainWindow Class Implementation
+
+ We start by implementing the constructor.
+
+ \snippet examples/webkit/fancybrowser/mainwindow.cpp 1
+
+ The first part of the constructor sets the value of \c progress to
+ 0. This value will be used later in the code to visualize the
+ loading of a webpage.
+
+ Next, the jQuery library is loaded using a QFile and reading the file
+ content. The jQuery library is a JavaScript library that provides different
+ functions for manipulating HTML.
+
+ \snippet examples/webkit/fancybrowser/mainwindow.cpp 2
+
+ The second part of the constructor creates a QWebView and connects
+ slots to the views signals. Furthermore, we create a QLineEdit as
+ the browsers address bar. We then set the horizontal QSizePolicy
+ to fill the available area in the browser at all times. We add the
+ QLineEdit to a QToolbar together with a set of navigation actions
+ from QWebView::pageAction.
+
+ \snippet examples/webkit/fancybrowser/mainwindow.cpp 3
+
+ The third and last part of the constructor implements two QMenus and assigns
+ a set of actions to them. The last line sets the QWebView as the central
+ widget in the QMainWindow.
+
+ \snippet examples/webkit/fancybrowser/mainwindow.cpp 4
+
+ When the page is loaded, \c adjustLocation() updates the address
+ bar; \c adjustLocation() is triggered by the \c loadFinished()
+ signal in QWebView. In \c changeLocation() we create a QUrl
+ object, and then use it to load the page into the QWebView. When
+ the new web page has finished loading, \c adjustLocation() will be
+ run once more to update the address bar.
+
+ \snippet examples/webkit/fancybrowser/mainwindow.cpp 5
+
+ \c adjustTitle() sets the window title and displays the loading
+ progress. This slot is triggered by the \c titleChanged() signal
+ in QWebView.
+
+ \snippet examples/webkit/fancybrowser/mainwindow.cpp 6
+
+ When a web page has loaded, \c finishLoading() is triggered by the
+ \c loadFinished() signal in QWebView. \c finishLoading() then updates the
+ progress in the title bar and calls \c evaluateJavaScript() to evaluate the
+ jQuery library. This evaluates the JavaScript against the current web page.
+ What that means is that the JavaScript can be viewed as part of the content
+ loaded into the QWebView, and therefore needs to be loaded every time a new
+ page is loaded. Once the jQuery library is loaded, we can start executing
+ the different jQuery functions in the browser.
+
+ \snippet examples/webkit/fancybrowser/mainwindow.cpp 7
+
+ The first jQuery-based function, \c highlightAllLinks(), is designed to
+ highlight all links in the current webpage. The JavaScript code looks
+ for web elements named \e {a}, which is the tag for a hyperlink.
+ For each such element, the background color is set to be yellow by
+ using CSS.
+
+ \snippet examples/webkit/fancybrowser/mainwindow.cpp 8
+
+ The \c rotateImages() function rotates the images on the current
+ web page. Webkit supports CSS transforms and this JavaScript code
+ looks up all \e {img} elements and rotates the images 180 degrees
+ and then back again.
+
+ \snippet examples/webkit/fancybrowser/mainwindow.cpp 9
+
+ The remaining four methods remove different elements from the current web
+ page. \c removeGifImages() removes all Gif images on the page by looking up
+ the \e {src} attribute of all the elements on the web page. Any element with
+ a \e {gif} file as its source is removed. \c removeInlineFrames() removes all
+ \e {iframe} or inline elements. \c removeObjectElements() removes all
+ \e {object} elements, and \c removeEmbeddedElements() removes any elements
+ such as plugins embedded on the page using the \e {embed} tag.
+
*/
+
diff --git a/doc/src/examples/fortuneserver.qdoc b/doc/src/examples/fortuneserver.qdoc
index e6a7f85..848a3a3 100644
--- a/doc/src/examples/fortuneserver.qdoc
+++ b/doc/src/examples/fortuneserver.qdoc
@@ -45,7 +45,7 @@
The Fortune Server example shows how to create a server for a simple
network service. It is intended to be run alongside the
- \l{network/fortuneclient}{Fortune Client} example or the the
+ \l{network/fortuneclient}{Fortune Client} example or the
\l{network/blockingfortuneclient}{Blocking Fortune Client} example.
\image fortuneserver-example.png Screenshot of the Fortune Server example
diff --git a/doc/src/examples/ftp.qdoc b/doc/src/examples/ftp.qdoc
index 9cc9cd1..7a74a37 100644
--- a/doc/src/examples/ftp.qdoc
+++ b/doc/src/examples/ftp.qdoc
@@ -172,7 +172,7 @@
no entries were found (in which case our \c addToList() function
would not have been called).
- Let's continue with the the \c addToList() slot:
+ Let's continue with the \c addToList() slot:
\snippet examples/network/ftp/ftpwindow.cpp 10
@@ -190,7 +190,7 @@
\snippet examples/network/ftp/ftpwindow.cpp 12
- \c cdToParent() is invoked when the the user requests to go to the
+ \c cdToParent() is invoked when the user requests to go to the
parent directory of the one displayed in the file list. After
changing the directory, we QFtp::List its contents.
diff --git a/doc/src/examples/icons.qdoc b/doc/src/examples/icons.qdoc
index 750ef2e..a81ddb9 100644
--- a/doc/src/examples/icons.qdoc
+++ b/doc/src/examples/icons.qdoc
@@ -479,7 +479,7 @@
QTableWidget::openPersistentEditor() function to create
comboboxes for the mode and state columns of the items.
- Due to the the connection between the table widget's \l
+ Due to the connection between the table widget's \l
{QTableWidget::itemChanged()}{itemChanged()} signal and the \c
changeIcon() slot, the new image is automatically converted into a
pixmap and made part of the set of pixmaps available to the icon
diff --git a/doc/src/examples/musicplayerexample.qdoc b/doc/src/examples/musicplayerexample.qdoc
index d23c1f1..9f04bf6 100644
--- a/doc/src/examples/musicplayerexample.qdoc
+++ b/doc/src/examples/musicplayerexample.qdoc
@@ -154,7 +154,7 @@
\snippet examples/phonon/musicplayer/mainwindow.cpp 5
- We move on to the the slots of \c MainWindow, starting with \c
+ We move on to the slots of \c MainWindow, starting with \c
addFiles():
\snippet examples/phonon/musicplayer/mainwindow.cpp 6
diff --git a/doc/src/examples/qobjectxmlmodel.qdoc b/doc/src/examples/qobjectxmlmodel.qdoc
index ce1dab6..37c66bc 100644
--- a/doc/src/examples/qobjectxmlmodel.qdoc
+++ b/doc/src/examples/qobjectxmlmodel.qdoc
@@ -71,7 +71,7 @@
The query engine can only traverse two dimensional trees, because an
XML document is always a two dimensional tree. If we want to add the
QMetaObject tree to the node model, we have to somehow flatten it
- into the the same plane as the QObject tree. This requires that the
+ into the same plane as the QObject tree. This requires that the
node model class must build an auxiliary data structure and make it
part of the two dimensional QObject node model. How to do this is
explained in \l{Including The QMetaObject Tree}.
diff --git a/doc/src/examples/tabdialog.qdoc b/doc/src/examples/tabdialog.qdoc
index c9500af..5394b82 100644
--- a/doc/src/examples/tabdialog.qdoc
+++ b/doc/src/examples/tabdialog.qdoc
@@ -91,7 +91,7 @@
\snippet examples/dialogs/tabdialog/tabdialog.cpp 1
\snippet examples/dialogs/tabdialog/tabdialog.cpp 3
- We arrange the the tab widget above the buttons in the dialog:
+ We arrange the tab widget above the buttons in the dialog:
\snippet examples/dialogs/tabdialog/tabdialog.cpp 4
diff --git a/doc/src/examples/tooltips.qdoc b/doc/src/examples/tooltips.qdoc
index 5daa2b2..78b350b 100644
--- a/doc/src/examples/tooltips.qdoc
+++ b/doc/src/examples/tooltips.qdoc
@@ -353,7 +353,7 @@
Whenever the user creates a new shape item, we want the new item
to appear at a random position, and we use the \c
randomItemPosition() function to calculate such a position. We
- make sure that the item appears within the the visible area of the
+ make sure that the item appears within the visible area of the
\c SortingBox widget, using the widget's current width and heigth
when calculating the random coordinates.
diff --git a/doc/src/examples/trafficinfo.qdoc b/doc/src/examples/trafficinfo.qdoc
index c9b6890..13181cd 100644
--- a/doc/src/examples/trafficinfo.qdoc
+++ b/doc/src/examples/trafficinfo.qdoc
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the documentation of the Qt Toolkit.
diff --git a/doc/src/examples/transformations.qdoc b/doc/src/examples/transformations.qdoc
index eabb803..58c8b80 100644
--- a/doc/src/examples/transformations.qdoc
+++ b/doc/src/examples/transformations.qdoc
@@ -208,7 +208,7 @@
After transforming the coordinate system, we draw the \c
RenderArea's shape, and then we restore the painter state using
- the the QPainter::restore() function (i.e. popping the saved state off
+ the QPainter::restore() function (i.e. popping the saved state off
the stack).
\snippet examples/painting/transformations/renderarea.cpp 7
diff --git a/doc/src/examples/trollprint.qdoc b/doc/src/examples/trollprint.qdoc
index 38251ee..489012e 100644
--- a/doc/src/examples/trollprint.qdoc
+++ b/doc/src/examples/trollprint.qdoc
@@ -142,7 +142,7 @@
We can easily determine which file must be changed because the
translator's "context" is in fact the class name for the class where
the texts that must be changed appears. In this case the file is \c
- printpanel.cpp, where the there are four lines to change. Add the
+ printpanel.cpp, where there are four lines to change. Add the
second argument "two-sided" in the appropriate \c tr() calls to the
first pair of radio buttons:
diff --git a/doc/src/images/inputdialogs.png b/doc/src/images/inputdialogs.png
index 135c2f6..8bda185 100644
--- a/doc/src/images/inputdialogs.png
+++ b/doc/src/images/inputdialogs.png
Binary files differ
diff --git a/doc/src/layout.qdoc b/doc/src/layout.qdoc
index 55dfd8b..d97fcfc 100644
--- a/doc/src/layout.qdoc
+++ b/doc/src/layout.qdoc
@@ -315,7 +315,11 @@
\snippet doc/src/snippets/code/doc_src_layout.qdoc 1
- First we define two functions that iterate over the layout: \c{itemAt()}
+ First we define \c{count()} to fetch the number of items in the list.
+
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 2
+
+ Then we define two functions that iterate over the layout: \c{itemAt()}
and \c{takeAt()}. These functions are used internally by the layout system
to handle deletion of widgets. They are also available for application
programmers.
@@ -326,7 +330,7 @@
structure, we may have to spend more effort defining a linear order for the
items.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 2
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 3
\c{addItem()} implements the default placement strategy for layout items.
This function must be implemented. It is used by QLayout::add(), by the
@@ -336,26 +340,26 @@
QGridLayout::addItem(), QGridLayout::addWidget(), and
QGridLayout::addLayout().
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 3
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 4
The layout takes over responsibility of the items added. Since QLayoutItem
- does not inherit QObject, we must delete the items manually. The function
- QLayout::deleteAllItems() uses \c{takeAt()} defined above to delete all the
- items in the layout.
+ does not inherit QObject, we must delete the items manually. In the
+ destructor, we remove each item from the list using \c{takeAt()}, and
+ then delete it.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 4
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 5
The \c{setGeometry()} function actually performs the layout. The rectangle
supplied as an argument does not include \c{margin()}. If relevant, use
\c{spacing()} as the distance between items.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 5
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 6
\c{sizeHint()} and \c{minimumSize()} are normally very similar in
implementation. The sizes returned by both functions should include
\c{spacing()}, but not \c{margin()}.
- \snippet doc/src/snippets/code/doc_src_layout.qdoc 6
+ \snippet doc/src/snippets/code/doc_src_layout.qdoc 7
\section2 Further Notes
diff --git a/doc/src/licenses.qdoc b/doc/src/licenses.qdoc
index 1c3f6d2..a11c071 100644
--- a/doc/src/licenses.qdoc
+++ b/doc/src/licenses.qdoc
@@ -45,7 +45,7 @@
\ingroup licensing
\brief Information about other licenses used for Qt components and third-party code.
- Qt contains some code that is not provided under the the
+ Qt contains some code that is not provided under the
\l{GNU General Public License (GPL)},
\l{GNU Lesser General Public License (LGPL)} or the
\l{Qt Commercial Editions}{Qt Commercial License Agreement}, but rather under
diff --git a/doc/src/mac-differences.qdoc b/doc/src/mac-differences.qdoc
index 573e62d..5849850 100644
--- a/doc/src/mac-differences.qdoc
+++ b/doc/src/mac-differences.qdoc
@@ -128,7 +128,7 @@
If you want to build a new dynamic library combining the Qt 4
dynamic libraries, you need to introduce the \c{ld -r} flag. Then
- relocation information is stored in the the output file, so that
+ relocation information is stored in the output file, so that
this file could be the subject of another \c ld run. This is done
by setting the \c -r flag in the \c .pro file, and the \c LFLAGS
settings.
diff --git a/doc/src/model-view-programming.qdoc b/doc/src/model-view-programming.qdoc
index bf0c1c8..8874cfa 100644
--- a/doc/src/model-view-programming.qdoc
+++ b/doc/src/model-view-programming.qdoc
@@ -249,7 +249,7 @@
provide an API that allows you to sort your model data
programmatically. In addition, you can enable interactive sorting
(i.e. allowing the users to sort the data by clicking the view's
- headers), by connecting the QHeaderView::sectionClicked() signal
+ headers), by connecting the QHeaderView::sortIndicatorChanged() signal
to the QTableView::sortByColumn() slot or the
QTreeView::sortByColumn() slot, respectively.
diff --git a/doc/src/phonon-api.qdoc b/doc/src/phonon-api.qdoc
index 501b5a5..dd37fe2 100644
--- a/doc/src/phonon-api.qdoc
+++ b/doc/src/phonon-api.qdoc
@@ -2973,7 +2973,7 @@
\value ToggledHint
If this hint is set it means that
- the the control has only two states: zero and non-zero
+ the control has only two states: zero and non-zero
(see isToggleControl()).
\value LogarithmicHint
diff --git a/doc/src/porting4-overview.qdoc b/doc/src/porting4-overview.qdoc
index b0146a6..462f849 100644
--- a/doc/src/porting4-overview.qdoc
+++ b/doc/src/porting4-overview.qdoc
@@ -364,4 +364,10 @@
In Qt 4.2 and later, \l{Qt Style Sheets} can be used to
implement many common modifications to existing styles, and
this may be sufficient for Qt 3 applications.
+
+ \section2 Events
+ In Qt 3, QCloseEvents were not accepted by default. In Qt 4,
+ the event handler QWidget::closeEvent() receives QCloseEvents,
+ and accepts them by default closing the application. To avoid
+ this, please reimplement QWidget::closeEvent().
*/
diff --git a/doc/src/q3valuelist.qdoc b/doc/src/q3valuelist.qdoc
index be315c2..e3681af 100644
--- a/doc/src/q3valuelist.qdoc
+++ b/doc/src/q3valuelist.qdoc
@@ -108,7 +108,7 @@
pointing to the removed member become invalid. Inserting into the
list does not invalidate any iterator. For convenience, the
function last() returns a reference to the last item in the list,
- and first() returns a reference to the the first item. If the
+ and first() returns a reference to the first item. If the
list is empty(), both last() and first() have undefined behavior
(your application will crash or do unpredictable things). Use
last() and first() with caution, for example:
diff --git a/doc/src/qalgorithms.qdoc b/doc/src/qalgorithms.qdoc
index b33c250..90289f9 100644
--- a/doc/src/qalgorithms.qdoc
+++ b/doc/src/qalgorithms.qdoc
@@ -59,7 +59,7 @@
If STL is available on all your target platforms, you can use the
STL algorithms instead of their Qt counterparts. One reason why
- you might want to use the the STL algorithms is that STL provides
+ you might want to use the STL algorithms is that STL provides
dozens and dozens of algorithms, whereas Qt only provides the most
important ones, making no attempt to duplicate functionality that
is already provided by the C++ standard.
diff --git a/doc/src/qmake-manual.qdoc b/doc/src/qmake-manual.qdoc
index ff56dad..c26d5f2 100644
--- a/doc/src/qmake-manual.qdoc
+++ b/doc/src/qmake-manual.qdoc
@@ -1474,7 +1474,14 @@
\snippet doc/src/snippets/code/doc_src_qmake-manual.qdoc 34
See also \l{#SOURCES}{SOURCES}.
-
+
+ \target ICON
+ \section1 ICON
+
+ This variable is used only in MAC and S60 to set the application icon.
+ Please see \l{Setting the Application Icon}{the application icon documentation}
+ for more information.
+
\target INCLUDEPATH
\section1 INCLUDEPATH
diff --git a/doc/src/qset.qdoc b/doc/src/qset.qdoc
index 7fbf97a..afbedc3 100644
--- a/doc/src/qset.qdoc
+++ b/doc/src/qset.qdoc
@@ -437,7 +437,7 @@
\fn QSet::const_iterator QSet::insert(const T &value)
Inserts item \a value into the set, if \a value isn't already
- in the set, and returns an iterator positioned at the inserted
+ in the set, and returns an iterator pointing at the inserted
item.
\sa operator<<(), remove(), contains()
diff --git a/doc/src/qstyles.qdoc b/doc/src/qstyles.qdoc
new file mode 100644
index 0000000..e17097a
--- /dev/null
+++ b/doc/src/qstyles.qdoc
@@ -0,0 +1,261 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+
+/*!
+ \class QMacStyle
+ \brief The QMacStyle class provides a Mac OS X style using the Apple Appearance Manager.
+
+ \ingroup appearance
+
+ This class is implemented as a wrapper to the HITheme
+ APIs, allowing applications to be styled according to the current
+ theme in use on Mac OS X. This is done by having primitives
+ in QStyle implemented in terms of what Mac OS X would normally theme.
+
+ \warning This style is only available on Mac OS X because it relies on the
+ HITheme APIs.
+
+ There are additional issues that should be taken
+ into consideration to make an application compatible with the
+ \link http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html
+ Apple Human Interface Guidelines \endlink. Some of these issues are outlined
+ below.
+
+ \list
+
+ \i Layout - The restrictions on window layout are such that some
+ aspects of layout that are style-dependent cannot be achieved
+ using QLayout. Changes are being considered (and feedback would be
+ appreciated) to make layouts QStyle-able. Some of the restrictions
+ involve horizontal and vertical widget alignment and widget size
+ (covered below).
+
+ \i Widget size - Mac OS X allows widgets to have specific fixed sizes. Qt
+ does not fully implement this behavior so as to maintain cross-platform
+ compatibility. As a result some widgets sizes may be inappropriate (and
+ subsequently not rendered correctly by the HITheme APIs).The
+ QWidget::sizeHint() will return the appropriate size for many
+ managed widgets (widgets enumerated in \l QStyle::ContentsType).
+
+ \i Effects - QMacStyle uses HITheme for performing most of the drawing, but
+ also uses emulation in a few cases where HITheme does not provide the
+ required functionality (for example, tab bars on Panther, the toolbar
+ separator, etc). We tried to make the emulation as close to the original as
+ possible. Please report any issues you see in effects or non-standard
+ widgets.
+
+ \endlist
+
+ There are other issues that need to be considered in the feel of
+ your application (including the general color scheme to match the
+ Aqua colors). The Guidelines mentioned above will remain current
+ with new advances and design suggestions for Mac OS X.
+
+ Note that the functions provided by QMacStyle are
+ reimplementations of QStyle functions; see QStyle for their
+ documentation.
+
+ \img qmacstyle.png
+ \sa QWindowsXPStyle, QWindowsStyle, QPlastiqueStyle, QCDEStyle, QMotifStyle
+*/
+
+
+/*!
+ \enum QMacStyle::WidgetSizePolicy
+
+ \value SizeSmall
+ \value SizeLarge
+ \value SizeMini
+ \value SizeDefault
+ \omitvalue SizeNone
+*/
+
+/*! \fn QMacStyle::QMacStyle()
+ Constructs a QMacStyle object.
+*/
+
+/*! \fn QMacStyle::~QMacStyle()
+ Destructs a QMacStyle object.
+*/
+
+/*! \fn void QMacStyle::polish(QPalette &pal)
+ \reimp
+*/
+
+/*! \fn void QMacStyle::polish(QApplication *)
+ \reimp
+*/
+
+/*! \fn void QMacStyle::unpolish(QApplication *)
+ \reimp
+*/
+
+/*! \fn void QMacStyle::polish(QWidget* w)
+ \reimp
+*/
+
+/*! \fn void QMacStyle::unpolish(QWidget* w)
+ \reimp
+*/
+
+/*! \fn int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QWidget *widget) const
+ \reimp
+*/
+
+/*! \fn QPalette QMacStyle::standardPalette() const
+ \reimp
+*/
+
+/*! \fn int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w, QStyleHintReturn *hret) const
+ \reimp
+*/
+
+/*! \fn QPixmap QMacStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap, const QStyleOption *opt) const
+ \reimp
+*/
+
+/*! \fn QPixmap QMacStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt, const QWidget *widget) const
+ \reimp
+*/
+
+/*!
+ \enum QMacStyle::FocusRectPolicy
+
+ This type is used to signify a widget's focus rectangle policy.
+
+ \value FocusEnabled show a focus rectangle when the widget has focus.
+ \value FocusDisabled never show a focus rectangle for the widget.
+ \value FocusDefault show a focus rectangle when the widget has
+ focus and the widget is a QSpinWidget, QDateTimeEdit, QLineEdit,
+ QListBox, QListView, editable QTextEdit, or one of their
+ subclasses.
+*/
+
+/*! \fn void QMacStyle::setFocusRectPolicy(QWidget *w, FocusRectPolicy policy)
+ \obsolete
+ Sets the focus rectangle policy of \a w. The \a policy can be one of
+ \l{QMacStyle::FocusRectPolicy}.
+
+ This is now simply an interface to the Qt::WA_MacShowFocusRect attribute and the
+ FocusDefault value does nothing anymore. If you want to set a widget back
+ to its default value, you must save the old value of the attribute before
+ you change it.
+
+ \sa focusRectPolicy() QWidget::setAttribute()
+*/
+
+/*! \fn QMacStyle::FocusRectPolicy QMacStyle::focusRectPolicy(const QWidget *w)
+ \obsolete
+ Returns the focus rectangle policy for the widget \a w.
+
+ The focus rectangle policy can be one of \l{QMacStyle::FocusRectPolicy}.
+
+ In 4.3 and up this function will simply test for the
+ Qt::WA_MacShowFocusRect attribute and will never return
+ QMacStyle::FocusDefault.
+
+ \sa setFocusRectPolicy(), QWidget::testAttribute()
+*/
+
+/*! \fn void QMacStyle::setWidgetSizePolicy(const QWidget *widget, WidgetSizePolicy policy)
+
+ \obsolete
+
+ Call QWidget::setAttribute() with Qt::WA_MacMiniSize, Qt::WA_MacSmallSize,
+ or Qt::WA_MacNormalSize instead.
+*/
+
+/*! \fn QMacStyle::WidgetSizePolicy QMacStyle::widgetSizePolicy(const QWidget *widget)
+ \obsolete
+
+ Call QWidget::testAttribute() with Qt::WA_MacMiniSize, Qt::WA_MacSmallSize,
+ or Qt::WA_MacNormalSize instead.
+*/
+
+/*! \fn void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p, const QWidget *w) const
+
+ \reimp
+*/
+
+/*! \fn void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter *p, const QWidget *w) const
+
+ \reimp
+*/
+
+/*! \fn QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt, const QWidget *widget) const
+
+ \reimp
+*/
+
+/*! \fn void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p, const QWidget *widget) const
+ \reimp
+*/
+
+/*! \fn QStyle::SubControl QMacStyle::hitTestComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, const QPoint &pt, const QWidget *widget) const
+ \reimp
+*/
+
+/*! \fn QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc, const QWidget *widget) const
+ \reimp
+*/
+
+/*! \fn QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt, const QSize &csz, const QWidget *widget) const
+ \reimp
+*/
+
+/*! \fn void QMacStyle::drawItemText(QPainter *p, const QRect &r, int flags, const QPalette &pal, bool enabled, const QString &text, QPalette::ColorRole textRole) const
+ \reimp
+*/
+
+/*! \fn bool QMacStyle::event(QEvent *e)
+ \reimp
+*/
+
+/*! \fn QIcon QMacStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *opt, const QWidget *widget) const
+ \internal
+*/
+
+/*! \fn int QMacStyle::layoutSpacingImplementation(QSizePolicy::ControlType control1, QSizePolicy::ControlType control2, Qt::Orientation orientation, const QStyleOption *option, const QWidget *widget) const
+
+ \internal
+*/
+
diff --git a/doc/src/qtdesigner.qdoc b/doc/src/qtdesigner.qdoc
index 7e3b619..9699c5b 100644
--- a/doc/src/qtdesigner.qdoc
+++ b/doc/src/qtdesigner.qdoc
@@ -632,7 +632,7 @@
/*!
\fn void QDesignerContainerExtension::setCurrentIndex(int index)
- Sets the the currently selected page in the container to be the
+ Sets the currently selected page in the container to be the
page at the given \a index in the extension's list of pages.
\sa currentIndex()
diff --git a/doc/src/qtscriptdebugger-manual.qdoc b/doc/src/qtscriptdebugger-manual.qdoc
index 3dfe879..75d87f8 100644
--- a/doc/src/qtscriptdebugger-manual.qdoc
+++ b/doc/src/qtscriptdebugger-manual.qdoc
@@ -367,7 +367,7 @@
\section3 continue
Continues execution normally, i.e, gives the execution control over
- the script back the the QScriptEngine.
+ the script back to the QScriptEngine.
\section3 eval <program>
diff --git a/doc/src/snippets/code/doc_src_layout.qdoc b/doc/src/snippets/code/doc_src_layout.qdoc
index 48e10e9..60f36b0 100644
--- a/doc/src/snippets/code/doc_src_layout.qdoc
+++ b/doc/src/snippets/code/doc_src_layout.qdoc
@@ -2,23 +2,21 @@
#ifndef CARD_H
#define CARD_H
-#include <QLayout>
+#include <QtGui>
#include <QList>
class CardLayout : public QLayout
{
public:
- CardLayout(QWidget *parent, int dist)
- : QLayout(parent, 0, dist) {}
- CardLayout(QLayout *parent, int dist)
- : QLayout(parent, dist) {}
- CardLayout(int dist)
- : QLayout(dist) {}
+ CardLayout(QWidget *parent, int dist): QLayout(parent, 0, dist) {}
+ CardLayout(QLayout *parent, int dist): QLayout(parent, dist) {}
+ CardLayout(int dist): QLayout(dist) {}
~CardLayout();
void addItem(QLayoutItem *item);
QSize sizeHint() const;
QSize minimumSize() const;
+ QLayoutItem *count() const;
QLayoutItem *itemAt(int) const;
QLayoutItem *takeAt(int);
void setGeometry(const QRect &rect);
@@ -31,11 +29,18 @@ private:
//! [1]
-#include "card.h"
+//#include "card.h"
//! [1]
-
//! [2]
+QLayoutItem *CardLayout::count() const
+{
+ // QList::size() returns the number of QLayoutItems in the list
+ return list.size();
+}
+//! [2]
+
+//! [3]
QLayoutItem *CardLayout::itemAt(int idx) const
{
// QList::value() performs index checking, and returns 0 if we are
@@ -48,26 +53,28 @@ QLayoutItem *CardLayout::takeAt(int idx)
// QList::take does not do index checking
return idx >= 0 && idx < list.size() ? list.takeAt(idx) : 0;
}
-//! [2]
+//! [3]
-//! [3]
+//! [4]
void CardLayout::addItem(QLayoutItem *item)
{
list.append(item);
}
-//! [3]
+//! [4]
-//! [4]
+//! [5]
CardLayout::~CardLayout()
{
- deleteAllItems();
+ QLayoutItem *item;
+ while ((item = takeAt(0)))
+ delete item;
}
-//! [4]
+//! [5]
-//! [5]
+//! [6]
void CardLayout::setGeometry(const QRect &r)
{
QLayout::setGeometry(r);
@@ -85,10 +92,10 @@ void CardLayout::setGeometry(const QRect &r)
++i;
}
}
-//! [5]
+//! [6]
-//! [6]
+//! [7]
QSize CardLayout::sizeHint() const
{
QSize s(0,0);
@@ -116,4 +123,4 @@ QSize CardLayout::minimumSize() const
}
return s + n*QSize(spacing(), spacing());
}
-//! [6]
+//! [7]
diff --git a/doc/src/snippets/sqldatabase/sqldatabase.cpp b/doc/src/snippets/sqldatabase/sqldatabase.cpp
index ae176ac..06afa0c 100644
--- a/doc/src/snippets/sqldatabase/sqldatabase.cpp
+++ b/doc/src/snippets/sqldatabase/sqldatabase.cpp
@@ -524,7 +524,7 @@ protected:
bool fetchLast() { return false; }
int size() { return 0; }
int numRowsAffected() { return 0; }
- QSqlRecord record() { return QSqlRecord(); }
+ QSqlRecord record() const { return QSqlRecord(); }
};
//! [47]
diff --git a/doc/src/stylesheet.qdoc b/doc/src/stylesheet.qdoc
index c0d13da..4060f33 100644
--- a/doc/src/stylesheet.qdoc
+++ b/doc/src/stylesheet.qdoc
@@ -332,7 +332,7 @@
respect to the reference element.
Once positioned, they are treated the same as widgets and can be styled
- using the the \l{box model}.
+ using the \l{box model}.
See the \l{List of Sub-Controls} below for a list of supported
sub-controls, and \l{Customizing the QPushButton's Menu Indicator
@@ -398,7 +398,7 @@
(usually) refers to a single object, not to all instances of a
class.
- Similarly, selectors with pseudo-states are more specific that
+ Similarly, selectors with pseudo-states are more specific than
ones that do not specify pseudo-states. Thus, the following style
sheet specifies that a \l{QPushButton} should have white text
when the mouse is hovering over it, otherwise red text:
@@ -653,7 +653,7 @@
\target sub controls
\section1 Sub-controls
- A widget is considered as a heirarchy (tree) of subcontrols drawn on top
+ A widget is considered as a hierarchy (tree) of subcontrols drawn on top
of each other. For example, the QComboBox draws the drop-down sub-control
followed by the down-arrow sub-control. A QComboBox is thus rendered as
follows:
@@ -671,7 +671,7 @@
\l{Qt Style Sheets Reference#subcontrol-origin-prop}{subcontrol-origin}
properties.
- Once positioned, sub-controls can be styled using the the \l{box model}.
+ Once positioned, sub-controls can be styled using the \l{box model}.
\note With complex widgets such as QComboBox and QScrollBar, if one
property or sub-control is customized, \bold{all} the other properties or
@@ -1154,7 +1154,7 @@
\l{#pane-sub}{::pane} subcontrol. The left and right
corners are styled using the \l{#left-corner-sub}{::left-corner}
and \l{#right-corner-sub}{::right-corner} respectively.
- The position of the the tab bar is controlled using the
+ The position of the tab bar is controlled using the
\l{#tab-bar-sub}{::tab-bar} subcontrol.
By default, the subcontrols have positions of a QTabWidget in
@@ -1254,7 +1254,7 @@
the \l{#menu-button-sub}{::menu-button} subcontrol is used to draw the
menu button. \l{#menu-arrow-sub}{::menu-arrow} subcontrol is used to
draw the menu arrow inside the menu-button. By default, it is
- positioned in the center of the Contents rectangle of the the
+ positioned in the center of the Contents rectangle of the
menu-button subcontrol.
When the QToolButton displays arrows, the \l{#up-arrow-sub}{::up-arrow},
@@ -1872,10 +1872,6 @@
\snippet doc/src/snippets/code/doc_src_stylesheet.qdoc 54
- \note If you specify more than one parameter in \c font-family,
- e.g., \c{font-family: Verdana, Arial}, Qt will only use the first
- font. If it cannot be found, Qt uses the system fallbacks instead.
-
\row
\o \c font-size
\o \l{#Font Size}{Font Size}
diff --git a/doc/src/tech-preview/known-issues.html b/doc/src/tech-preview/known-issues.html
index 05df69e..885104e 100644
--- a/doc/src/tech-preview/known-issues.html
+++ b/doc/src/tech-preview/known-issues.html
@@ -16,7 +16,7 @@
<td align="right" valign="middle"></td></tr></table>
<h1>Known Issues: Qt 4.0.0 Technology Preview 1</h1>
<p>
- This is the list of known and reported issues for the the Qt 4.0.0
+ This is the list of known and reported issues for the Qt 4.0.0
Technology Preview 1. This list is updated daily.
</p>
<br><br>
diff --git a/doc/src/timers.qdoc b/doc/src/timers.qdoc
index 4f54343..1b48d7d 100644
--- a/doc/src/timers.qdoc
+++ b/doc/src/timers.qdoc
@@ -62,7 +62,7 @@
In multithreaded applications, you can use the timer mechanism in
any thread that has an event loop. To start an event loop from a
- non-GUI thread, use QThread::exec(). Qt uses the the object's
+ non-GUI thread, use QThread::exec(). Qt uses the object's
\l{QObject::thread()}{thread affinity} to determine which thread
will deliver the QTimerEvent. Because of this, you must start and
stop all timers in the object's thread; it is not possible to
@@ -105,7 +105,7 @@
In multithreaded applications, you can use QTimer in any thread
that has an event loop. To start an event loop from a non-GUI
- thread, use QThread::exec(). Qt uses the the timer's
+ thread, use QThread::exec(). Qt uses the timer's
\l{QObject::thread()}{thread affinity} to determine which thread
will emit the \l{QTimer::}{timeout()} signal. Because of this, you
must start and stop the timer in its thread; it is not possible to
diff --git a/doc/src/xquery-introduction.qdoc b/doc/src/xquery-introduction.qdoc
index 37a45ac..fe541e2 100644
--- a/doc/src/xquery-introduction.qdoc
+++ b/doc/src/xquery-introduction.qdoc
@@ -347,7 +347,7 @@ has a more detailed section on the shorthand form, which it calls the
\l{http://www.w3.org/TR/xquery/#abbrev} {abbreviated syntax}. More
examples of path expressions written in the shorthand form are found
there. There is also a section listing examples of path expressions
-written in the the \l{http://www.w3.org/TR/xquery/#unabbrev} {longhand
+written in the \l{http://www.w3.org/TR/xquery/#unabbrev} {longhand
form}.
\target Name Tests
diff --git a/examples/opengl/hellogl_es/hellogl_es.pro b/examples/opengl/hellogl_es/hellogl_es.pro
index 7459456..3168743 100644
--- a/examples/opengl/hellogl_es/hellogl_es.pro
+++ b/examples/opengl/hellogl_es/hellogl_es.pro
@@ -20,11 +20,13 @@ HEADERS += bubble.h
RESOURCES += texture.qrc
QT += opengl
-contains(QT_CONFIG,opengles1) {
- QMAKE_LIBS += "libGLES_CM.lib"
-}
-contains(QT_CONFIG,opengles1cl) {
- QMAKE_LIBS += "libGLES_CL.lib"
+wince*:{
+ contains(QT_CONFIG,opengles1) {
+ QMAKE_LIBS += "libGLES_CM.lib"
+ }
+ contains(QT_CONFIG,opengles1cl) {
+ QMAKE_LIBS += "libGLES_CL.lib"
+ }
}
# install
diff --git a/examples/webkit/fancybrowser/mainwindow.cpp b/examples/webkit/fancybrowser/mainwindow.cpp
index bf61f9c..e24f6cf 100644
--- a/examples/webkit/fancybrowser/mainwindow.cpp
+++ b/examples/webkit/fancybrowser/mainwindow.cpp
@@ -43,6 +43,8 @@
#include <QtWebKit>
#include "mainwindow.h"
+//! [1]
+
MainWindow::MainWindow()
{
progress = 0;
@@ -52,7 +54,9 @@ MainWindow::MainWindow()
file.open(QIODevice::ReadOnly);
jQuery = file.readAll();
file.close();
+//! [1]
+//! [2]
view = new QWebView(this);
view->load(QUrl("http://www.google.com/ncr"));
connect(view, SIGNAL(loadFinished(bool)), SLOT(adjustLocation()));
@@ -70,7 +74,9 @@ MainWindow::MainWindow()
toolBar->addAction(view->pageAction(QWebPage::Reload));
toolBar->addAction(view->pageAction(QWebPage::Stop));
toolBar->addWidget(locationEdit);
+//! [2]
+//! [3]
QMenu *effectMenu = menuBar()->addMenu(tr("&Effect"));
effectMenu->addAction("Highlight all links", this, SLOT(highlightAllLinks()));
@@ -89,7 +95,9 @@ MainWindow::MainWindow()
setCentralWidget(view);
}
+//! [3]
+//! [4]
void MainWindow::adjustLocation()
{
locationEdit->setText(view->url().toString());
@@ -98,11 +106,12 @@ void MainWindow::adjustLocation()
void MainWindow::changeLocation()
{
QUrl url = QUrl(locationEdit->text());
- locationEdit->setText(url.toString());
view->load(url);
view->setFocus();
}
+//! [4]
+//! [5]
void MainWindow::adjustTitle()
{
if (progress <= 0 || progress >= 100)
@@ -116,20 +125,26 @@ void MainWindow::setProgress(int p)
progress = p;
adjustTitle();
}
+//! [5]
+//! [6]
void MainWindow::finishLoading(bool)
{
progress = 100;
adjustTitle();
view->page()->mainFrame()->evaluateJavaScript(jQuery);
}
+//! [6]
+//! [7]
void MainWindow::highlightAllLinks()
{
QString code = "$('a').each( function () { $(this).css('background-color', 'yellow') } )";
view->page()->mainFrame()->evaluateJavaScript(code);
}
+//! [7]
+//! [8]
void MainWindow::rotateImages(bool toggle)
{
QString code = "$('img').each( function () { $(this).css('-webkit-transition', '-webkit-transform 2s') } )";
@@ -140,7 +155,9 @@ void MainWindow::rotateImages(bool toggle)
code = "$('img').each( function () { $(this).css('-webkit-transform', 'rotate(0deg)') } )";
view->page()->mainFrame()->evaluateJavaScript(code);
}
+//! [8]
+//! [9]
void MainWindow::removeGifImages()
{
QString code = "$('[src*=gif]').remove()";
@@ -164,4 +181,5 @@ void MainWindow::removeEmbeddedElements()
QString code = "$('embed').remove()";
view->page()->mainFrame()->evaluateJavaScript(code);
}
+//! [9]
diff --git a/examples/webkit/fancybrowser/mainwindow.h b/examples/webkit/fancybrowser/mainwindow.h
index 9362ca7..2e1068c 100644
--- a/examples/webkit/fancybrowser/mainwindow.h
+++ b/examples/webkit/fancybrowser/mainwindow.h
@@ -39,13 +39,14 @@
**
****************************************************************************/
-#include <QMainWindow>
+#include <QtGui>
QT_BEGIN_NAMESPACE
class QWebView;
class QLineEdit;
QT_END_NAMESPACE
+//! [1]
class MainWindow : public QMainWindow
{
Q_OBJECT
@@ -73,4 +74,5 @@ private:
QWebView *view;
QLineEdit *locationEdit;
int progress;
+//! [1]
};
diff --git a/examples/xmlpatterns/trafficinfo/main.cpp b/examples/xmlpatterns/trafficinfo/main.cpp
index 97b2bf7..544260d 100644
--- a/examples/xmlpatterns/trafficinfo/main.cpp
+++ b/examples/xmlpatterns/trafficinfo/main.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.cpp b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
index 1f754d5..47c51c9 100644
--- a/examples/xmlpatterns/trafficinfo/mainwindow.cpp
+++ b/examples/xmlpatterns/trafficinfo/mainwindow.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/mainwindow.h b/examples/xmlpatterns/trafficinfo/mainwindow.h
index d48109d..5362bcd 100644
--- a/examples/xmlpatterns/trafficinfo/mainwindow.h
+++ b/examples/xmlpatterns/trafficinfo/mainwindow.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/stationdialog.cpp b/examples/xmlpatterns/trafficinfo/stationdialog.cpp
index 9876bdb..54ed904 100644
--- a/examples/xmlpatterns/trafficinfo/stationdialog.cpp
+++ b/examples/xmlpatterns/trafficinfo/stationdialog.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/stationdialog.h b/examples/xmlpatterns/trafficinfo/stationdialog.h
index 5ac1635..0e87f61 100644
--- a/examples/xmlpatterns/trafficinfo/stationdialog.h
+++ b/examples/xmlpatterns/trafficinfo/stationdialog.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/stationquery.cpp b/examples/xmlpatterns/trafficinfo/stationquery.cpp
index ab42ad9..3db0fdb 100644
--- a/examples/xmlpatterns/trafficinfo/stationquery.cpp
+++ b/examples/xmlpatterns/trafficinfo/stationquery.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/stationquery.h b/examples/xmlpatterns/trafficinfo/stationquery.h
index 5cbf28a..d1e4d2f 100644
--- a/examples/xmlpatterns/trafficinfo/stationquery.h
+++ b/examples/xmlpatterns/trafficinfo/stationquery.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/timequery.cpp b/examples/xmlpatterns/trafficinfo/timequery.cpp
index bd63560..d6bf695 100644
--- a/examples/xmlpatterns/trafficinfo/timequery.cpp
+++ b/examples/xmlpatterns/trafficinfo/timequery.cpp
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/examples/xmlpatterns/trafficinfo/timequery.h b/examples/xmlpatterns/trafficinfo/timequery.h
index f88e62c..2435c71 100644
--- a/examples/xmlpatterns/trafficinfo/timequery.h
+++ b/examples/xmlpatterns/trafficinfo/timequery.h
@@ -1,6 +1,6 @@
/****************************************************************************
**
-** Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies).
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the examples of the Qt Toolkit.
diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf
index 2fe93d2..968a6bc 100644
--- a/mkspecs/common/symbian/symbian.conf
+++ b/mkspecs/common/symbian/symbian.conf
@@ -29,7 +29,7 @@ QMAKE_CFLAGS_YACC = -Wno-unused -Wno-parentheses
QMAKE_CXX = g++
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
QMAKE_CXXFLAGS.CW =
-QMAKE_CXXFLAGS.ARMCC = --visibility_inlines_hidden
+QMAKE_CXXFLAGS.ARMCC = --no_hide_all
QMAKE_CXXFLAGS_DEPS = $$QMAKE_CFLAGS_DEPS
QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON
QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
diff --git a/mkspecs/features/win32/ltcg.prf b/mkspecs/features/win32/ltcg.prf
new file mode 100644
index 0000000..f6f1299
--- /dev/null
+++ b/mkspecs/features/win32/ltcg.prf
@@ -0,0 +1,5 @@
+CONFIG(release, debug|release) {
+ QMAKE_CFLAGS *= $$QMAKE_CFLAGS_LTCG
+ QMAKE_CXXFLAGS *= $$QMAKE_CXXFLAGS_LTCG
+ QMAKE_LFLAGS *= $$QMAKE_LFLAGS_LTCG
+}
diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf
index 00287cb..5ed8e01 100644
--- a/mkspecs/win32-msvc2005/qmake.conf
+++ b/mkspecs/win32-msvc2005/qmake.conf
@@ -19,9 +19,10 @@ QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
QMAKE_CFLAGS_WARN_ON = -W3
QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD -GL
+QMAKE_CFLAGS_RELEASE = -O2 -MD
QMAKE_CFLAGS_DEBUG = -Zi -MDd
QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_LTCG = -GL
QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -30,6 +31,7 @@ QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_CXXFLAGS_STL_ON = -EHsc
QMAKE_CXXFLAGS_STL_OFF =
QMAKE_CXXFLAGS_RTTI_ON = -GR
@@ -50,11 +52,12 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_LINK = link
QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO /LTCG
+QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\"
QMAKE_LFLAGS_DLL = /DLL
+QMAKE_LFLAGS_LTCG = /LTCG
QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf
index b56b41c..373a36d 100644
--- a/mkspecs/win32-msvc2008/qmake.conf
+++ b/mkspecs/win32-msvc2008/qmake.conf
@@ -19,9 +19,10 @@ QMAKE_YACCFLAGS = -d
QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t-
QMAKE_CFLAGS_WARN_ON = -W3
QMAKE_CFLAGS_WARN_OFF = -W0
-QMAKE_CFLAGS_RELEASE = -O2 -MD -GL
+QMAKE_CFLAGS_RELEASE = -O2 -MD
QMAKE_CFLAGS_DEBUG = -Zi -MDd
QMAKE_CFLAGS_YACC =
+QMAKE_CFLAGS_LTCG = -GL
QMAKE_CXX = $$QMAKE_CC
QMAKE_CXXFLAGS = $$QMAKE_CFLAGS
@@ -30,6 +31,7 @@ QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF
QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE
QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG
QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC
+QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG
QMAKE_CXXFLAGS_STL_ON = -EHsc
QMAKE_CXXFLAGS_STL_OFF =
QMAKE_CXXFLAGS_RTTI_ON = -GR
@@ -50,11 +52,12 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<<
QMAKE_LINK = link
QMAKE_LFLAGS = /NOLOGO
-QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO /LTCG
+QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO
QMAKE_LFLAGS_DEBUG = /DEBUG
QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE
QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\"
QMAKE_LFLAGS_DLL = /DLL
+QMAKE_LFLAGS_LTCG = /LTCG
QMAKE_LIBS_CORE = kernel32.lib user32.lib shell32.lib uuid.lib ole32.lib advapi32.lib ws2_32.lib
QMAKE_LIBS_GUI = gdi32.lib comdlg32.lib oleaut32.lib imm32.lib winmm.lib winspool.lib ws2_32.lib ole32.lib user32.lib advapi32.lib
diff --git a/mkspecs/wince50standard-mipsii-msvc2008/default_post.prf b/mkspecs/wince50standard-mipsii-msvc2008/default_post.prf
index a232ba3..d423784 100644
--- a/mkspecs/wince50standard-mipsii-msvc2008/default_post.prf
+++ b/mkspecs/wince50standard-mipsii-msvc2008/default_post.prf
@@ -1 +1 @@
-include(../wince50standard-mipsii-msvc2005/qmake.conf)
+include(../wince50standard-mipsii-msvc2005/default_post.prf)
diff --git a/qmake/generators/xmloutput.cpp b/qmake/generators/xmloutput.cpp
index 68d22e1..d77dd4b 100644
--- a/qmake/generators/xmloutput.cpp
+++ b/qmake/generators/xmloutput.cpp
@@ -277,7 +277,7 @@ void XmlOutput::closeTag()
void XmlOutput::closeTo(const QString &tag)
{
bool cont = true;
- if (!tagStack.contains(tag) && tag != QString()) {
+ if (!tagStack.contains(tag) && !tag.isNull()) {
//warn_msg(WarnLogic, "<%s>: Cannot close to tag <%s>, not on stack", tagStack.last().latin1(), tag.latin1());
qDebug("<%s>: Cannot close to tag <%s>, not on stack", tagStack.last().toLatin1().constData(), tag.toLatin1().constData());
return;
diff --git a/src/3rdparty/phonon/phonon/phonon_export.h b/src/3rdparty/phonon/phonon/phonon_export.h
index e579f67..5f93ea0 100644
--- a/src/3rdparty/phonon/phonon/phonon_export.h
+++ b/src/3rdparty/phonon/phonon/phonon_export.h
@@ -32,7 +32,11 @@
# define PHONON_EXPORT Q_DECL_IMPORT
# endif
# else /* UNIX */
-# define PHONON_EXPORT Q_DECL_EXPORT
+# ifdef MAKE_PHONON_LIB /* We are building this library */
+# define PHONON_EXPORT Q_DECL_EXPORT
+# else /* We are using this library */
+# define PHONON_EXPORT Q_DECL_IMPORT
+# endif
# endif
#endif
diff --git a/src/3rdparty/phonon/phonon/phononnamespace.h b/src/3rdparty/phonon/phonon/phononnamespace.h
index 0bbf4f4..2492ee6 100644
--- a/src/3rdparty/phonon/phonon/phononnamespace.h
+++ b/src/3rdparty/phonon/phonon/phononnamespace.h
@@ -25,6 +25,11 @@
#include "phonon_export.h"
+#ifdef __QT_SYNCQT__
+// Tell syncqt to create a "Global" header here
+#pragma qt_class(Phonon::Global)
+#endif
+
/**
* Helper macro that can be used like
* \code
diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 26ce489..7d5d1c5 100644
--- a/src/3rdparty/webkit/VERSION
+++ b/src/3rdparty/webkit/VERSION
@@ -8,4 +8,4 @@ The commit imported was from the
and has the sha1 checksum
- a6ebe3865025e2bb4d767a79435af4daf5a9b4db
+ 4ee8af9348b3f57d3c0f3575ae0a58336cf07a92
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 00bd427..072beee 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,143 @@
+2009-05-19 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
+
+ Reviewed by Simon Hausmann.
+
+ Do not call the parent implementation (Widget::) in show() and hide()
+ of the PluginViewQt, as it always changes the visible state of the
+ platformWidget (equal to the platformPluginWidget in the Qt port),
+ thus ignoring the isParentVisible() test.
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::show):
+ (WebCore::PluginView::hide):
+
+2009-04-22 Tamas Szirbucz <szirbucz.tamas@stud.u-szeged.hu>
+
+ Reviewed by Ariya Hidayat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=25023
+ Delete reply in QNetworkReplyHandler::abort() to avoid leak.
+
+ * platform/network/qt/QNetworkReplyHandler.cpp:
+ (WebCore::QNetworkReplyHandler::abort):
+
+2009-05-20 Holger Hans Peter Freyther <zecke@selfish.org>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24510
+
+ Fix a bug where the browserfuncs were not properly assigned,
+ make hasproperty use _NP_HasProperty and hasmethod _NP_HasMethod.
+
+ Test: plugins/netscape-invoke-browserfuncs.html
+
+ * plugins/gtk/PluginPackageGtk.cpp:
+ (WebCore::PluginPackage::load): Fix assignment
+ * plugins/qt/PluginPackageQt.cpp:
+ (WebCore::PluginPackage::load): Fix assignment
+
+2009-05-11 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ Change Qt port to match the mac and windows ports, and unregister plugins when plugins are stopped.
+ Not doing that can cause assersion failure.
+ https://bugs.webkit.org/show_bug.cgi?id=25702
+
+ * plugins/qt/PluginViewQt.cpp:
+ (WebCore::PluginView::stop):
+
+2009-05-18 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ Done together with Balazs Kelemen <kelemen.balazs@stud.u-szeged.hu>.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24551
+
+ [Qt] Reuse FontPlatformData for the same FontDescription.
+ This effectively prevents growing heap usage for loading every web page.
+
+ * platform/graphics/qt/FontCacheQt.cpp:
+ (WebCore::qHash): Necessary for FontPlatformDataCache.
+ (WebCore::FontCache::getCachedFontPlatformData): Reuse the instance if
+ it exists, otherwise create a new one and insert it in the cache.
+
+2009-05-18 Balazs Kelemen <kelemen.balazs@stud.u-szeged.hu>
+
+ Reviewed by Ariya Hidayat.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24551
+
+ [Qt] Fix the leak in FontFallbackList::fontDataAt() function.
+ When creating a new instance of SimpleFontData, put it in the font list
+ so that it can deleted later on.
+
+ * platform/graphics/qt/FontFallbackListQt.cpp:
+ (WebCore::FontFallbackList::invalidate):
+ (WebCore::FontFallbackList::releaseFontData):
+ (WebCore::FontFallbackList::fontDataAt):
+
+2009-05-15 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] In the image decoder, remove the raw image data represented as QImage
+ once the image is converted to QPixmap and inserted in the pixmap cache.
+ This effectively reduces the heap usage when running on graphics system
+ other than raster (i.e the case where QImage != QPixmap).
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::imageAtIndex): Nullified the image on purpose.
+ * platform/graphics/qt/ImageDecoderQt.h: Made m_imageList mutable.
+
+2009-05-15 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Holger Freyther.
+
+ [Qt] Refactor alpha channel detection the image decoder.
+ Sets the boolean flag as soon as the image is being read.
+
+ * platform/graphics/qt/ImageDecoderQt.cpp:
+ (WebCore::ImageDecoderQt::ImageDecoderQt): Initialized m_hasAlphaChannel.
+ (WebCore::ImageDecoderQt::setData): Set the flag when appropriate.
+ (WebCore::ImageDecoderQt::supportsAlpha): Simplified.
+ (WebCore::ImageDecoderQt::reset): Resetted the flag.
+ * platform/graphics/qt/ImageDecoderQt.h: Added m_hasAlphaChannel.
+
+2009-05-13 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Sam Weinig.
+
+ [Qt] Fix "lighther" composition mode.
+ QPainter::CompositionMode_Plus is the right match.
+
+ * platform/graphics/qt/GraphicsContextQt.cpp:
+ (WebCore::toQtCompositionMode):
+
+2009-04-29 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Simon Fraser.
+
+ [Qt] Initialize GraphicsContext's and ImageBuffer's QPainter to match
+ the default values of canvas attributes.
+
+ * platform/graphics/qt/ImageBufferQt.cpp:
+ (WebCore::ImageBufferData::ImageBufferData):
+
+2009-04-27 Ariya Hidayat <ariya.hidayat@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ https://bugs.webkit.org/show_bug.cgi?id=18475
+
+ [Qt] Widget painting should follow the layout direction (LTR, RTL)
+ of the element style, not the application layout direction.
+
+ * platform/qt/RenderThemeQt.cpp:
+ (WebCore::RenderThemeQt::applyTheme):
+
2009-03-13 Adam Bergkvist <adam.bergkvist@ericsson.com>
Reviewed by Alexey Proskuryakov.
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp
index 8a31861..5d1f147 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontCacheQt.cpp
@@ -26,6 +26,9 @@
#include "FontDescription.h"
#include "FontPlatformData.h"
#include "Font.h"
+#include "StringHash.h"
+
+#include <QHash>
namespace WebCore {
@@ -33,9 +36,31 @@ void FontCache::getTraitsInFamily(const AtomicString& familyName, Vector<unsigne
{
}
+typedef QHash<FontDescription, FontPlatformData*> FontPlatformDataCache;
+
+// using Q_GLOBAL_STATIC leads to crash. TODO investigate the way to fix this.
+static FontPlatformDataCache* gFontPlatformDataCache;
+
+uint qHash(const FontDescription& key)
+{
+ uint value = CaseFoldingHash::hash(key.family().family());
+ value ^= key.computedPixelSize();
+ value ^= static_cast<int>(key.weight());
+ return value;
+}
+
FontPlatformData* FontCache::getCachedFontPlatformData(const FontDescription& description, const AtomicString& family, bool checkingAlternateName)
{
- return new FontPlatformData(description);
+ if (!gFontPlatformDataCache)
+ gFontPlatformDataCache = new FontPlatformDataCache;
+
+ FontPlatformData* fontData = gFontPlatformDataCache->value(description, 0);
+ if (!fontData) {
+ fontData = new FontPlatformData(description);
+ gFontPlatformDataCache->insert(description, fontData);
+ }
+
+ return fontData;
}
SimpleFontData* FontCache::getCachedFontData(const FontPlatformData*)
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp
index 22ae205..50627b7 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/FontFallbackListQt.cpp
@@ -42,8 +42,6 @@ FontFallbackList::FontFallbackList()
void FontFallbackList::invalidate(WTF::PassRefPtr<WebCore::FontSelector> fontSelector)
{
- releaseFontData();
- m_fontList.clear();
m_familyIndex = 0;
m_pitch = UnknownPitch;
m_loadingCustomFonts = false;
@@ -53,6 +51,9 @@ void FontFallbackList::invalidate(WTF::PassRefPtr<WebCore::FontSelector> fontSel
void FontFallbackList::releaseFontData()
{
+ if (m_fontList.size())
+ delete m_fontList[0].first;
+ m_fontList.clear();
}
void FontFallbackList::determinePitch(const WebCore::Font* font) const
@@ -90,7 +91,12 @@ const FontData* FontFallbackList::fontDataAt(const WebCore::Font* _font, unsigne
family = family->next();
}
- return new SimpleFontData(FontPlatformData(description), _font->wordSpacing(), _font->letterSpacing());
+ if (m_fontList.size())
+ return m_fontList[0].first;
+
+ const FontData* result = new SimpleFontData(FontPlatformData(description), _font->wordSpacing(), _font->letterSpacing());
+ m_fontList.append(pair<const FontData*, bool>(result, result->isCustomFont()));
+ return result;
}
const FontData* FontFallbackList::fontDataForCharacters(const WebCore::Font* font, const UChar*, int) const
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
index 6c90ea3..490b54b 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/GraphicsContextQt.cpp
@@ -98,7 +98,7 @@ static inline QPainter::CompositionMode toQtCompositionMode(CompositeOperator op
case CompositeHighlight:
return QPainter::CompositionMode_SourceOver;
case CompositePlusLighter:
- return QPainter::CompositionMode_SourceOver;
+ return QPainter::CompositionMode_Plus;
}
return QPainter::CompositionMode_SourceOver;
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp
index 29a02d4..333269e 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageBufferQt.cpp
@@ -47,7 +47,24 @@ ImageBufferData::ImageBufferData(const IntSize& size)
: m_pixmap(size)
{
m_pixmap.fill(QColor(Qt::transparent));
- m_painter.set(new QPainter(&m_pixmap));
+
+ QPainter* painter = new QPainter(&m_pixmap);
+ m_painter.set(painter);
+
+ // Since ImageBuffer is used mainly for Canvas, explicitly initialize
+ // its painter's pen and brush with the corresponding canvas defaults
+ // NOTE: keep in sync with CanvasRenderingContext2D::State
+ QPen pen = painter->pen();
+ pen.setColor(Qt::black);
+ pen.setWidth(1);
+ pen.setCapStyle(Qt::FlatCap);
+ pen.setJoinStyle(Qt::MiterJoin);
+ pen.setMiterLimit(10);
+ painter->setPen(pen);
+ QBrush brush = painter->brush();
+ brush.setColor(Qt::black);
+ painter->setBrush(brush);
+ painter->setCompositionMode(QPainter::CompositionMode_SourceOver);
}
ImageBuffer::ImageBuffer(const IntSize& size, bool grayScale, bool& success)
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
index 394c7a7..cd32428 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.cpp
@@ -197,7 +197,8 @@ ImageDecoderQt* ImageDecoderQt::create(const SharedBuffer& data)
}
ImageDecoderQt::ImageDecoderQt(const QString &imageFormat)
- : m_imageFormat(imageFormat)
+ : m_hasAlphaChannel(false)
+ , m_imageFormat(imageFormat)
{
}
@@ -212,6 +213,7 @@ bool ImageDecoderQt::hasFirstImageHeader() const
void ImageDecoderQt::reset()
{
+ m_hasAlphaChannel = false;
m_failed = false;
m_imageList.clear();
m_pixmapCache.clear();
@@ -230,6 +232,9 @@ void ImageDecoderQt::setData(const IncomingData &data, bool allDataReceived)
const ReadContext::ReadResult readResult = readContext.read(allDataReceived);
+ if (hasFirstImageHeader())
+ m_hasAlphaChannel = m_imageList[0].m_image.hasAlphaChannel();
+
if (debugImageDecoderQt)
qDebug() << " read returns " << readResult;
@@ -280,7 +285,7 @@ int ImageDecoderQt::repetitionCount() const
bool ImageDecoderQt::supportsAlpha() const
{
- return hasFirstImageHeader() && m_imageList[0].m_image.hasAlphaChannel();
+ return m_hasAlphaChannel;
}
int ImageDecoderQt::duration(size_t index) const
@@ -314,6 +319,10 @@ QPixmap* ImageDecoderQt::imageAtIndex(size_t index) const
if (!m_pixmapCache.contains(index)) {
m_pixmapCache.insert(index,
QPixmap::fromImage(m_imageList[index].m_image));
+
+ // store null image since the converted pixmap is already in pixmap cache
+ Q_ASSERT(m_imageList[index].m_imageState == ImageComplete);
+ m_imageList[index].m_image = QImage();
}
return &m_pixmapCache[index];
}
diff --git a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h
index a2eb6aa..b8c3edd 100644
--- a/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h
+++ b/src/3rdparty/webkit/WebCore/platform/graphics/qt/ImageDecoderQt.h
@@ -81,8 +81,9 @@ private:
int m_duration;
};
+ bool m_hasAlphaChannel;
typedef QList<ImageData> ImageList;
- ImageList m_imageList;
+ mutable ImageList m_imageList;
mutable QHash<int, QPixmap> m_pixmapCache;
int m_loopCount;
QString m_imageFormat;
diff --git a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
index 2c730a6..3e9b239 100644
--- a/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp
@@ -174,6 +174,7 @@ void QNetworkReplyHandler::abort()
if (m_reply) {
QNetworkReply* reply = release();
reply->abort();
+ reply->deleteLater();
deleteLater();
}
}
diff --git a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
index a9da76b..02d17ed 100644
--- a/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
+++ b/src/3rdparty/webkit/WebCore/platform/qt/RenderThemeQt.cpp
@@ -737,6 +737,10 @@ ControlPart RenderThemeQt::applyTheme(QStyleOption& option, RenderObject* o) con
if (isHovered(o))
option.state |= QStyle::State_MouseOver;
+ option.direction = Qt::LeftToRight;
+ if (o->style() && o->style()->direction() == WebCore::RTL)
+ option.direction = Qt::RightToLeft;
+
ControlPart result = o->style()->appearance();
switch (result) {
diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp
index 4387813..13f5394 100644
--- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginPackageQt.cpp
@@ -151,8 +151,8 @@ bool PluginPackage::load()
m_browserFuncs.getproperty = _NPN_GetProperty;
m_browserFuncs.setproperty = _NPN_SetProperty;
m_browserFuncs.removeproperty = _NPN_RemoveProperty;
- m_browserFuncs.hasproperty = _NPN_HasMethod;
- m_browserFuncs.hasmethod = _NPN_HasProperty;
+ m_browserFuncs.hasproperty = _NPN_HasProperty;
+ m_browserFuncs.hasmethod = _NPN_HasMethod;
m_browserFuncs.setexception = _NPN_SetException;
m_browserFuncs.enumerate = _NPN_Enumerate;
m_browserFuncs.construct = _NPN_Construct;
diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
index c8dd0e5..e856f92 100644
--- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
+++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
@@ -58,6 +58,7 @@
#include "MouseEvent.h"
#include "Page.h"
#include "PlatformMouseEvent.h"
+#include "PluginMainThreadScheduler.h"
#include "RenderLayer.h"
#include "Settings.h"
@@ -112,7 +113,9 @@ void PluginView::show()
if (isParentVisible() && platformPluginWidget())
platformPluginWidget()->setVisible(true);
- Widget::show();
+ // do not call parent impl. here as it will set the platformWidget
+ // (same as platformPluginWidget in the Qt port) to visible, even
+ // when parent isn't visible.
}
void PluginView::hide()
@@ -122,7 +125,9 @@ void PluginView::hide()
if (isParentVisible() && platformPluginWidget())
platformPluginWidget()->setVisible(false);
- Widget::hide();
+ // do not call parent impl. here as it will set the platformWidget
+ // (same as platformPluginWidget in the Qt port) to invisible, even
+ // when parent isn't visible.
}
void PluginView::paint(GraphicsContext* context, const IntRect& rect)
@@ -225,6 +230,8 @@ void PluginView::stop()
JSC::JSLock::DropAllLocks dropAllLocks(false);
+ PluginMainThreadScheduler::scheduler().unregisterPlugin(m_instance);
+
// Clear the window
m_npWindow.window = 0;
if (m_plugin->pluginFuncs()->setwindow && !m_plugin->quirks().contains(PluginQuirkDontSetNullWindowHandleOnDestroy)) {
diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog
index c3bd633..d9f925a 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,28 @@
+2009-05-19 Kenneth Rohde Christiansen <kenneth.christiansen@openbossa.org>
+
+ Reviewed by Simon Hausmann.
+
+ Fix a plugin bug in the WebKit code, similar to the one in WebCore.
+
+ The problem is when a non visible QtPluginWidget would show it self
+ in a sibling frame. The problem was due to our clipping. In Qt,
+ if setMask is set with an empty QRegion, no clipping will
+ be performed, so in that case we hide the PluginContainer
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::):
+
+2009-03-27 Erik L. Bunce <elbunce@xendom.com>
+
+ Reviewed by Simon Hausmann.
+
+ https://bugs.webkit.org/show_bug.cgi?id=24746
+
+ Improved selection tests.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::textSelection):
+
2009-04-24 Simon Hausmann <simon.hausmann@nokia.com>
Rubber-stamped by Ariya Hidayat.
diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index c421d42..a2b33c0 100644
--- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -1058,7 +1058,13 @@ public:
IntRect clipRect(static_cast<FrameView*>(parentScrollView)->windowClipRect());
clipRect.move(-windowRect.x(), -windowRect.y());
clipRect.intersect(platformWidget()->rect());
- platformWidget()->setMask(QRegion(clipRect.x(), clipRect.y(), clipRect.width(), clipRect.height()));
+
+ QRegion clipRegion = QRegion(clipRect);
+ platformWidget()->setMask(clipRegion);
+
+ // if setMask is set with an empty QRegion, no clipping will
+ // be performed, so in that case we hide the platformWidget
+ platformWidget()->setVisible(!clipRegion.isEmpty());
}
};
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 fe74fac..620aa31 100644
--- a/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -872,14 +872,6 @@ void tst_QWebPage::textSelection()
"<p>May the source<br/>be with you!</p></body></html>");
page->mainFrame()->setHtml(content);
- // this will select the first paragraph
- QString script = "var range = document.createRange(); " \
- "var node = document.getElementById(\"one\"); " \
- "range.selectNode(node); " \
- "getSelection().addRange(range);";
- page->mainFrame()->evaluateJavaScript(script);
- QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox"));
-
// these actions must exist
QVERIFY(page->action(QWebPage::SelectAll) != 0);
QVERIFY(page->action(QWebPage::SelectNextChar) != 0);
@@ -895,7 +887,8 @@ void tst_QWebPage::textSelection()
QVERIFY(page->action(QWebPage::SelectStartOfDocument) != 0);
QVERIFY(page->action(QWebPage::SelectEndOfDocument) != 0);
- // right now they are disabled because contentEditable is false
+ // right now they are disabled because contentEditable is false and
+ // there isn't an existing selection to modify
QCOMPARE(page->action(QWebPage::SelectNextChar)->isEnabled(), false);
QCOMPARE(page->action(QWebPage::SelectPreviousChar)->isEnabled(), false);
QCOMPARE(page->action(QWebPage::SelectNextWord)->isEnabled(), false);
@@ -912,11 +905,37 @@ void tst_QWebPage::textSelection()
// ..but SelectAll is awalys enabled
QCOMPARE(page->action(QWebPage::SelectAll)->isEnabled(), true);
+ // this will select the first paragraph
+ QString selectScript = "var range = document.createRange(); " \
+ "var node = document.getElementById(\"one\"); " \
+ "range.selectNode(node); " \
+ "getSelection().addRange(range);";
+ page->mainFrame()->evaluateJavaScript(selectScript);
+ QCOMPARE(page->selectedText().trimmed(), QString::fromLatin1("The quick brown fox"));
+
+ // here the actions are enabled after a selection has been created
+ QCOMPARE(page->action(QWebPage::SelectNextChar)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::SelectPreviousChar)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::SelectNextWord)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::SelectPreviousWord)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::SelectNextLine)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::SelectPreviousLine)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::SelectStartOfLine)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::SelectEndOfLine)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::SelectStartOfBlock)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::SelectEndOfBlock)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::SelectStartOfDocument)->isEnabled(), true);
+ QCOMPARE(page->action(QWebPage::SelectEndOfDocument)->isEnabled(), true);
+
// make it editable before navigating the cursor
page->setContentEditable(true);
+ // cursor will be before the word "The", this makes sure there is a charet
+ page->triggerAction(QWebPage::MoveToStartOfDocument);
+ QVERIFY(page->isSelectionCollapsed());
+ QCOMPARE(page->selectionStartOffset(), 0);
+
// here the actions are enabled after contentEditable is true
- QCOMPARE(page->action(QWebPage::SelectAll)->isEnabled(), true);
QCOMPARE(page->action(QWebPage::SelectNextChar)->isEnabled(), true);
QCOMPARE(page->action(QWebPage::SelectPreviousChar)->isEnabled(), true);
QCOMPARE(page->action(QWebPage::SelectNextWord)->isEnabled(), true);
diff --git a/src/corelib/arch/qatomic_mips.h b/src/corelib/arch/qatomic_mips.h
index b263aab..ea9954b 100644
--- a/src/corelib/arch/qatomic_mips.h
+++ b/src/corelib/arch/qatomic_mips.h
@@ -103,16 +103,25 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree()
#if defined(Q_CC_GNU) && !defined(Q_OS_IRIX)
+#if _MIPS_SIM == _ABIO32
+#define SET_MIPS2 ".set mips2\n\t"
+#else
+#define SET_MIPS2
+#endif
+
inline bool QBasicAtomicInt::ref()
{
register int originalValue;
register int newValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
"ll %[originalValue], %[_q_value]\n"
"addiu %[newValue], %[originalValue], %[one]\n"
"sc %[newValue], %[_q_value]\n"
"beqz %[newValue], 0b\n"
"nop\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[_q_value] "+m" (_q_value),
[newValue] "=&r" (newValue)
@@ -125,12 +134,15 @@ inline bool QBasicAtomicInt::deref()
{
register int originalValue;
register int newValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
"ll %[originalValue], %[_q_value]\n"
"addiu %[newValue], %[originalValue], %[minusOne]\n"
"sc %[newValue], %[_q_value]\n"
"beqz %[newValue], 0b\n"
"nop\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[_q_value] "+m" (_q_value),
[newValue] "=&r" (newValue)
@@ -143,7 +155,9 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
{
register int result;
register int tempValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
"ll %[result], %[_q_value]\n"
"xor %[result], %[result], %[expectedValue]\n"
"bnez %[result], 0f\n"
@@ -153,6 +167,7 @@ inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue)
"beqz %[tempValue], 0b\n"
"nop\n"
"0:\n"
+ ".set pop\n"
: [result] "=&r" (result),
[tempValue] "=&r" (tempValue),
[_q_value] "+m" (_q_value)
@@ -166,7 +181,9 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
{
register int result;
register int tempValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
"ll %[result], %[_q_value]\n"
"xor %[result], %[result], %[expectedValue]\n"
"bnez %[result], 0f\n"
@@ -177,6 +194,7 @@ inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue)
"nop\n"
"sync\n"
"0:\n"
+ ".set pop\n"
: [result] "=&r" (result),
[tempValue] "=&r" (tempValue),
[_q_value] "+m" (_q_value)
@@ -190,7 +208,9 @@ inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
{
register int result;
register int tempValue;
- asm volatile("sync\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "sync\n"
"0:\n"
"ll %[result], %[_q_value]\n"
"xor %[result], %[result], %[expectedValue]\n"
@@ -201,6 +221,7 @@ inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue)
"beqz %[tempValue], 0b\n"
"nop\n"
"0:\n"
+ ".set pop\n"
: [result] "=&r" (result),
[tempValue] "=&r" (tempValue),
[_q_value] "+m" (_q_value)
@@ -219,12 +240,15 @@ inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue)
{
register int originalValue;
register int tempValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
"ll %[originalValue], %[_q_value]\n"
"move %[tempValue], %[newValue]\n"
"sc %[tempValue], %[_q_value]\n"
"beqz %[tempValue], 0b\n"
"nop\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[tempValue] "=&r" (tempValue),
[_q_value] "+m" (_q_value)
@@ -237,13 +261,16 @@ inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue)
{
register int originalValue;
register int tempValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
"ll %[originalValue], %[_q_value]\n"
"move %[tempValue], %[newValue]\n"
"sc %[tempValue], %[_q_value]\n"
"beqz %[tempValue], 0b\n"
"nop\n"
"sync\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[tempValue] "=&r" (tempValue),
[_q_value] "+m" (_q_value)
@@ -256,13 +283,16 @@ inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue)
{
register int originalValue;
register int tempValue;
- asm volatile("sync\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "sync\n"
"0:\n"
"ll %[originalValue], %[_q_value]\n"
"move %[tempValue], %[newValue]\n"
"sc %[tempValue], %[_q_value]\n"
"beqz %[tempValue], 0b\n"
"nop\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[tempValue] "=&r" (tempValue),
[_q_value] "+m" (_q_value)
@@ -280,12 +310,15 @@ inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd)
{
register int originalValue;
register int newValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
"ll %[originalValue], %[_q_value]\n"
"addu %[newValue], %[originalValue], %[valueToAdd]\n"
"sc %[newValue], %[_q_value]\n"
"beqz %[newValue], 0b\n"
"nop\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[_q_value] "+m" (_q_value),
[newValue] "=&r" (newValue)
@@ -298,13 +331,16 @@ inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd)
{
register int originalValue;
register int newValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
"ll %[originalValue], %[_q_value]\n"
"addu %[newValue], %[originalValue], %[valueToAdd]\n"
"sc %[newValue], %[_q_value]\n"
"beqz %[newValue], 0b\n"
"nop\n"
"sync\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[_q_value] "+m" (_q_value),
[newValue] "=&r" (newValue)
@@ -317,13 +353,16 @@ inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd)
{
register int originalValue;
register int newValue;
- asm volatile("sync\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "sync\n"
"0:\n"
"ll %[originalValue], %[_q_value]\n"
"addu %[newValue], %[originalValue], %[valueToAdd]\n"
"sc %[newValue], %[_q_value]\n"
"beqz %[newValue], 0b\n"
"nop\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[_q_value] "+m" (_q_value),
[newValue] "=&r" (newValue)
@@ -350,7 +389,9 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
{
register T *result;
register T *tempValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
LLP" %[result], %[_q_value]\n"
"xor %[result], %[result], %[expectedValue]\n"
"bnez %[result], 0f\n"
@@ -360,6 +401,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValu
"beqz %[tempValue], 0b\n"
"nop\n"
"0:\n"
+ ".set pop\n"
: [result] "=&r" (result),
[tempValue] "=&r" (tempValue),
[_q_value] "+m" (_q_value)
@@ -374,7 +416,9 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
{
register T *result;
register T *tempValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
LLP" %[result], %[_q_value]\n"
"xor %[result], %[result], %[expectedValue]\n"
"bnez %[result], 0f\n"
@@ -385,6 +429,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValu
"nop\n"
"sync\n"
"0:\n"
+ ".set pop\n"
: [result] "=&r" (result),
[tempValue] "=&r" (tempValue),
[_q_value] "+m" (_q_value)
@@ -399,7 +444,9 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
{
register T *result;
register T *tempValue;
- asm volatile("sync\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "sync\n"
"0:\n"
LLP" %[result], %[_q_value]\n"
"xor %[result], %[result], %[expectedValue]\n"
@@ -410,6 +457,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValu
"beqz %[tempValue], 0b\n"
"nop\n"
"0:\n"
+ ".set pop\n"
: [result] "=&r" (result),
[tempValue] "=&r" (tempValue),
[_q_value] "+m" (_q_value)
@@ -430,12 +478,15 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue)
{
register T *originalValue;
register T *tempValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
LLP" %[originalValue], %[_q_value]\n"
"move %[tempValue], %[newValue]\n"
SCP" %[tempValue], %[_q_value]\n"
"beqz %[tempValue], 0b\n"
"nop\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[tempValue] "=&r" (tempValue),
[_q_value] "+m" (_q_value)
@@ -449,13 +500,16 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue)
{
register T *originalValue;
register T *tempValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
LLP" %[originalValue], %[_q_value]\n"
"move %[tempValue], %[newValue]\n"
SCP" %[tempValue], %[_q_value]\n"
"beqz %[tempValue], 0b\n"
"nop\n"
"sync\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[tempValue] "=&r" (tempValue),
[_q_value] "+m" (_q_value)
@@ -469,13 +523,16 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue)
{
register T *originalValue;
register T *tempValue;
- asm volatile("sync\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "sync\n"
"0:\n"
LLP" %[originalValue], %[_q_value]\n"
"move %[tempValue], %[newValue]\n"
SCP" %[tempValue], %[_q_value]\n"
"beqz %[tempValue], 0b\n"
"nop\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[tempValue] "=&r" (tempValue),
[_q_value] "+m" (_q_value)
@@ -495,12 +552,15 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueTo
{
register T *originalValue;
register T *newValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
LLP" %[originalValue], %[_q_value]\n"
"addu %[newValue], %[originalValue], %[valueToAdd]\n"
SCP" %[newValue], %[_q_value]\n"
"beqz %[newValue], 0b\n"
"nop\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[_q_value] "+m" (_q_value),
[newValue] "=&r" (newValue)
@@ -514,13 +574,16 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueTo
{
register T *originalValue;
register T *newValue;
- asm volatile("0:\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "0:\n"
LLP" %[originalValue], %[_q_value]\n"
"addu %[newValue], %[originalValue], %[valueToAdd]\n"
SCP" %[newValue], %[_q_value]\n"
"beqz %[newValue], 0b\n"
"nop\n"
"sync\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[_q_value] "+m" (_q_value),
[newValue] "=&r" (newValue)
@@ -534,13 +597,16 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueTo
{
register T *originalValue;
register T *newValue;
- asm volatile("sync\n"
+ asm volatile(".set push\n"
+ SET_MIPS2
+ "sync\n"
"0:\n"
LLP" %[originalValue], %[_q_value]\n"
"addu %[newValue], %[originalValue], %[valueToAdd]\n"
SCP" %[newValue], %[_q_value]\n"
"beqz %[newValue], 0b\n"
"nop\n"
+ ".set pop\n"
: [originalValue] "=&r" (originalValue),
[_q_value] "+m" (_q_value),
[newValue] "=&r" (newValue)
diff --git a/src/corelib/concurrent/qfuturewatcher.cpp b/src/corelib/concurrent/qfuturewatcher.cpp
index ea35e9e..39d7698 100644
--- a/src/corelib/concurrent/qfuturewatcher.cpp
+++ b/src/corelib/concurrent/qfuturewatcher.cpp
@@ -465,7 +465,7 @@ void QFutureWatcherBasePrivate::sendCallOutEvent(QFutureCallOutEvent *event)
break;
emit q->progressValueChanged(event->index1);
- if (event->text != QString()) // ###
+ if (!event->text.isNull()) // ###
q->progressTextChanged(event->text);
break;
case QFutureCallOutEvent::ProgressRange:
diff --git a/src/corelib/concurrent/qtconcurrentiteratekernel.cpp b/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
index 5c20146..bfc0e82 100644
--- a/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
+++ b/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
@@ -108,11 +108,17 @@ static qint64 getticks()
return 0;
return (ts.tv_sec * 1000000000) + ts.tv_nsec;
#else
+
+#ifdef Q_OS_SYMBIAN
+ return clock();
+#else
// no clock_gettime(), fall back to wall time
struct timeval tv;
gettimeofday(&tv, 0);
return (tv.tv_sec * 1000000) + tv.tv_usec;
#endif
+
+#endif
}
#elif defined(Q_OS_WIN)
diff --git a/src/corelib/concurrent/qtconcurrentiteratekernel.h b/src/corelib/concurrent/qtconcurrentiteratekernel.h
index 38d2824..5cf4ebe 100644
--- a/src/corelib/concurrent/qtconcurrentiteratekernel.h
+++ b/src/corelib/concurrent/qtconcurrentiteratekernel.h
@@ -181,7 +181,10 @@ public:
typedef T ResultType;
IterateKernel(Iterator _begin, Iterator _end)
-#ifndef QT_NO_PARTIAL_TEMPLATE_SPECIALIZATION
+#if defined (QT_NO_STL)
+ : begin(_begin), end(_end), current(_begin), currentIndex(0),
+ forIteration(false), progressReportingEnabled(true)
+#elif !defined(QT_NO_PARTIAL_TEMPLATE_SPECIALIZATION)
: begin(_begin), end(_end), current(_begin), currentIndex(0),
forIteration(selectIteration(typename std::iterator_traits<Iterator>::iterator_category())), progressReportingEnabled(true)
#else
@@ -189,7 +192,12 @@ public:
forIteration(selectIteration(std::iterator_category(_begin))), progressReportingEnabled(true)
#endif
{
+#if defined (QT_NO_STL)
+ iterationCount = 0;
+#else
iterationCount = forIteration ? std::distance(_begin, _end) : 0;
+
+#endif
}
virtual ~IterateKernel() { }
diff --git a/src/corelib/concurrent/qtconcurrentthreadengine.h b/src/corelib/concurrent/qtconcurrentthreadengine.h
index 9e7d12e..444e0db 100644
--- a/src/corelib/concurrent/qtconcurrentthreadengine.h
+++ b/src/corelib/concurrent/qtconcurrentthreadengine.h
@@ -51,6 +51,7 @@
#include <QtCore/qdebug.h>
#include <QtCore/qtconcurrentexception.h>
#include <QtCore/qwaitcondition.h>
+#include <QtCore/qmutex.h>
QT_BEGIN_HEADER
QT_BEGIN_NAMESPACE
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 15b2d53..27aaac1 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -1118,7 +1118,7 @@ class QDataStream;
#ifndef Q_DECL_EXPORT
# ifdef Q_OS_WIN
# define Q_DECL_EXPORT __declspec(dllexport)
-# elif defined(Q_CC_NOKIAX86) || defined(Q_CC_RVCT)
+# elif defined(Q_CC_NOKIAX86)
# define Q_DECL_EXPORT __declspec(dllexport)
# elif defined(QT_VISIBILITY_AVAILABLE)
# define Q_DECL_EXPORT __attribute__((visibility("default")))
@@ -1130,7 +1130,7 @@ class QDataStream;
#ifndef Q_DECL_IMPORT
# if defined(Q_OS_WIN)
# define Q_DECL_IMPORT __declspec(dllimport)
-# elif defined(Q_CC_NOKIAX86) || defined(Q_CC_RVCT)
+# elif defined(Q_CC_NOKIAX86)
# define Q_DECL_IMPORT __declspec(dllimport)
# else
# define Q_DECL_IMPORT
diff --git a/src/corelib/io/qdiriterator.cpp b/src/corelib/io/qdiriterator.cpp
index b14f436..81bfb27 100644
--- a/src/corelib/io/qdiriterator.cpp
+++ b/src/corelib/io/qdiriterator.cpp
@@ -201,8 +201,8 @@ void QDirIteratorPrivate::advance()
QString subDir = it->currentFilePath();
#ifdef Q_OS_WIN
- if (currentFileInfo.isSymLink())
- subDir = currentFileInfo.canonicalFilePath();
+ if (nextFileInfo.isSymLink())
+ subDir = nextFileInfo.canonicalFilePath();
#endif
pushSubDirectory(subDir, it->nameFilters(), it->filters());
}
diff --git a/src/corelib/io/qfile.cpp b/src/corelib/io/qfile.cpp
index 4a20c97..551485d 100644
--- a/src/corelib/io/qfile.cpp
+++ b/src/corelib/io/qfile.cpp
@@ -718,26 +718,29 @@ QFile::rename(const QString &newName)
return true;
}
- QFile in(fileName());
+ if (isSequential()) {
+ d->setError(QFile::RenameError, tr("Will not rename sequential file using block copy"));
+ return false;
+ }
+
QFile out(newName);
- if (in.open(QIODevice::ReadOnly)) {
+ if (open(QIODevice::ReadOnly)) {
if (out.open(QIODevice::WriteOnly | QIODevice::Truncate)) {
bool error = false;
char block[4096];
- qint64 read;
- while ((read = in.read(block, sizeof(block))) > 0) {
- if (read != out.write(block, read)) {
+ qint64 bytes;
+ while ((bytes = read(block, sizeof(block))) > 0) {
+ if (bytes != out.write(block, bytes)) {
d->setError(QFile::RenameError, out.errorString());
error = true;
break;
}
}
- if (read == -1) {
- d->setError(QFile::RenameError, in.errorString());
+ if (bytes == -1) {
+ d->setError(QFile::RenameError, errorString());
error = true;
}
if(!error) {
- in.close();
if (!remove()) {
d->setError(QFile::RenameError, tr("Cannot remove source file"));
error = true;
@@ -747,12 +750,16 @@ QFile::rename(const QString &newName)
out.remove();
} else {
fileEngine()->setFileName(newName);
+ setPermissions(permissions());
+ unsetError();
setFileName(newName);
}
+ close();
return !error;
}
+ close();
}
- d->setError(QFile::RenameError, out.isOpen() ? in.errorString() : out.errorString());
+ d->setError(QFile::RenameError, out.isOpen() ? errorString() : out.errorString());
}
return false;
}
@@ -914,6 +921,7 @@ QFile::copy(const QString &newName)
out.setAutoRemove(false);
#endif
}
+ close();
}
if(!error) {
QFile::setPermissions(newName, permissions());
diff --git a/src/corelib/io/qfsfileengine.cpp b/src/corelib/io/qfsfileengine.cpp
index 61ea7cc..07f3c9c 100644
--- a/src/corelib/io/qfsfileengine.cpp
+++ b/src/corelib/io/qfsfileengine.cpp
@@ -312,6 +312,10 @@ bool QFSFileEnginePrivate::openFh(QIODevice::OpenMode openMode, FILE *fh)
if (ret == -1) {
q->setError(errno == EMFILE ? QFile::ResourceError : QFile::OpenError,
qt_error_string(int(errno)));
+
+ this->openMode = QIODevice::NotOpen;
+ this->fh = 0;
+
return false;
}
}
@@ -335,6 +339,7 @@ bool QFSFileEngine::open(QIODevice::OpenMode openMode, int fd)
if ((openMode & QFile::WriteOnly) && !(openMode & (QFile::ReadOnly | QFile::Append)))
openMode |= QFile::Truncate;
+ d->openMode = openMode;
d->lastFlushFailed = false;
d->closeFileHandle = false;
d->nativeFilePath.clear();
@@ -367,6 +372,10 @@ bool QFSFileEnginePrivate::openFd(QIODevice::OpenMode openMode, int fd)
if (ret == -1) {
q->setError(errno == EMFILE ? QFile::ResourceError : QFile::OpenError,
qt_error_string(int(errno)));
+
+ this->openMode = QIODevice::NotOpen;
+ this->fd = -1;
+
return false;
}
}
@@ -868,6 +877,119 @@ bool QFSFileEngine::supportsExtension(Extension extension) const
return false;
}
+/*! \fn bool QFSFileEngine::caseSensitive() const
+ Returns true for Windows, false for Unix.
+*/
+
+/*! \fn bool QFSFileEngine::copy(const QString &copyName)
+
+ For windows, copy the file to file \a copyName.
+
+ Not implemented for Unix.
+*/
+
+/*! \fn QString QFSFileEngine::currentPath(const QString &fileName)
+ For Unix, returns the current working directory for the file
+ engine.
+
+ For Windows, returns the canonicalized form of the current path used
+ by the file engine for the drive specified by \a fileName. On
+ Windows, each drive has its own current directory, so a different
+ path is returned for file names that include different drive names
+ (e.g. A: or C:).
+
+ \sa setCurrentPath()
+*/
+
+/*! \fn QFileInfoList QFSFileEngine::drives()
+ For Windows, returns the list of drives in the file system as a list
+ of QFileInfo objects. On unix, Mac OS X and Windows CE, only the
+ root path is returned. On Windows, this function returns all drives
+ (A:\, C:\, D:\, etc.).
+
+ For Unix, the list contains just the root path "/".
+*/
+
+/*! \fn QString QFSFileEngine::fileName(FileName file) const
+ \reimp
+*/
+
+/*! \fn QDateTime QFSFileEngine::fileTime(FileTime time) const
+ \reimp
+*/
+
+/*! \fn QString QFSFileEngine::homePath()
+ Returns the home path of the current user.
+
+ \sa rootPath()
+*/
+
+/*! \fn bool QFSFileEngine::isRelativePath() const
+ \reimp
+*/
+
+/*! \fn bool QFSFileEngine::link(const QString &newName)
+
+ Creates a link from the file currently specified by fileName() to
+ \a newName. What a link is depends on the underlying filesystem
+ (be it a shortcut on Windows or a symbolic link on Unix). Returns
+ true if successful; otherwise returns false.
+*/
+
+/*! \fn bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) const
+ \reimp
+*/
+
+/*! \fn uint QFSFileEngine::ownerId(FileOwner own) const
+ In Unix, if stat() is successful, the \c uid is returned if
+ \a own is the owner. Otherwise the \c gid is returned. If stat()
+ is unsuccessful, -2 is reuturned.
+
+ For Windows, -2 is always returned.
+*/
+
+/*! \fn QString QFSFileEngine::owner(FileOwner own) const
+ \reimp
+*/
+
+/*! \fn bool QFSFileEngine::remove()
+ \reimp
+*/
+
+/*! \fn bool QFSFileEngine::rename(const QString &newName)
+ \reimp
+*/
+
+/*! \fn bool QFSFileEngine::rmdir(const QString &name, bool recurseParentDirectories) const
+ \reimp
+*/
+
+/*! \fn QString QFSFileEngine::rootPath()
+ Returns the root path.
+
+ \sa homePath()
+*/
+
+/*! \fn bool QFSFileEngine::setCurrentPath(const QString &path)
+ Sets the current path (e.g., for QDir), to \a path. Returns true if the
+ new path exists; otherwise this function does nothing, and returns false.
+
+ \sa currentPath()
+*/
+
+/*! \fn bool QFSFileEngine::setPermissions(uint perms)
+ \reimp
+*/
+
+/*! \fn bool QFSFileEngine::setSize(qint64 size)
+ \reimp
+*/
+
+/*! \fn QString QFSFileEngine::tempPath()
+ Returns the temporary path (i.e., a path in which it is safe
+ to store temporary files).
+*/
+
QT_END_NAMESPACE
#endif // QT_NO_FSFILEENGINE
diff --git a/src/corelib/io/qfsfileengine_unix.cpp b/src/corelib/io/qfsfileengine_unix.cpp
index 4747bcc..e595f15 100644
--- a/src/corelib/io/qfsfileengine_unix.cpp
+++ b/src/corelib/io/qfsfileengine_unix.cpp
@@ -293,9 +293,8 @@ qint64 QFSFileEnginePrivate::nativeRead(char *data, qint64 len)
int oldFlags = fcntl(QT_FILENO(fh), F_GETFL);
for (int i = 0; i < 2; ++i) {
// Unix: Make the underlying file descriptor non-blocking
- int v = 1;
if ((oldFlags & O_NONBLOCK) == 0)
- fcntl(QT_FILENO(fh), F_SETFL, oldFlags | O_NONBLOCK, &v, sizeof(v));
+ fcntl(QT_FILENO(fh), F_SETFL, oldFlags | O_NONBLOCK);
// Cross platform stdlib read
size_t read = 0;
@@ -313,8 +312,7 @@ qint64 QFSFileEnginePrivate::nativeRead(char *data, qint64 len)
// Unix: Restore the blocking state of the underlying socket
if ((oldFlags & O_NONBLOCK) == 0) {
- int v = 1;
- fcntl(QT_FILENO(fh), F_SETFL, oldFlags, &v, sizeof(v));
+ fcntl(QT_FILENO(fh), F_SETFL, oldFlags);
if (readBytes == 0) {
int readByte = 0;
do {
@@ -331,8 +329,7 @@ qint64 QFSFileEnginePrivate::nativeRead(char *data, qint64 len)
}
// Unix: Restore the blocking state of the underlying socket
if ((oldFlags & O_NONBLOCK) == 0) {
- int v = 1;
- fcntl(QT_FILENO(fh), F_SETFL, oldFlags, &v, sizeof(v));
+ fcntl(QT_FILENO(fh), F_SETFL, oldFlags);
}
if (readBytes == 0 && !feof(fh)) {
// if we didn't read anything and we're not at EOF, it must be an error
@@ -1045,7 +1042,7 @@ QString QFSFileEngine::fileName(FileName file) const
#endif
if (len > 0) {
QString ret;
- if (S_ISDIR(d->st.st_mode) && s[0] != '/') {
+ if (d->doStat() && S_ISDIR(d->st.st_mode) && s[0] != '/') {
QDir parent(d->filePath);
parent.cdUp();
ret = parent.path();
diff --git a/src/corelib/io/qfsfileengine_win.cpp b/src/corelib/io/qfsfileengine_win.cpp
index 2df13f0..6ae13e9 100644
--- a/src/corelib/io/qfsfileengine_win.cpp
+++ b/src/corelib/io/qfsfileengine_win.cpp
@@ -946,9 +946,6 @@ bool QFSFileEnginePrivate::nativeIsSequential() const
return false;
}
-/*!
- \reimp
-*/
bool QFSFileEngine::remove()
{
Q_D(QFSFileEngine);
@@ -959,9 +956,6 @@ bool QFSFileEngine::remove()
});
}
-/*!
- \reimp
-*/
bool QFSFileEngine::copy(const QString &copyName)
{
Q_D(QFSFileEngine);
@@ -974,9 +968,6 @@ bool QFSFileEngine::copy(const QString &copyName)
});
}
-/*!
- \reimp
-*/
bool QFSFileEngine::rename(const QString &newName)
{
Q_D(QFSFileEngine);
@@ -1017,9 +1008,6 @@ static inline bool mkDir(const QString &path)
});
}
-/*!
- \reimp
-*/
static inline bool rmDir(const QString &path)
{
QT_WA({
@@ -1029,9 +1017,6 @@ static inline bool rmDir(const QString &path)
});
}
-/*!
- \reimp
-*/
static inline bool isDirPath(const QString &dirPath, bool *existed)
{
QString path = dirPath;
@@ -1054,9 +1039,6 @@ static inline bool isDirPath(const QString &dirPath, bool *existed)
return fileAttrib & FILE_ATTRIBUTE_DIRECTORY;
}
-/*!
- \reimp
-*/
bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) const
{
QString dirName = name;
@@ -1097,9 +1079,6 @@ bool QFSFileEngine::mkdir(const QString &name, bool createParentDirectories) con
return mkDir(name);
}
-/*!
- \reimp
-*/
bool QFSFileEngine::rmdir(const QString &name, bool recurseParentDirectories) const
{
QString dirName = name;
@@ -1120,20 +1099,11 @@ bool QFSFileEngine::rmdir(const QString &name, bool recurseParentDirectories) co
return rmDir(name);
}
-/*!
- \reimp
-*/
bool QFSFileEngine::caseSensitive() const
{
return false;
}
-/*!
- Sets the current path (e.g., for QDir), to \a path. Returns true if the
- new path exists; otherwise this function does nothing, and returns false.
-
- \sa currentPath()
-*/
bool QFSFileEngine::setCurrentPath(const QString &path)
{
if (!QDir(path).exists())
@@ -1153,16 +1123,6 @@ bool QFSFileEngine::setCurrentPath(const QString &path)
#endif
}
-/*!
- Returns the canonicalized form of the current path used by the file
- engine for the drive specified by \a fileName.
-
- On Windows, each drive has its own current directory, so a different
- path is returned for file names that include different drive names
- (e.g. A: or C:).
-
- \sa setCurrentPath()
-*/
QString QFSFileEngine::currentPath(const QString &fileName)
{
#if !defined(Q_OS_WINCE)
@@ -1219,11 +1179,6 @@ QString QFSFileEngine::currentPath(const QString &fileName)
#endif
}
-/*!
- Returns the home path of the current user.
-
- \sa rootPath()
-*/
QString QFSFileEngine::homePath()
{
QString ret;
@@ -1277,11 +1232,6 @@ QString QFSFileEngine::homePath()
return QDir::fromNativeSeparators(ret);
}
-/*!
- Returns the root path.
-
- \sa homePath()
-*/
QString QFSFileEngine::rootPath()
{
#if defined(Q_OS_WINCE)
@@ -1299,10 +1249,6 @@ QString QFSFileEngine::rootPath()
return ret;
}
-/*!
- Returns the temporary path (i.e., a path in which it is safe to store
- temporary files).
-*/
QString QFSFileEngine::tempPath()
{
QString ret;
@@ -1330,11 +1276,6 @@ QString QFSFileEngine::tempPath()
return ret;
}
-/*!
- Returns the list of drives in the file system as a list of QFileInfo
- objects. On unix, Mac OS X and Windows CE, only the root path is returned.
- On Windows, this function returns all drives (A:\, C:\, D:\, etc.).
-*/
QFileInfoList QFSFileEngine::drives()
{
QFileInfoList ret;
@@ -1556,9 +1497,6 @@ QString QFSFileEnginePrivate::getLink() const
return readLink(filePath);
}
-/*!
- \reimp
-*/
bool QFSFileEngine::link(const QString &newName)
{
#if !defined(Q_OS_WINCE)
@@ -1816,9 +1754,6 @@ QAbstractFileEngine::FileFlags QFSFileEngine::fileFlags(QAbstractFileEngine::Fil
return ret;
}
-/*!
- \reimp
-*/
QString QFSFileEngine::fileName(FileName file) const
{
Q_D(const QFSFileEngine);
@@ -1912,9 +1847,6 @@ QString QFSFileEngine::fileName(FileName file) const
return d->filePath;
}
-/*!
- \reimp
-*/
bool QFSFileEngine::isRelativePath() const
{
Q_D(const QFSFileEngine);
@@ -1924,18 +1856,12 @@ bool QFSFileEngine::isRelativePath() const
|| (d->filePath.at(0) == QLatin1Char('/') && d->filePath.at(1) == QLatin1Char('/'))))); // drive, e.g. a:
}
-/*!
- \reimp
-*/
uint QFSFileEngine::ownerId(FileOwner /*own*/) const
{
static const uint nobodyID = (uint) -2;
return nobodyID;
}
-/*!
- \reimp
-*/
QString QFSFileEngine::owner(FileOwner own) const
{
#if !defined(QT_NO_LIBRARY)
@@ -1974,9 +1900,6 @@ QString QFSFileEngine::owner(FileOwner own) const
return QString(QLatin1String(""));
}
-/*!
- \reimp
-*/
bool QFSFileEngine::setPermissions(uint perms)
{
Q_D(QFSFileEngine);
@@ -2003,9 +1926,6 @@ bool QFSFileEngine::setPermissions(uint perms)
return ret;
}
-/*!
- \reimp
-*/
bool QFSFileEngine::setSize(qint64 size)
{
Q_D(QFSFileEngine);
@@ -2075,9 +1995,6 @@ static inline QDateTime fileTimeToQDateTime(const FILETIME *time)
return ret;
}
-/*!
- \reimp
-*/
QDateTime QFSFileEngine::fileTime(FileTime time) const
{
Q_D(const QFSFileEngine);
diff --git a/src/corelib/io/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index fe3ceff..3816803 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -945,9 +945,9 @@ QByteArray QIODevice::readAll()
QByteArray tmp;
if (d->isSequential() || size() == 0) {
- // Read it in chunks, bytesAvailable() is unreliable for sequential
- // devices.
- const int chunkSize = 4096;
+ // Read it in chunks. Use bytesAvailable() as an unreliable hint for
+ // sequential devices, but try to read 4K as a minimum.
+ int chunkSize = qMax(qint64(4096), bytesAvailable());
qint64 totalRead = 0;
forever {
tmp.resize(tmp.size() + chunkSize);
@@ -956,6 +956,7 @@ QByteArray QIODevice::readAll()
if (readBytes <= 0)
return tmp;
totalRead += readBytes;
+ chunkSize = qMax(qint64(4096), bytesAvailable());
}
} else {
// Read it all in one go.
diff --git a/src/corelib/io/qprocess_unix.cpp b/src/corelib/io/qprocess_unix.cpp
index 33d4a47..1fedd55 100644
--- a/src/corelib/io/qprocess_unix.cpp
+++ b/src/corelib/io/qprocess_unix.cpp
@@ -140,15 +140,6 @@ static void qt_native_close(int fd)
} while (ret == -1 && errno == EINTR);
}
-static void qt_native_sigaction(int signum, const struct sigaction *act,
- struct sigaction *oldact)
-{
- int ret;
- do {
- ret = ::sigaction(signum, act, oldact);
- } while (ret == -1 && errno == EINTR);
-}
-
static void qt_native_dup2(int oldfd, int newfd)
{
int ret;
@@ -255,7 +246,7 @@ QProcessManager::QProcessManager()
memset(&action, 0, sizeof(action));
action.sa_handler = qt_sa_sigchld_handler;
action.sa_flags = SA_NOCLDSTOP;
- qt_native_sigaction(SIGCHLD, &action, &oldAction);
+ ::sigaction(SIGCHLD, &action, &oldAction);
if (oldAction.sa_handler != qt_sa_sigchld_handler)
qt_sa_old_sigchld_handler = oldAction.sa_handler;
}
@@ -282,9 +273,9 @@ QProcessManager::~QProcessManager()
memset(&action, 0, sizeof(action));
action.sa_handler = qt_sa_old_sigchld_handler;
action.sa_flags = SA_NOCLDSTOP;
- qt_native_sigaction(SIGCHLD, &action, &oldAction);
+ ::sigaction(SIGCHLD, &action, &oldAction);
if (oldAction.sa_handler != qt_sa_sigchld_handler) {
- qt_native_sigaction(SIGCHLD, &oldAction, 0);
+ ::sigaction(SIGCHLD, &oldAction, 0);
}
}
@@ -900,7 +891,7 @@ static void qt_ignore_sigpipe()
struct sigaction noaction;
memset(&noaction, 0, sizeof(noaction));
noaction.sa_handler = SIG_IGN;
- qt_native_sigaction(SIGPIPE, &noaction, 0);
+ ::sigaction(SIGPIPE, &noaction, 0);
}
}
@@ -1270,7 +1261,7 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a
struct sigaction noaction;
memset(&noaction, 0, sizeof(noaction));
noaction.sa_handler = SIG_IGN;
- qt_native_sigaction(SIGPIPE, &noaction, 0);
+ ::sigaction(SIGPIPE, &noaction, 0);
::setsid();
@@ -1316,7 +1307,7 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a
struct sigaction noaction;
memset(&noaction, 0, sizeof(noaction));
noaction.sa_handler = SIG_IGN;
- qt_native_sigaction(SIGPIPE, &noaction, 0);
+ ::sigaction(SIGPIPE, &noaction, 0);
// '\1' means execv failed
char c = '\1';
@@ -1327,7 +1318,7 @@ bool QProcessPrivate::startDetached(const QString &program, const QStringList &a
struct sigaction noaction;
memset(&noaction, 0, sizeof(noaction));
noaction.sa_handler = SIG_IGN;
- qt_native_sigaction(SIGPIPE, &noaction, 0);
+ ::sigaction(SIGPIPE, &noaction, 0);
// '\2' means internal error
char c = '\2';
diff --git a/src/corelib/io/qresource.cpp b/src/corelib/io/qresource.cpp
index a1f921e..1f77caa 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -406,7 +406,7 @@ QString QResource::absoluteFilePath() const
}
/*!
- Returns true if the resource really exists in the resource heirarchy,
+ Returns true if the resource really exists in the resource hierarchy,
false otherwise.
*/
diff --git a/src/corelib/io/qsettings.cpp b/src/corelib/io/qsettings.cpp
index 484e79a..14fc2d4 100644
--- a/src/corelib/io/qsettings.cpp
+++ b/src/corelib/io/qsettings.cpp
@@ -2295,7 +2295,7 @@ void QConfFileSettingsPrivate::ensureSectionParsed(QConfFile *confFile,
As mentioned in the \l{Fallback Mechanism} section, QSettings
stores settings for an application in up to four locations,
depending on whether the settings are user-specific or
- system-wide and whether the the settings are application-specific
+ system-wide and whether the settings are application-specific
or organization-wide. For simplicity, we're assuming the
organization is called MySoft and the application is called Star
Runner.
diff --git a/src/corelib/io/qtemporaryfile.cpp b/src/corelib/io/qtemporaryfile.cpp
index e120f28..45a03e3 100644
--- a/src/corelib/io/qtemporaryfile.cpp
+++ b/src/corelib/io/qtemporaryfile.cpp
@@ -291,14 +291,22 @@ class QTemporaryFileEngine : public QFSFileEngine
{
Q_DECLARE_PRIVATE(QFSFileEngine)
public:
- QTemporaryFileEngine(const QString &file) : QFSFileEngine(file) { }
+ QTemporaryFileEngine(const QString &file, bool fileIsTemplate = true)
+ : QFSFileEngine(file), filePathIsTemplate(fileIsTemplate)
+ {
+ }
+
~QTemporaryFileEngine();
+ bool isReallyOpen();
void setFileName(const QString &file);
bool open(QIODevice::OpenMode flags);
bool remove();
+ bool rename(const QString &newName);
bool close();
+
+ bool filePathIsTemplate;
};
QTemporaryFileEngine::~QTemporaryFileEngine()
@@ -306,6 +314,21 @@ QTemporaryFileEngine::~QTemporaryFileEngine()
QFSFileEngine::close();
}
+bool QTemporaryFileEngine::isReallyOpen()
+{
+ Q_D(QFSFileEngine);
+
+ if (!((0 == d->fh) && (-1 == d->fd)
+#if defined Q_OS_WIN
+ && (INVALID_HANDLE_VALUE == d->fileHandle)
+#endif
+ ))
+ return true;
+
+ return false;
+
+}
+
void QTemporaryFileEngine::setFileName(const QString &file)
{
// Really close the file, so we don't leak
@@ -316,13 +339,16 @@ void QTemporaryFileEngine::setFileName(const QString &file)
bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode)
{
Q_D(QFSFileEngine);
+ Q_ASSERT(!isReallyOpen());
+
+ if (!filePathIsTemplate)
+ return QFSFileEngine::open(openMode);
QString qfilename = d->filePath;
if(!qfilename.contains(QLatin1String("XXXXXX")))
qfilename += QLatin1String(".XXXXXX");
int suffixLength = qfilename.length() - (qfilename.lastIndexOf(QLatin1String("XXXXXX"), -1, Qt::CaseSensitive) + 6);
- d->closeFileHandle = true;
char *filename = qstrdup(qfilename.toLocal8Bit());
#ifndef Q_WS_WIN
@@ -330,16 +356,20 @@ bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode)
if (fd != -1) {
// First open the fd as an external file descriptor to
// initialize the engine properly.
- QFSFileEngine::open(openMode, fd);
+ if (QFSFileEngine::open(openMode, fd)) {
- // Allow the engine to close the handle even if it's "external".
- d->closeFileHandle = true;
+ // Allow the engine to close the handle even if it's "external".
+ d->closeFileHandle = true;
- // Restore the file names (open() resets them).
- d->filePath = QString::fromLocal8Bit(filename); //changed now!
- d->nativeInitFileName();
- delete [] filename;
- return true;
+ // Restore the file names (open() resets them).
+ d->filePath = QString::fromLocal8Bit(filename); //changed now!
+ filePathIsTemplate = false;
+ d->nativeInitFileName();
+ delete [] filename;
+ return true;
+ }
+
+ QT_CLOSE(fd);
}
delete [] filename;
setError(errno == EMFILE ? QFile::ResourceError : QFile::OpenError, qt_error_string(errno));
@@ -351,6 +381,7 @@ bool QTemporaryFileEngine::open(QIODevice::OpenMode openMode)
}
d->filePath = QString::fromLocal8Bit(filename);
+ filePathIsTemplate = false;
d->nativeInitFileName();
d->closeFileHandle = true;
delete [] filename;
@@ -364,9 +395,17 @@ bool QTemporaryFileEngine::remove()
// Since the QTemporaryFileEngine::close() does not really close the file,
// we must explicitly call QFSFileEngine::close() before we remove it.
QFSFileEngine::close();
- bool removed = QFSFileEngine::remove();
- d->filePath.clear();
- return removed;
+ if (QFSFileEngine::remove()) {
+ d->filePath.clear();
+ return true;
+ }
+ return false;
+}
+
+bool QTemporaryFileEngine::rename(const QString &newName)
+{
+ QFSFileEngine::close();
+ return QFSFileEngine::rename(newName);
}
bool QTemporaryFileEngine::close()
@@ -388,17 +427,14 @@ protected:
bool autoRemove;
QString templateName;
- mutable QTemporaryFileEngine *fileEngine;
};
-QTemporaryFilePrivate::QTemporaryFilePrivate() : autoRemove(true), fileEngine(0)
+QTemporaryFilePrivate::QTemporaryFilePrivate() : autoRemove(true)
{
}
QTemporaryFilePrivate::~QTemporaryFilePrivate()
{
- delete fileEngine;
- fileEngine = 0;
}
//************* QTemporaryFile
@@ -430,8 +466,8 @@ QTemporaryFilePrivate::~QTemporaryFilePrivate()
file will exist and be kept open internally by QTemporaryFile.
The file name of the temporary file can be found by calling fileName().
- Note that this is only defined while the file is open; the function returns
- an empty string before the file is opened and after it is closed.
+ Note that this is only defined after the file is first opened; the function
+ returns an empty string before this.
A temporary file will have some static part of the name and some
part that is calculated to be unique. The default filename \c
@@ -605,7 +641,8 @@ void QTemporaryFile::setAutoRemove(bool b)
QString QTemporaryFile::fileName() const
{
- if(!isOpen())
+ Q_D(const QTemporaryFile);
+ if(d->fileName.isEmpty())
return QString();
return fileEngine()->fileName(QAbstractFileEngine::DefaultName);
}
@@ -699,8 +736,12 @@ QTemporaryFile *QTemporaryFile::createLocalFile(QFile &file)
QAbstractFileEngine *QTemporaryFile::fileEngine() const
{
Q_D(const QTemporaryFile);
- if(!d->fileEngine)
- d->fileEngine = new QTemporaryFileEngine(d->templateName);
+ if(!d->fileEngine) {
+ if (d->fileName.isEmpty())
+ d->fileEngine = new QTemporaryFileEngine(d->templateName);
+ else
+ d->fileEngine = new QTemporaryFileEngine(d->fileName, false);
+ }
return d->fileEngine;
}
@@ -715,10 +756,13 @@ bool QTemporaryFile::open(OpenMode flags)
{
Q_D(QTemporaryFile);
if (!d->fileName.isEmpty()) {
- setOpenMode(flags);
- return true;
+ if (static_cast<QTemporaryFileEngine*>(fileEngine())->isReallyOpen()) {
+ setOpenMode(flags);
+ return true;
+ }
}
+ flags |= QIODevice::ReadWrite;
if (QFile::open(flags)) {
d->fileName = d->fileEngine->fileName(QAbstractFileEngine::DefaultName);
return true;
@@ -726,6 +770,8 @@ bool QTemporaryFile::open(OpenMode flags)
return false;
}
+QT_END_NAMESPACE
+
#endif // QT_NO_TEMPORARYFILE
-QT_END_NAMESPACE
+
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp
index 9ce9a2e..d1a5cdd 100644
--- a/src/corelib/io/qurl.cpp
+++ b/src/corelib/io/qurl.cpp
@@ -4759,6 +4759,12 @@ void QUrl::setEncodedQueryItems(const QList<QPair<QByteArray, QByteArray> > &que
Inserts the pair \a key = \a value into the query string of the
URL.
+ The key/value pair is encoded before it is added to the query. The
+ pair is converted into separate strings internally. The \a key and
+ \a value is first encoded into UTF-8 and then delimited by the
+ character returned by valueDelimiter(). Each key/value pair is
+ delimited by the character returned by pairDelimiter().
+
\sa addEncodedQueryItem()
*/
void QUrl::addQueryItem(const QString &key, const QString &value)
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index 12b80f6..7d8a77a 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1728,7 +1728,7 @@ QString QCoreApplication::applicationDirPath()
}
QCoreApplicationPrivate *d = self->d_func();
- if (d->cachedApplicationDirPath == QString())
+ if (d->cachedApplicationDirPath.isNull())
#if defined(Q_OS_SYMBIAN)
{
QString appPath;
@@ -1781,7 +1781,7 @@ QString QCoreApplication::applicationFilePath()
}
QCoreApplicationPrivate *d = self->d_func();
- if (d->cachedApplicationFilePath != QString())
+ if (!d->cachedApplicationFilePath.isNull())
return d->cachedApplicationFilePath;
#if defined( Q_WS_WIN )
diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp
index 3282b7c..d745406 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian.cpp
+++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp
@@ -22,7 +22,7 @@ QT_BEGIN_NAMESPACE
#define WAKE_UP_PRIORITY CActive::EPriorityStandard
#define TIMER_PRIORITY CActive::EPriorityLow
-#define COMPLETE_ZERO_TIMERS_PRIORITY CActive::EPriorityIdle
+#define COMPLETE_DEFERRED_ACTIVE_OBJECTS_PRIORITY CActive::EPriorityIdle
static inline int qt_pipe_write(int socket, const char *data, qint64 len)
{
@@ -82,6 +82,61 @@ private:
QMutex *m_mutex;
};
+/*
+ * This class is designed to aid in implementing event handling in a more round robin fashion. We
+ * cannot change active objects that we do not own, but the active objects that Qt owns will use
+ * this as a base class with convenience functions.
+ *
+ * Here is how it works: On every RunL, the deriving class should call okToRun(). This will allow
+ * exactly one run of the active object, and mark it as such. If it is called again, it will return
+ * false, and add the object to a queue so it can be run later.
+ *
+ * The QCompleteDeferredAOs class is a special object that runs after all others, which will
+ * reactivate the objects that were previously not run.
+ */
+inline QActiveObject::QActiveObject(TInt priority, QEventDispatcherSymbian *dispatcher)
+ : CActive(priority),
+ m_dispatcher(dispatcher),
+ m_hasAlreadyRun(false),
+ m_hasRunAgain(false),
+ m_iterationCount(1)
+{
+}
+
+QActiveObject::~QActiveObject()
+{
+ if (m_hasRunAgain)
+ m_dispatcher->removeDeferredActiveObject(this);
+}
+
+bool QActiveObject::okToRun()
+{
+ Q_ASSERT(!m_hasRunAgain);
+
+ if (!m_hasAlreadyRun || m_dispatcher->iterationCount() != m_iterationCount) {
+ // First occurrence of this event in this iteration.
+ m_hasAlreadyRun = true;
+ m_iterationCount = m_dispatcher->iterationCount();
+ return true;
+ } else {
+ // The event has already occurred.
+ m_dispatcher->addDeferredActiveObject(this);
+ m_hasRunAgain = true;
+ return false;
+ }
+}
+
+void QActiveObject::reactivateAndComplete()
+{
+ iStatus = KRequestPending;
+ SetActive();
+ TRequestStatus *status = &iStatus;
+ QEventDispatcherSymbian::RequestComplete(status, KErrNone);
+
+ m_hasRunAgain = false;
+ m_hasAlreadyRun = false;
+}
+
QWakeUpActiveObject::QWakeUpActiveObject(QEventDispatcherSymbian *dispatcher)
: CActive(WAKE_UP_PRIORITY),
m_dispatcher(dispatcher)
@@ -111,8 +166,8 @@ void QWakeUpActiveObject::RunL()
m_dispatcher->wakeUpWasCalled();
}
-QTimerActiveObject::QTimerActiveObject(SymbianTimerInfo *timerInfo)
- : CActive(TIMER_PRIORITY),
+QTimerActiveObject::QTimerActiveObject(QEventDispatcherSymbian *dispatcher, SymbianTimerInfo *timerInfo)
+ : QActiveObject(TIMER_PRIORITY, dispatcher),
m_timerInfo(timerInfo)
{
}
@@ -137,6 +192,9 @@ void QTimerActiveObject::DoCancel()
void QTimerActiveObject::RunL()
{
+ if (!okToRun())
+ return;
+
if (m_timerInfo->interval > 0) {
// Start a new timer immediately so that we don't lose time.
iStatus = KRequestPending;
@@ -155,7 +213,8 @@ void QTimerActiveObject::RunL()
iStatus = KRequestPending;
SetActive();
- // We complete it after the processEvents is done.
+ TRequestStatus *status = &iStatus;
+ QEventDispatcherSymbian::RequestComplete(status, KErrNone);
}
}
@@ -180,33 +239,29 @@ SymbianTimerInfo::~SymbianTimerInfo()
delete timerAO;
}
-QCompleteZeroTimersActiveObject::QCompleteZeroTimersActiveObject(QEventDispatcherSymbian *dispatcher)
- : CActive(COMPLETE_ZERO_TIMERS_PRIORITY),
+QCompleteDeferredAOs::QCompleteDeferredAOs(QEventDispatcherSymbian *dispatcher)
+ : CActive(COMPLETE_DEFERRED_ACTIVE_OBJECTS_PRIORITY),
m_dispatcher(dispatcher)
{
CActiveScheduler::Add(this);
iStatus = KRequestPending;
SetActive();
- TRequestStatus *status = &iStatus;
- QEventDispatcherSymbian::RequestComplete(status, KErrNone);
}
-QCompleteZeroTimersActiveObject::~QCompleteZeroTimersActiveObject()
+QCompleteDeferredAOs::~QCompleteDeferredAOs()
{
Cancel();
}
-bool QCompleteZeroTimersActiveObject::ref()
+void QCompleteDeferredAOs::complete()
{
- return (++m_refCount != 0);
-}
-
-bool QCompleteZeroTimersActiveObject::deref()
-{
- return (--m_refCount != 0);
+ if (iStatus.Int() & KRequestPending) {
+ TRequestStatus *status = &iStatus;
+ QEventDispatcherSymbian::RequestComplete(status, KErrNone);
+ }
}
-void QCompleteZeroTimersActiveObject::DoCancel()
+void QCompleteDeferredAOs::DoCancel()
{
if (iStatus.Int() & KRequestPending) {
TRequestStatus *status = &iStatus;
@@ -214,14 +269,12 @@ void QCompleteZeroTimersActiveObject::DoCancel()
}
}
-void QCompleteZeroTimersActiveObject::RunL()
+void QCompleteDeferredAOs::RunL()
{
- m_dispatcher->completeZeroTimers();
-
iStatus = KRequestPending;
SetActive();
- TRequestStatus *status = &iStatus;
- QEventDispatcherSymbian::RequestComplete(status, KErrNone);
+
+ m_dispatcher->reactivateDeferredActiveObjects();
}
QSelectThread::QSelectThread()
@@ -299,6 +352,9 @@ void QSelectThread::run()
// ones that return -1 in select
// after loop update notifiers for all of them
+ // as we dont have "exception" notifier type
+ // we should force monitoring fd_set of this
+ // type as well
// clean @ start
FD_ZERO(&readfds);
@@ -311,6 +367,11 @@ void QSelectThread::run()
fd_set onefds;
FD_ZERO(&onefds);
FD_SET(i.key()->socket(), &onefds);
+
+ fd_set excfds;
+ FD_ZERO(&excfds);
+ FD_SET(i.key()->socket(), &excfds);
+
maxfd = i.key()->socket() + 1;
struct timeval timeout;
@@ -320,14 +381,11 @@ void QSelectThread::run()
ret = 0;
if(i.key()->type() == QSocketNotifier::Read) {
- ret = ::select(maxfd, &onefds, 0, 0, &timeout);
+ ret = ::select(maxfd, &onefds, 0, &excfds, &timeout);
if(ret != 0) FD_SET(i.key()->socket(), &readfds);
} else if(i.key()->type() == QSocketNotifier::Write) {
- ret = ::select(maxfd, 0, &onefds, 0, &timeout);
+ ret = ::select(maxfd, 0, &onefds, &excfds, &timeout);
if(ret != 0) FD_SET(i.key()->socket(), &writefds);
- } else { // must be exception fds then
- ret = ::select(maxfd, 0, 0, &onefds, &timeout);
- if(ret != 0) FD_SET(i.key()->socket(), &exceptionfds);
}
} // end for
@@ -461,8 +519,7 @@ void QSelectThread::stop()
}
QSocketActiveObject::QSocketActiveObject(QEventDispatcherSymbian *dispatcher, QSocketNotifier *notifier)
- : CActive(CActive::EPriorityStandard),
- m_dispatcher(dispatcher),
+ : QActiveObject(CActive::EPriorityStandard, dispatcher),
m_notifier(notifier),
m_inSocketEvent(false),
m_deleteLater(false)
@@ -487,6 +544,9 @@ void QSocketActiveObject::DoCancel()
void QSocketActiveObject::RunL()
{
+ if (!okToRun())
+ return;
+
m_dispatcher->socketFired(this);
}
@@ -503,9 +563,10 @@ QEventDispatcherSymbian::QEventDispatcherSymbian(QObject *parent)
: QAbstractEventDispatcher(parent),
m_activeScheduler(0),
m_wakeUpAO(0),
- m_completeZeroTimersAO(0),
+ m_completeDeferredAOs(0),
m_interrupt(false),
m_wakeUpDone(0),
+ m_iterationCount(0),
m_noSocketEvents(false)
{
}
@@ -522,6 +583,7 @@ void QEventDispatcherSymbian::startingUp()
CActiveScheduler::Install(m_activeScheduler);
}
m_wakeUpAO = new(ELeave) QWakeUpActiveObject(this);
+ m_completeDeferredAOs = new(ELeave) QCompleteDeferredAOs(this);
// We already might have posted events, wakeup once to process them
wakeUp();
}
@@ -532,6 +594,7 @@ void QEventDispatcherSymbian::closingDown()
m_selectThread.stop();
}
+ delete m_completeDeferredAOs;
delete m_wakeUpAO;
if (m_activeScheduler) {
delete m_activeScheduler;
@@ -542,6 +605,10 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla
{
Q_D(QAbstractEventDispatcher);
+ // It is safe if this counter overflows. The main importance is that each
+ // iteration count is different from the last.
+ m_iterationCount++;
+
RThread &thread = d->threadData->symbian_thread_handle;
bool block;
@@ -628,9 +695,6 @@ bool QEventDispatcherSymbian::processEvents ( QEventLoop::ProcessEventsFlags fla
timeState = SubsequentRun;
};
- // Complete zero timers so that we get them next time.
- completeZeroTimers();
-
emit awake();
m_noSocketEvents = oldNoSocketEventsValue;
@@ -735,17 +799,28 @@ bool QEventDispatcherSymbian::sendPostedEvents()
//return false;
}
-void QEventDispatcherSymbian::completeZeroTimers()
+inline void QEventDispatcherSymbian::addDeferredActiveObject(QActiveObject *object)
{
- for (QHash<int, SymbianTimerInfoPtr>::iterator i = m_timerList.begin(); i != m_timerList.end(); ++i) {
- if ((*i)->interval == 0 && (*i)->timerAO->iStatus.Int() & KRequestPending) {
- TRequestStatus *status = &(*i)->timerAO->iStatus;
- QEventDispatcherSymbian::RequestComplete(status, KErrNone);
- }
+ if (m_deferredActiveObjects.isEmpty()) {
+ m_completeDeferredAOs->complete();
+ }
+ m_deferredActiveObjects.append(object);
+}
+
+inline void QEventDispatcherSymbian::removeDeferredActiveObject(QActiveObject *object)
+{
+ m_deferredActiveObjects.removeAll(object);
+}
+
+void QEventDispatcherSymbian::reactivateDeferredActiveObjects()
+{
+ while (!m_deferredActiveObjects.isEmpty()) {
+ QActiveObject *object = m_deferredActiveObjects.takeFirst();
+ object->reactivateAndComplete();
}
// We do this because we want to return from processEvents. This is because
- // each invocation of processEvents should only run each zero timer once.
+ // each invocation of processEvents should only run each active object once.
// The active scheduler should run them continously, however.
m_interrupt = true;
}
@@ -808,16 +883,9 @@ void QEventDispatcherSymbian::registerTimer ( int timerId, int interval, QObject
timer->inTimerEvent = false;
timer->receiver = object;
timer->dispatcher = this;
- timer->timerAO = new(ELeave) QTimerActiveObject(timer.data());
+ timer->timerAO = new(ELeave) QTimerActiveObject(this, timer.data());
m_timerList.insert(timerId, timer);
- if (interval == 0) {
- if (!m_completeZeroTimersAO) {
- m_completeZeroTimersAO = new (ELeave) QCompleteZeroTimersActiveObject(this);
- }
- m_completeZeroTimersAO->ref();
- }
-
timer->timerAO->Start();
}
@@ -828,12 +896,6 @@ bool QEventDispatcherSymbian::unregisterTimer ( int timerId )
}
SymbianTimerInfoPtr timerInfo = m_timerList.take(timerId);
- if (timerInfo->interval == 0) {
- if (!m_completeZeroTimersAO->deref()) {
- delete m_completeZeroTimersAO;
- m_completeZeroTimersAO = 0;
- }
- }
return true;
}
diff --git a/src/corelib/kernel/qeventdispatcher_symbian_p.h b/src/corelib/kernel/qeventdispatcher_symbian_p.h
index b5ce868..393749f 100644
--- a/src/corelib/kernel/qeventdispatcher_symbian_p.h
+++ b/src/corelib/kernel/qeventdispatcher_symbian_p.h
@@ -45,6 +45,25 @@ QT_BEGIN_NAMESPACE
class QEventDispatcherSymbian;
class QTimerActiveObject;
+class QActiveObject : public CActive
+{
+public:
+ QActiveObject(TInt priority, QEventDispatcherSymbian *dispatcher);
+ ~QActiveObject();
+
+ bool okToRun();
+
+ void reactivateAndComplete();
+
+protected:
+ QEventDispatcherSymbian *m_dispatcher;
+
+private:
+ bool m_hasAlreadyRun : 1;
+ bool m_hasRunAgain : 1;
+ int m_iterationCount;
+};
+
class QWakeUpActiveObject : public CActive
{
public:
@@ -76,10 +95,10 @@ struct SymbianTimerInfo : public QSharedData
typedef QExplicitlySharedDataPointer<SymbianTimerInfo> SymbianTimerInfoPtr;
// This is a bit of a proxy class. See comments in SetActive and Start for details.
-class QTimerActiveObject : public CActive
+class QTimerActiveObject : public QActiveObject
{
public:
- QTimerActiveObject(SymbianTimerInfo *timerInfo);
+ QTimerActiveObject(QEventDispatcherSymbian *dispatcher, SymbianTimerInfo *timerInfo);
~QTimerActiveObject();
void Start();
@@ -93,25 +112,23 @@ private:
RTimer m_rTimer;
};
-class QCompleteZeroTimersActiveObject : public CActive
+class QCompleteDeferredAOs : public CActive
{
public:
- QCompleteZeroTimersActiveObject(QEventDispatcherSymbian *dispatcher);
- ~QCompleteZeroTimersActiveObject();
+ QCompleteDeferredAOs(QEventDispatcherSymbian *dispatcher);
+ ~QCompleteDeferredAOs();
- bool ref();
- bool deref();
+ void complete();
protected:
void DoCancel();
void RunL();
private:
- int m_refCount;
QEventDispatcherSymbian *m_dispatcher;
};
-class QSocketActiveObject : public CActive
+class QSocketActiveObject : public QActiveObject
{
public:
QSocketActiveObject(QEventDispatcherSymbian *dispatcher, QSocketNotifier *notifier);
@@ -124,7 +141,6 @@ protected:
void RunL();
private:
- QEventDispatcherSymbian *m_dispatcher;
QSocketNotifier *m_notifier;
bool m_inSocketEvent;
bool m_deleteLater;
@@ -187,7 +203,12 @@ public:
void socketFired(QSocketActiveObject *socketAO);
void wakeUpWasCalled();
void reactivateSocketNotifier(QSocketNotifier *notifier);
- void completeZeroTimers();
+
+ void addDeferredActiveObject(QActiveObject *object);
+ void removeDeferredActiveObject(QActiveObject *object);
+ void reactivateDeferredActiveObjects();
+
+ inline int iterationCount() const { return m_iterationCount; }
static void RequestComplete(TRequestStatus *&status, TInt reason);
static void RequestComplete(RThread &threadHandle, TRequestStatus *&status, TInt reason);
@@ -205,20 +226,21 @@ private:
QHash<QSocketNotifier *, QSocketActiveObject *> m_notifiers;
QWakeUpActiveObject *m_wakeUpAO;
- QCompleteZeroTimersActiveObject *m_completeZeroTimersAO;
+ QCompleteDeferredAOs *m_completeDeferredAOs;
volatile bool m_interrupt;
QAtomicInt m_wakeUpDone;
+ unsigned char m_iterationCount;
bool m_noSocketEvents;
QList<QSocketActiveObject *> m_deferredSocketEvents;
+ QList<QActiveObject *> m_deferredActiveObjects;
+
RProcess m_processHandle;
};
-#define DEBUG_REQUEST_COMPLETE
-
-#ifdef DEBUG_REQUEST_COMPLETE
+#ifdef QT_DEBUG
// EActive is defined to 1 and ERequestPending to 2, but they are both private.
// A little dangerous to rely on, but it is only for debugging.
# define REQUEST_STATUS_ACTIVE_AND_PENDING 3
@@ -230,7 +252,7 @@ private:
#endif
// Convenience functions for doing some sanity checking on our own complete code.
-// Unless you define DEBUG_REQUEST_COMPLETE, it is exactly equivalent to the Symbian version.
+// Unless QT_DEBUG is defined, it is exactly equivalent to the Symbian version.
inline void QEventDispatcherSymbian::RequestComplete(TRequestStatus *&status, TInt reason)
{
VERIFY_PENDING_REQUEST_STATUS
diff --git a/src/corelib/kernel/qobject.cpp b/src/corelib/kernel/qobject.cpp
index f5d3f78..6ea2d9f 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -345,18 +345,6 @@ void QObjectPrivate::derefSender(QObject *sender, int signal)
// Q_ASSERT_X(false, "QObjectPrivate::derefSender", "sender not found");
}
-void QObjectPrivate::removeSender(QObject *sender, int signal)
-{
- for (int i = 0; i < senders.count(); ++i) {
- Sender &s = senders[i];
- if (s.sender == sender && s.signal == signal) {
- senders.removeAt(i);
- return;
- }
- }
- // Q_ASSERT_X(false, "QObjectPrivate::removeSender", "sender not found");
-}
-
QObjectPrivate::Sender *QObjectPrivate::setCurrentSender(QObject *receiver,
Sender *sender)
{
@@ -790,7 +778,7 @@ QObject::~QObject()
bool needToUnlock = QOrderedMutexLocker::relock(locker.mutex(), m);
c = &connectionList[i];
if (c->receiver)
- c->receiver->d_func()->removeSender(this, signal);
+ c->receiver->d_func()->derefSender(this, signal);
if (needToUnlock)
m->unlock();
@@ -811,18 +799,22 @@ QObject::~QObject()
}
// disconnect all senders
- for (int i = 0; i < d->senders.count(); ++i) {
+ for (int i = 0; i < d->senders.count(); ) {
QObjectPrivate::Sender *s = &d->senders[i];
- if (!s->sender)
- continue;
QMutex *m = &s->sender->d_func()->threadData->mutex;
bool needToUnlock = QOrderedMutexLocker::relock(locker.mutex(), m);
- s = &d->senders[i];
- if (s->sender)
- s->sender->d_func()->removeReceiver(s->signal, this);
+ if (m < locker.mutex()) {
+ if (i >= d->senders.count() || s != &d->senders[i]) {
+ if (needToUnlock)
+ m->unlock();
+ continue;
+ }
+ }
+ s->sender->d_func()->removeReceiver(s->signal, this);
if (needToUnlock)
m->unlock();
+ ++i;
}
d->senders.clear();
diff --git a/src/corelib/kernel/qobject_p.h b/src/corelib/kernel/qobject_p.h
index b324334..0eed938 100644
--- a/src/corelib/kernel/qobject_p.h
+++ b/src/corelib/kernel/qobject_p.h
@@ -163,7 +163,6 @@ public:
QList<Sender> senders;
void refSender(QObject *sender, int signal);
void derefSender(QObject *sender, int signal);
- void removeSender(QObject *sender, int signal);
static Sender *setCurrentSender(QObject *receiver,
Sender *sender);
diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp
index 2b0e0af..dc9cabf 100644
--- a/src/corelib/kernel/qsharedmemory.cpp
+++ b/src/corelib/kernel/qsharedmemory.cpp
@@ -142,6 +142,10 @@ QSharedMemoryPrivate::makePlatformSafeKey(const QString &key,
detached from the segment, and no references to the segment
remain. Do not mix using QtSharedMemory and QSharedMemory. Port
everything to QSharedMemory.
+
+ \warning QSharedMemory changes the key in a Qt-specific way.
+ It is therefore currently not possible to use the shared memory of
+ non-Qt applications with QSharedMemory.
*/
/*!
diff --git a/src/corelib/kernel/qsharedmemory_unix.cpp b/src/corelib/kernel/qsharedmemory_unix.cpp
index c4395d9..b664093 100644
--- a/src/corelib/kernel/qsharedmemory_unix.cpp
+++ b/src/corelib/kernel/qsharedmemory_unix.cpp
@@ -56,10 +56,10 @@
#include <fcntl.h>
#include <unistd.h>
-QT_BEGIN_NAMESPACE
-
#ifndef QT_NO_SHAREDMEMORY
+QT_BEGIN_NAMESPACE
+
QSharedMemoryPrivate::QSharedMemoryPrivate()
: QObjectPrivate(), memory(0), size(0), error(QSharedMemory::NoError),
#ifndef QT_NO_SYSTEMSEMAPHORE
diff --git a/src/corelib/kernel/qsystemsemaphore_p.h b/src/corelib/kernel/qsystemsemaphore_p.h
index 05a9347..0e6def3 100644
--- a/src/corelib/kernel/qsystemsemaphore_p.h
+++ b/src/corelib/kernel/qsystemsemaphore_p.h
@@ -110,9 +110,9 @@ public:
QSystemSemaphore::SystemSemaphoreError error;
};
-#endif // QT_NO_SYSTEMSEMAPHORE
+QT_END_NAMESPACE
+#endif // QT_NO_SYSTEMSEMAPHORE
-QT_END_NAMESPACE
#endif // QSYSTEMSEMAPHORE_P_H
diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp
index 01e81ab..4b3feb0 100644
--- a/src/corelib/kernel/qtimer.cpp
+++ b/src/corelib/kernel/qtimer.cpp
@@ -77,7 +77,7 @@ QT_BEGIN_NAMESPACE
In multithreaded applications, you can use QTimer in any thread
that has an event loop. To start an event loop from a non-GUI
- thread, use QThread::exec(). Qt uses the the timer's
+ thread, use QThread::exec(). Qt uses the timer's
\l{QObject::thread()}{thread affinity} to determine which thread
will emit the \l{QTimer::}{timeout()} signal. Because of this, you
must start and stop the timer in its thread; it is not possible to
diff --git a/src/corelib/kernel/qtranslator.cpp b/src/corelib/kernel/qtranslator.cpp
index 77d6599..3e4b467 100644
--- a/src/corelib/kernel/qtranslator.cpp
+++ b/src/corelib/kernel/qtranslator.cpp
@@ -819,6 +819,6 @@ bool QTranslator::isEmpty() const
Use translate(\a context, \a sourceText, \a comment) instead.
*/
-#endif // QT_NO_TRANSLATION
-
QT_END_NAMESPACE
+
+#endif // QT_NO_TRANSLATION
diff --git a/src/corelib/kernel/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index 006c635..0d85b93 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -1214,8 +1214,9 @@ const QVariant::Handler *QVariant::handler = &qt_kernel_variant_handler;
and versatile, but may prove less memory and speed efficient than
storing specific types in standard data structures.
- QVariant also supports the notion of null values, where you have
- a defined type with no value set.
+ QVariant also supports the notion of null values, where you can
+ have a defined type with no value set. However, note that QVariant
+ types can only be cast when they have had a value set.
\snippet doc/src/snippets/code/src_corelib_kernel_qvariant.cpp 1
diff --git a/src/corelib/tools/qbytearraymatcher.h b/src/corelib/tools/qbytearraymatcher.h
index 633e92c..970cbcc 100644
--- a/src/corelib/tools/qbytearraymatcher.h
+++ b/src/corelib/tools/qbytearraymatcher.h
@@ -70,7 +70,7 @@ public:
inline QByteArray pattern() const
{
if (q_pattern.isNull())
- return QByteArray((const char*)p.p, p.l);
+ return QByteArray(reinterpret_cast<const char*>(p.p), p.l);
return q_pattern;
}
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 21d98b5..2313e0e 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -379,6 +379,107 @@ void QHashData::checkSanity()
#endif
/*!
+ \fn uint qHash(const QPair<T1, T2> &key)
+ \since 4.3
+ \relates QHash
+
+ Returns the hash value for the \a key.
+
+ Types \c T1 and \c T2 must be supported by qHash().
+*/
+
+/*! \fn uint qHash(char key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(uchar key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(signed char key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(ushort key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(short key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(uint key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(int key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(ulong key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(long key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(quint64 key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(qint64 key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(QChar key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(const QByteArray &key)
+ \fn uint qHash(const QBitArray &key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(const QString &key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*! \fn uint qHash(const T *key)
+ \relates QHash
+
+ Returns the hash value for the \a key.
+*/
+
+/*!
\class QHash
\brief The QHash class is a template class that provides a hash-table-based dictionary.
@@ -401,7 +502,8 @@ void QHashData::checkSanity()
key. With QHash, the items are arbitrarily ordered.
\i The key type of a QMap must provide operator<(). The key
type of a QHash must provide operator==() and a global
- \l{qHash()}{qHash}(Key) function.
+ hash function called qHash() (see the related non-member
+ functions).
\endlist
Here's an example QHash with QString keys and \c int values:
@@ -732,7 +834,6 @@ void QHashData::checkSanity()
*/
/*! \fn const T QHash::value(const Key &key, const T &defaultValue) const
-
\overload
If the hash contains no item with the given \a key, the function returns
@@ -1490,121 +1591,6 @@ void QHashData::checkSanity()
\sa operator+=(), operator-()
*/
-/*! \fn uint qHash(char key)
- \relates QHash
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(uchar key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(signed char key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(ushort key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(short key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(uint key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(int key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(ulong key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(long key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(quint64 key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(qint64 key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(QChar key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(const QByteArray &key)
- \fn uint qHash(const QBitArray &key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(const QString &key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*! \fn uint qHash(const T *key)
- \relates QHash
- \overload
-
- Returns the hash value for the \a key.
-*/
-
-/*!
- \fn uint qHash(const QPair<T1, T2> &key)
- \relates QHash
- \since 4.3
-
- Returns the hash value for the \a key.
-
- Types \c T1 and \c T2 must be supported by qHash().
-*/
-
/*! \fn QDataStream &operator<<(QDataStream &out, const QHash<Key, T>& hash)
\relates QHash
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 3328716..41b4794 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -97,10 +97,7 @@ Q_CORE_EXPORT uint qHash(const QBitArray &key);
#endif
template <class T> inline uint qHash(const T *key)
{
- if (sizeof(const T *) > sizeof(uint))
- return qHash(reinterpret_cast<quint64>(key));
- else
- return uint(reinterpret_cast<ulong>(key));
+ return qHash(reinterpret_cast<quintptr>(key));
}
#if defined(Q_CC_MSVC)
#pragma warning( pop )
diff --git a/src/corelib/tools/qlocale.cpp b/src/corelib/tools/qlocale.cpp
index 4267562..4d042ae 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -78,11 +78,6 @@ QT_END_NAMESPACE
#include <qdebug.h>
#include <time.h>
-#if defined(Q_OS_SYMBIAN)
-#include <e32std.h>
-#include "private/qcore_symbian_p.h"
-#endif
-
#if defined(Q_OS_LINUX) && !defined(__UCLIBC__)
# include <fenv.h>
#endif
@@ -303,7 +298,7 @@ static bool splitLocaleName(const QString &name, QChar *lang_begin, QChar *cntry
return lang_len == 2 || lang_len == 3;
}
-static void getLangAndCountry(const QString &name, QLocale::Language &lang, QLocale::Country &cntry)
+void getLangAndCountry(const QString &name, QLocale::Language &lang, QLocale::Country &cntry)
{
lang = QLocale::C;
cntry = QLocale::AnyCountry;
@@ -1282,794 +1277,8 @@ QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
}
return QVariant();
}
-#elif defined(Q_OS_SYMBIAN)
-
-static TExtendedLocale _s60Locale;
-
-// Type definitions for runtime resolved function pointers
-typedef void (*FormatFunc)(TTime&, TDes&, const TDesC&, const TLocale&);
-typedef TPtrC (*FormatSpecFunc)(TExtendedLocale&);
-
-// Runtime resolved functions
-static FormatFunc ptrTimeFormatL = NULL;
-static FormatSpecFunc ptrGetTimeFormatSpec = NULL;
-static FormatSpecFunc ptrGetLongDateFormatSpec = NULL;
-static FormatSpecFunc ptrGetShortDateFormatSpec = NULL;
-
-// Default functions if functions cannot be resolved
-static void defaultTimeFormatL(TTime&, TDes& des, const TDesC&, const TLocale&)
-{
- des.Zero();
-}
-
-static TPtrC defaultFormatSpec(TExtendedLocale&)
-{
- return TPtrC(KNullDesC);
-}
-
-/*!
- Definition of struct for mapping Symbian to ISO locale
-*/
-struct symbianToISO {
- int symbian_language;
- char iso_name[8];
-};
-
-/*!
- Mapping from Symbian to ISO locale
-*/
-static const symbianToISO symbian_to_iso_list[] = {
- { ELangEnglish, "en_GB" },
- { ELangFrench, "fr_FR" },
- { ELangGerman, "de_DE" },
- { ELangSpanish, "es_ES" },
- { ELangItalian, "it_IT" },
- { ELangSwedish, "sv_SE" },
- { ELangDanish, "da_DK" },
- { ELangNorwegian, "no_NO" },
- { ELangFinnish, "fi_FI" },
- { ELangAmerican, "en_US" },
- { ELangPortuguese, "pt_PT" },
- { ELangTurkish, "tr_TR" },
- { ELangIcelandic, "is_IS" },
- { ELangRussian, "ru_RU" },
- { ELangHungarian, "hu_HU" },
- { ELangDutch, "nl_NL" },
- { ELangBelgianFlemish, "nl_BE" },
- { ELangCzech, "cs_CZ" },
- { ELangSlovak, "sk_SK" },
- { ELangPolish, "pl_PL" },
- { ELangSlovenian, "sl_SI" },
- { ELangTaiwanChinese, "zh_TW" },
- { ELangHongKongChinese, "zh_HK" },
- { ELangPrcChinese, "zh_CN" },
- { ELangJapanese, "ja_JP" },
- { ELangThai, "th_TH" },
- { ELangArabic, "ar_AE" },
- { ELangTagalog, "tl_PH" },
- { ELangBulgarian, "bg_BG" },
- { ELangCatalan, "ca_ES" },
- { ELangCroatian, "hr_HR" },
- { ELangEstonian, "et_EE" },
- { ELangFarsi, "fa_IR" },
- { ELangCanadianFrench, "fr_CA" },
- { ELangGreek, "el_GR" },
- { ELangHebrew, "he_IL" },
- { ELangHindi, "hi_IN" },
- { ELangIndonesian, "id_ID" },
- { ELangLatvian, "lv_LV" },
- { ELangLithuanian, "lt_LT" },
- { ELangMalay, "ms_MY" },
- { ELangBrazilianPortuguese, "pt_BR" },
- { ELangRomanian, "ro_RO" },
- { ELangSerbian, "sr_YU" },
- { ELangLatinAmericanSpanish, "es" },
- { ELangUkrainian, "uk_UA" },
- { ELangUrdu, "ur_PK" }, // India/Pakistan
- { ELangVietnamese, "vi_VN" },
-#ifdef __E32LANG_H__
-// 5.0
- { ELangBasque, "eu_ES" },
- { ELangGalician, "gl_ES" },
-#endif
-#if !defined(__SERIES60_31__)
- { ELangEnglish_Apac, "en" },
- { ELangEnglish_Taiwan, "en_TW" },
- { ELangEnglish_HongKong, "en_HK" },
- { ELangEnglish_Prc, "en_CN" },
- { ELangEnglish_Japan, "en_JP"},
- { ELangEnglish_Thailand, "en_TH" },
- { ELangMalay_Apac, "ms" }
-#endif
-};
-
-/*!
- Returns ISO name corresponding to the Symbian locale code \a sys_fmt.
-*/
-static QByteArray symbianLocaleName(int code)
-{
- //Number of Symbian to ISO locale mappings
- static const int symbian_to_iso_count
- = sizeof(symbian_to_iso_list)/sizeof(symbianToISO);
-
- int cmp = code - symbian_to_iso_list[0].symbian_language;
- if (cmp < 0)
- return 0;
-
- if (cmp == 0)
- return symbian_to_iso_list[0].iso_name;
-
- int begin = 0;
- int end = symbian_to_iso_count;
-
- while (end - begin > 1) {
- uint mid = (begin + end)/2;
-
- const symbianToISO *elt = symbian_to_iso_list + mid;
- int cmp = code - elt->symbian_language;
- if (cmp < 0)
- end = mid;
- else if (cmp > 0)
- begin = mid;
- else
- return elt->iso_name;
- }
-
- return 0;
-}
-
-
-// order is: normal, abbr, nmode, nmode+abbr
-static const char *us_locale_dep[] = {
- "MM", "dd", "yyyy", "MM", "dd",
- "M", "d", "yy", "M", "d",
- "MMMM", "dd", "yyyy", "MMMM", "dd",
- "MMM", "d", "yy", "MMM", "d" };
-
-static const char *eu_locale_dep[] = {
- "dd", "MM", "yyyy", "dd", "MM",
- "d", "M", "yy", "d", "M",
- "dd", "MMMM", "yyyy", "dd", "MMMM",
- "d", "MMM", "yy", "d", "MMM" };
-
-static const char *jp_locale_dep[] = {
- "yyyy", "MM", "dd", "MM", "dd",
- "yy", "M", "d", "M", "d",
- "yyyy", "MMMM", "dd", "MMMM", "dd",
- "yy", "MMM", "d", "MMM", "d" };
-
-/*!
- Returns a Qt version of the given \a sys_fmt Symbian locale format string.
-*/
-static QString s60ToQtFormat(const QString &sys_fmt)
-{
- TLocale *locale = _s60Locale.GetLocale();
-
- QString result;
- QString other;
- QString qtformatchars = QString::fromLatin1("adhmsyzAHM");
-
- QChar c;
- int i = 0;
- bool open_escape = false;
- bool abbrev_next = false;
- bool locale_indep_ordering = false;
- bool minus_mode = false;
- bool plus_mode = false;
- bool n_mode = false;
- TTimeFormat tf = locale->TimeFormat();
-
- while (i < sys_fmt.size()) {
-
- c = sys_fmt.at(i);
-
- // let formatting thru
- if (c.unicode() == '%') {
- // if we have gathered string, concat it
- if (!other.isEmpty()) {
- result += other;
- other.clear();
- }
- // if we have open escape, end it
- if (open_escape) {
- result += QLatin1Char('\'');
- open_escape = false;
- }
-
- ++i;
- if (i >= sys_fmt.size())
- break;
-
- c = sys_fmt.at(i);
-
- // process specials
- abbrev_next = c.unicode() == '*';
- plus_mode = c.unicode() == '+';
- minus_mode = c.unicode() == '-';
-
- if (abbrev_next || plus_mode || minus_mode) {
- ++i;
- if (i >= sys_fmt.size())
- break;
-
- c = sys_fmt.at(i);
-
- if (plus_mode || minus_mode) {
- // break on undefined plus/minus mode
- if (c.unicode() != 'A' && c.unicode() != 'B')
- break;
- }
- }
-
- switch (c.unicode()) {
- case 'F':
- // locale indep mode on
- locale_indep_ordering = true;
- break;
-
- case '/':
- // date sep 0-3
- ++i;
- if (i >= sys_fmt.size())
- break;
-
- c = sys_fmt.at(i);
- if (c.isDigit() && c.digitValue() <= 3) {
- TChar s = locale->DateSeparator(c.digitValue());
- TUint val = s;
- // some indexes return zero for empty
- if (val > 0)
- result += QChar(val);
- }
- break;
-
- case 'D':
- if (!locale_indep_ordering)
- break;
-
- if (!abbrev_next)
- result += QLatin1String("dd");
- else
- result += QLatin1Char('d');
-
- break;
-
- case 'M':
- if (!locale_indep_ordering)
- break;
-
- if (!n_mode) {
- if (!abbrev_next)
- result += QLatin1String("MM");
- else
- result += QLatin1String("M");
- } else {
- if (!abbrev_next)
- result += QLatin1String("MMMM");
- else
- result += QLatin1String("MMM");
- }
-
- break;
-
- case 'N':
- n_mode = true;
-
- if (!locale_indep_ordering)
- break;
-
- if (!abbrev_next)
- result += QLatin1String("MMMM");
- else
- result += QLatin1String("MMM");
-
- break;
-
- case 'Y':
- if (!locale_indep_ordering)
- break;
-
- if (!abbrev_next)
- result += QLatin1String("yyyy");
- else
- result += QLatin1String("yy");
-
- break;
-
- case 'E':
- if (!abbrev_next)
- result += QLatin1String("dddd");
- else
- result += QLatin1String("ddd");
-
- break;
-
- case ':':
- // timesep 0-3
- ++i;
- if (i >= sys_fmt.size())
- break;
-
- c = sys_fmt.at(i);
- if (c.isDigit() && c.digitValue() <= 3) {
- TChar s = locale->TimeSeparator(c.digitValue());
- TUint val = s;
- // some indexes return zero for empty
- if (val > 0)
- result += QChar(val);
- }
-
- break;
-
- case 'J':
- if (tf == ETime24 && !abbrev_next)
- result += QLatin1String("hh");
- else
- result += QLatin1Char('h');
-
- break;
-
- case 'H':
- if (!abbrev_next)
- result += QLatin1String("hh");
- else
- result += QLatin1Char('h');
-
- break;
-
- case 'I':
- result += QLatin1Char('h');
- break;
-
- case 'T':
- if (!abbrev_next)
- result += QLatin1String("mm");
- else
- result += QLatin1Char('m');
-
- break;
-
- case 'S':
- if (!abbrev_next)
- result += QLatin1String("ss");
- else
- result += QLatin1Char('s');
-
- break;
-
- case 'B':
- // only done for 12h clock
- if (tf == ETime24)
- break;
-
- // fallthru to A
- case 'A': {
- // quickie to get capitalization, can't use s60 string as is because Qt 'hh' format's am/pm logic
- TAmPmName ampm = TAmPmName();
- TChar first(ampm[0]);
- QString qtampm = QString::fromLatin1(first.IsUpper() ? "AP" : "ap");
-
- int pos = locale->AmPmSymbolPosition();
-
- if ((minus_mode && pos != ELocaleBefore) ||
- (plus_mode && pos != ELocaleAfter))
- break;
-
- if (!abbrev_next && locale->AmPmSpaceBetween()) {
- if (pos == ELocaleBefore)
- qtampm.append(QLatin1Char(' '));
- else
- qtampm.prepend(QLatin1Char(' '));
- }
-
- result += qtampm;
- }
- break;
-
- case '.': {
- // decimal sep
- TChar s = locale->DecimalSeparator();
- TUint val = s;
- if (val > 0)
- result += QChar(val);
- }
- break;
-
- case 'C':
- // six digits in s60, three digits in qt
- if (!abbrev_next) {
- result += QLatin1String("zzz");
- } else {
- // next char is number from 0-6, how many digits to display
- ++i;
- if (i >= sys_fmt.size())
- break;
-
- c = sys_fmt.at(i);
-
- if (c.isDigit()) {
- // try to match wanted digits
- QChar val(c.digitValue());
-
- if (val >= 3) {
- result += QLatin1String("zzz");
- } else if (val > 0) {
- result += QLatin1Char('z');
- }
- }
- }
- break;
-
- // these cases fallthru
- case '1':
- case '2':
- case '3':
- case '4':
- case '5':
-
- // shouldn't parse these with %F
- if (locale_indep_ordering)
- break;
-
- TDateFormat df = locale->DateFormat();
-
- const char **locale_dep;
- switch (df) {
- default: // fallthru to american
- case EDateAmerican:
- locale_dep = us_locale_dep;
- break;
- case EDateEuropean:
- locale_dep = eu_locale_dep;
- break;
- case EDateJapanese:
- locale_dep = jp_locale_dep;
- break;
- }
- int offset = 0;
- if (abbrev_next)
- offset += 5;
- if (n_mode)
- offset += 10;
-
- result += QLatin1String(locale_dep[offset + (c.digitValue()-1)]);
- break;
-
- case '%': // fallthru percent
- // any junk gets copied as is
- default:
- result += c;
- break;
-
- case 'Z': // Qt doesn't support these :(
- case 'X':
- case 'W':
- break;
- }
- } else {
- // double any single quotes, don't begin escape
- if (c.unicode() == '\'') {
- // end open escape
- if (open_escape) {
- result += other;
- other.clear();
- result += QLatin1Char('\'');
- open_escape = false;
- }
-
- other += c;
- }
-
- // gather chars and escape them in one go if any format chars are found
- if (!open_escape && qtformatchars.indexOf(c) != -1) {
- result += QLatin1Char('\'');
- open_escape = true;
- }
- other += c;
- }
-
- ++i;
- }
-
- if (!other.isEmpty())
- result += other;
- if (open_escape)
- result += QLatin1Char('\'');
-
- return result;
-}
-
-/*!
- Retrieves Symbian locale decimal separator.
-*/
-static QString symbianDecimalPoint()
-{
- TLocale *locale = _s60Locale.GetLocale();
-
- TChar decPoint = locale->DecimalSeparator();
- int val = decPoint;
- return QChar(val);
-}
-
-/*!
- Retrieves Symbian locale group separator.
-*/
-static QString symbianGroupSeparator()
-{
- TLocale *locale = _s60Locale.GetLocale();
-
- TChar grpSep = locale->ThousandsSeparator();
- int val = grpSep;
- return QChar(val);
-}
-
-/*!
- Retrieves Symbian locale zero digit.
-*/
-static QString symbianZeroDigit()
-{
- TLocale *locale = _s60Locale.GetLocale();
-
- // TDigitType enumeration value returned by TLocale
- // will always correspond to zero digit unicode value.
- TDigitType digit = locale->DigitType();
- return QChar(digit);
-}
-
-/*!
- Retrieves a day name from Symbian locale. The \a day is an integer
- from 1 to 7. When \a short_format is true the method returns
- the day in short format. Otherwise it returns the day in a long format.
-*/
-static QString symbianDayName(int day, bool short_format)
-{
- day -= 1;
-
- if (day < 0 || day > 6)
- return QString();
-
- if (short_format) {
- return qt_TDes2QStringL(TDayNameAbb(TDay(day)));
- } else {
- return qt_TDes2QStringL(TDayName(TDay(day)));
- }
-}
-
-/*!
- Retrieves a month name from Symbian locale. The \a month is an integer
- from 1 to 12. When \a short_format is true the method returns
- the month in short format. Otherwise it returns the month in a long format.
-*/
-static QString symbianMonthName(int month, bool short_format)
-{
- month -= 1;
- if (month < 0 || month > 11)
- return QString();
-
- if (short_format) {
- return qt_TDes2QStringL(TMonthNameAbb(TMonth(month)));
- } else {
- return qt_TDes2QStringL(TMonthName(TMonth(month)));
- }
-}
-
-/*!
- Retrieves date format from Symbian locale and
- transforms it to Qt format.
-
- When \a short_format is true the method returns
- short date format. Otherwise it returns the long format.
-*/
-static QString symbianDateFormat(bool short_format)
-{
- TPtrC dateFormat;
-
- if (short_format) {
- dateFormat.Set(ptrGetShortDateFormatSpec(_s60Locale));
- } else {
- dateFormat.Set(ptrGetLongDateFormatSpec(_s60Locale));
- }
-
- return s60ToQtFormat(qt_TDesC2QStringL(dateFormat));
-}
-
-/*!
- Retrieves time format from Symbian locale and
- transforms it to Qt format.
-*/
-static QString symbianTimeFormat()
-{
- return s60ToQtFormat(qt_TDesC2QStringL(ptrGetTimeFormatSpec(_s60Locale)));
-}
-
-/*!
- Returns localized string representation of given \a date
- formatted with Symbian locale date format.
-
- If \a short_format is true the format will be a short version.
- Otherwise it uses a longer version.
-*/
-static QString symbianDateToString(const QDate &date, bool short_format)
-{
- int month = date.month() - 1;
- int day = date.day() - 1;
- int year = date.year();
-
- TDateTime dateTime;
- dateTime.Set(year, TMonth(month), day, 0, 0, 0, 0);
-
- TTime timeStr(dateTime);
- TBuf<KMaxLongDateFormatSpec*2> buffer;
-
- TPtrC dateFormat;
- if (short_format) {
- dateFormat.Set(ptrGetShortDateFormatSpec(_s60Locale));
- } else {
- dateFormat.Set(ptrGetLongDateFormatSpec(_s60Locale));
- }
-
- TRAPD(err, ptrTimeFormatL(timeStr, buffer, dateFormat, *_s60Locale.GetLocale());)
-
- if (err == KErrNone)
- return qt_TDes2QStringL(buffer);
- else
- return QString();
-}
-
-/*!
- Returns localized string representation of given \a time
- formatted with Symbian locale time format.
-*/
-static QString symbianTimeToString(const QTime &time)
-{
- int hour = time.hour();
- int minute = time.minute();
- int second = time.second();
- int milliseconds = 0;
-
- TDateTime dateTime;
- dateTime.Set(0, TMonth(0), 0, hour, minute, second, milliseconds);
-
- TTime timeStr(dateTime);
- TBuf<KMaxTimeFormatSpec*2> buffer;
-
- TRAPD(err, ptrTimeFormatL(
- timeStr,
- buffer,
- ptrGetTimeFormatSpec(_s60Locale),
- *_s60Locale.GetLocale());
- )
-
- if (err == KErrNone)
- return qt_TDes2QStringL(buffer);
- else
- return QString();
-}
-
-/*!
- Returns the measurement system stored in Symbian locale
-
- \sa QLocale::MeasurementSystem
-*/
-static QLocale::MeasurementSystem symbianMeasurementSystem()
-{
- TLocale *locale = _s60Locale.GetLocale();
-
- TUnitsFormat unitFormat = locale->UnitsGeneral();
- if (unitFormat == EUnitsImperial)
- return QLocale::ImperialSystem;
- else
- return QLocale::MetricSystem;
-}
-
-QLocale QSystemLocale::fallbackLocale() const
-{
- // load system data before query calls
- static bool initDone = false;
- if (!initDone) {
- _s60Locale.LoadSystemSettings();
-
- // Initialize platform version dependent function pointers
- ptrTimeFormatL = reinterpret_cast<FormatFunc>
- (qt_resolveS60PluginFunc(S60Plugin_TimeFormatL));
- ptrGetTimeFormatSpec = reinterpret_cast<FormatSpecFunc>
- (qt_resolveS60PluginFunc(S60Plugin_GetTimeFormatSpec));
- ptrGetLongDateFormatSpec = reinterpret_cast<FormatSpecFunc>
- (qt_resolveS60PluginFunc(S60Plugin_GetLongDateFormatSpec));
- ptrGetShortDateFormatSpec = reinterpret_cast<FormatSpecFunc>
- (qt_resolveS60PluginFunc(S60Plugin_GetShortDateFormatSpec));
- if (!ptrTimeFormatL)
- ptrTimeFormatL = &defaultTimeFormatL;
- if (!ptrGetTimeFormatSpec)
- ptrGetTimeFormatSpec = &defaultFormatSpec;
- if (!ptrGetLongDateFormatSpec)
- ptrGetLongDateFormatSpec = &defaultFormatSpec;
- if (!ptrGetShortDateFormatSpec)
- ptrGetShortDateFormatSpec = &defaultFormatSpec;
- }
-
- TLanguage lang = User::Language();
- QString locale = symbianLocaleName(lang);
- return QLocale(locale);
-}
-
-/*!
- Generic query method for locale data. Provides indirection.
- Denotes the \a type of the query
- with \a in as input data depending on the query.
-
- \sa QSystemLocale::QueryType
-*/
-QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
-{
- switch(type) {
- case DecimalPoint:
- return symbianDecimalPoint();
- case GroupSeparator:
- return symbianGroupSeparator();
-
- case ZeroDigit:
- return symbianZeroDigit();
-
- case DayNameLong:
- case DayNameShort:
- return symbianDayName(in.toInt(), (type == DayNameShort) );
-
- case MonthNameLong:
- case MonthNameShort:
- return symbianMonthName(in.toInt(), (type == MonthNameShort) );
-
- case DateFormatLong:
- case DateFormatShort:
- return symbianDateFormat( (type == DateFormatShort) );
- case TimeFormatLong:
- case TimeFormatShort:
- return symbianTimeFormat();
- case DateTimeFormatLong:
- case DateTimeFormatShort:
- return symbianDateFormat( (type == DateTimeFormatShort) ) + QLatin1Char(' ') + symbianTimeFormat();
- case DateToStringShort:
- case DateToStringLong:
- return symbianDateToString(in.toDate(), (type == DateToStringShort) );
- case TimeToStringShort:
- case TimeToStringLong:
- return symbianTimeToString(in.toTime());
- case DateTimeToStringShort:
- case DateTimeToStringLong: {
- const QDateTime dt = in.toDateTime();
- return symbianDateToString(dt.date(), (type == DateTimeToStringShort) )
- + QLatin1Char(' ') + symbianTimeToString(dt.time());
- }
- case MeasurementSystem:
- return static_cast<int>(symbianMeasurementSystem());
- case LanguageId:
- case CountryId: {
- TLanguage language = User::Language();
- QString locale = symbianLocaleName(language);
- QLocale::Language lang;
- QLocale::Country cntry;
- getLangAndCountry(locale, lang, cntry);
- if (type == LanguageId)
- return lang;
- // few iso codes have no country and will use this
- if (cntry == QLocale::AnyCountry)
- return fallbackLocale().country();
-
- return cntry;
- }
- case NegativeSign:
- case PositiveSign:
- case AMText:
- case PMText:
- break;
- default:
- break;
- }
- return QVariant();
-}
-
-#elif defined(Q_OS_UNIX)
+#elif defined(Q_OS_UNIX) && !defined(Q_OS_SYMBIAN)
static uint unixGetSystemMeasurementSystem()
{
@@ -2113,7 +1322,7 @@ QVariant QSystemLocale::query(QueryType type, QVariant /* in */) const
}
}
-#else
+#elif !defined(Q_OS_SYMBIAN)
/*!
Returns a fallback locale, that will get used for everything that
@@ -2387,7 +1596,7 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l)
defaults to the default locale (see setDefault()).
\endlist
- The "C" locale is identical to \l{English}/\l{UnitedStates}.
+ The "C" locale is identical in behavior to \l{English}/\l{UnitedStates}.
Use language() and country() to determine the actual language and
country values used.
@@ -2430,7 +1639,7 @@ QDataStream &operator>>(QDataStream &ds, QLocale &l)
This enumerated type is used to specify a language.
- \value C The "C" locale is English/UnitedStates.
+ \value C The "C" locale is identical in behavior to English/UnitedStates.
\value Abkhazian
\value Afan
\value Afar
diff --git a/src/corelib/tools/qlocale_symbian.cpp b/src/corelib/tools/qlocale_symbian.cpp
new file mode 100644
index 0000000..b58a5d5
--- /dev/null
+++ b/src/corelib/tools/qlocale_symbian.cpp
@@ -0,0 +1,840 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtCore module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QDate>
+#include <QLocale>
+#include <QTime>
+#include <QVariant>
+
+#include <e32std.h>
+#include "private/qcore_symbian_p.h"
+
+// Located in qlocale.cpp
+extern void getLangAndCountry(const QString &name, QLocale::Language &lang, QLocale::Country &cntry);
+
+QT_BEGIN_NAMESPACE
+
+static TExtendedLocale _s60Locale;
+
+// Type definitions for runtime resolved function pointers
+typedef void (*FormatFunc)(TTime&, TDes&, const TDesC&, const TLocale&);
+typedef TPtrC (*FormatSpecFunc)(TExtendedLocale&);
+
+// Runtime resolved functions
+static FormatFunc ptrTimeFormatL = NULL;
+static FormatSpecFunc ptrGetTimeFormatSpec = NULL;
+static FormatSpecFunc ptrGetLongDateFormatSpec = NULL;
+static FormatSpecFunc ptrGetShortDateFormatSpec = NULL;
+
+// Default functions if functions cannot be resolved
+static void defaultTimeFormatL(TTime&, TDes& des, const TDesC&, const TLocale&)
+{
+ des.Zero();
+}
+
+static TPtrC defaultFormatSpec(TExtendedLocale&)
+{
+ return TPtrC(KNullDesC);
+}
+
+/*!
+ Definition of struct for mapping Symbian to ISO locale
+*/
+struct symbianToISO {
+ int symbian_language;
+ char iso_name[8];
+};
+
+
+/*!
+ Mapping from Symbian to ISO locale
+*/
+static const symbianToISO symbian_to_iso_list[] = {
+ { ELangEnglish, "en_GB" },
+ { ELangFrench, "fr_FR" },
+ { ELangGerman, "de_DE" },
+ { ELangSpanish, "es_ES" },
+ { ELangItalian, "it_IT" },
+ { ELangSwedish, "sv_SE" },
+ { ELangDanish, "da_DK" },
+ { ELangNorwegian, "no_NO" },
+ { ELangFinnish, "fi_FI" },
+ { ELangAmerican, "en_US" },
+ { ELangPortuguese, "pt_PT" },
+ { ELangTurkish, "tr_TR" },
+ { ELangIcelandic, "is_IS" },
+ { ELangRussian, "ru_RU" },
+ { ELangHungarian, "hu_HU" },
+ { ELangDutch, "nl_NL" },
+ { ELangBelgianFlemish, "nl_BE" },
+ { ELangCzech, "cs_CZ" },
+ { ELangSlovak, "sk_SK" },
+ { ELangPolish, "pl_PL" },
+ { ELangSlovenian, "sl_SI" },
+ { ELangTaiwanChinese, "zh_TW" },
+ { ELangHongKongChinese, "zh_HK" },
+ { ELangPrcChinese, "zh_CN" },
+ { ELangJapanese, "ja_JP" },
+ { ELangThai, "th_TH" },
+ { ELangArabic, "ar_AE" },
+ { ELangTagalog, "tl_PH" },
+ { ELangBulgarian, "bg_BG" },
+ { ELangCatalan, "ca_ES" },
+ { ELangCroatian, "hr_HR" },
+ { ELangEstonian, "et_EE" },
+ { ELangFarsi, "fa_IR" },
+ { ELangCanadianFrench, "fr_CA" },
+ { ELangGreek, "el_GR" },
+ { ELangHebrew, "he_IL" },
+ { ELangHindi, "hi_IN" },
+ { ELangIndonesian, "id_ID" },
+ { ELangLatvian, "lv_LV" },
+ { ELangLithuanian, "lt_LT" },
+ { ELangMalay, "ms_MY" },
+ { ELangBrazilianPortuguese, "pt_BR" },
+ { ELangRomanian, "ro_RO" },
+ { ELangSerbian, "sr_YU" },
+ { ELangLatinAmericanSpanish, "es" },
+ { ELangUkrainian, "uk_UA" },
+ { ELangUrdu, "ur_PK" }, // India/Pakistan
+ { ELangVietnamese, "vi_VN" },
+#ifdef __E32LANG_H__
+// 5.0
+ { ELangBasque, "eu_ES" },
+ { ELangGalician, "gl_ES" },
+#endif
+#if !defined(__SERIES60_31__)
+ { ELangEnglish_Apac, "en" },
+ { ELangEnglish_Taiwan, "en_TW" },
+ { ELangEnglish_HongKong, "en_HK" },
+ { ELangEnglish_Prc, "en_CN" },
+ { ELangEnglish_Japan, "en_JP"},
+ { ELangEnglish_Thailand, "en_TH" },
+ { ELangMalay_Apac, "ms" }
+#endif
+};
+
+/*!
+ Returns ISO name corresponding to the Symbian locale code \a sys_fmt.
+*/
+static QByteArray symbianLocaleName(int code)
+{
+ //Number of Symbian to ISO locale mappings
+ static const int symbian_to_iso_count
+ = sizeof(symbian_to_iso_list)/sizeof(symbianToISO);
+
+ int cmp = code - symbian_to_iso_list[0].symbian_language;
+ if (cmp < 0)
+ return 0;
+
+ if (cmp == 0)
+ return symbian_to_iso_list[0].iso_name;
+
+ int begin = 0;
+ int end = symbian_to_iso_count;
+
+ while (end - begin > 1) {
+ uint mid = (begin + end)/2;
+
+ const symbianToISO *elt = symbian_to_iso_list + mid;
+ int cmp = code - elt->symbian_language;
+ if (cmp < 0)
+ end = mid;
+ else if (cmp > 0)
+ begin = mid;
+ else
+ return elt->iso_name;
+ }
+
+ return 0;
+}
+
+
+// order is: normal, abbr, nmode, nmode+abbr
+static const char *us_locale_dep[] = {
+ "MM", "dd", "yyyy", "MM", "dd",
+ "M", "d", "yy", "M", "d",
+ "MMMM", "dd", "yyyy", "MMMM", "dd",
+ "MMM", "d", "yy", "MMM", "d" };
+
+static const char *eu_locale_dep[] = {
+ "dd", "MM", "yyyy", "dd", "MM",
+ "d", "M", "yy", "d", "M",
+ "dd", "MMMM", "yyyy", "dd", "MMMM",
+ "d", "MMM", "yy", "d", "MMM" };
+
+static const char *jp_locale_dep[] = {
+ "yyyy", "MM", "dd", "MM", "dd",
+ "yy", "M", "d", "M", "d",
+ "yyyy", "MMMM", "dd", "MMMM", "dd",
+ "yy", "MMM", "d", "MMM", "d" };
+
+/*!
+ Returns a Qt version of the given \a sys_fmt Symbian locale format string.
+*/
+static QString s60ToQtFormat(const QString &sys_fmt)
+{
+ TLocale *locale = _s60Locale.GetLocale();
+
+ QString result;
+ QString other;
+ QString qtformatchars = QString::fromLatin1("adhmsyzAHM");
+
+ QChar c;
+ int i = 0;
+ bool open_escape = false;
+ bool abbrev_next = false;
+ bool locale_indep_ordering = false;
+ bool minus_mode = false;
+ bool plus_mode = false;
+ bool n_mode = false;
+ TTimeFormat tf = locale->TimeFormat();
+
+ while (i < sys_fmt.size()) {
+
+ c = sys_fmt.at(i);
+
+ // let formatting thru
+ if (c.unicode() == '%') {
+ // if we have gathered string, concat it
+ if (!other.isEmpty()) {
+ result += other;
+ other.clear();
+ }
+ // if we have open escape, end it
+ if (open_escape) {
+ result += QLatin1Char('\'');
+ open_escape = false;
+ }
+
+ ++i;
+ if (i >= sys_fmt.size())
+ break;
+
+ c = sys_fmt.at(i);
+
+ // process specials
+ abbrev_next = c.unicode() == '*';
+ plus_mode = c.unicode() == '+';
+ minus_mode = c.unicode() == '-';
+
+ if (abbrev_next || plus_mode || minus_mode) {
+ ++i;
+ if (i >= sys_fmt.size())
+ break;
+
+ c = sys_fmt.at(i);
+
+ if (plus_mode || minus_mode) {
+ // break on undefined plus/minus mode
+ if (c.unicode() != 'A' && c.unicode() != 'B')
+ break;
+ }
+ }
+
+ switch (c.unicode()) {
+ case 'F':
+ // locale indep mode on
+ locale_indep_ordering = true;
+ break;
+
+ case '/':
+ // date sep 0-3
+ ++i;
+ if (i >= sys_fmt.size())
+ break;
+
+ c = sys_fmt.at(i);
+ if (c.isDigit() && c.digitValue() <= 3) {
+ TChar s = locale->DateSeparator(c.digitValue());
+ TUint val = s;
+ // some indexes return zero for empty
+ if (val > 0)
+ result += QChar(val);
+ }
+ break;
+
+ case 'D':
+ if (!locale_indep_ordering)
+ break;
+
+ if (!abbrev_next)
+ result += QLatin1String("dd");
+ else
+ result += QLatin1Char('d');
+
+ break;
+
+ case 'M':
+ if (!locale_indep_ordering)
+ break;
+
+ if (!n_mode) {
+ if (!abbrev_next)
+ result += QLatin1String("MM");
+ else
+ result += QLatin1String("M");
+ } else {
+ if (!abbrev_next)
+ result += QLatin1String("MMMM");
+ else
+ result += QLatin1String("MMM");
+ }
+
+ break;
+
+ case 'N':
+ n_mode = true;
+
+ if (!locale_indep_ordering)
+ break;
+
+ if (!abbrev_next)
+ result += QLatin1String("MMMM");
+ else
+ result += QLatin1String("MMM");
+
+ break;
+
+ case 'Y':
+ if (!locale_indep_ordering)
+ break;
+
+ if (!abbrev_next)
+ result += QLatin1String("yyyy");
+ else
+ result += QLatin1String("yy");
+
+ break;
+
+ case 'E':
+ if (!abbrev_next)
+ result += QLatin1String("dddd");
+ else
+ result += QLatin1String("ddd");
+
+ break;
+
+ case ':':
+ // timesep 0-3
+ ++i;
+ if (i >= sys_fmt.size())
+ break;
+
+ c = sys_fmt.at(i);
+ if (c.isDigit() && c.digitValue() <= 3) {
+ TChar s = locale->TimeSeparator(c.digitValue());
+ TUint val = s;
+ // some indexes return zero for empty
+ if (val > 0)
+ result += QChar(val);
+ }
+
+ break;
+
+ case 'J':
+ if (tf == ETime24 && !abbrev_next)
+ result += QLatin1String("hh");
+ else
+ result += QLatin1Char('h');
+
+ break;
+
+ case 'H':
+ if (!abbrev_next)
+ result += QLatin1String("hh");
+ else
+ result += QLatin1Char('h');
+
+ break;
+
+ case 'I':
+ result += QLatin1Char('h');
+ break;
+
+ case 'T':
+ if (!abbrev_next)
+ result += QLatin1String("mm");
+ else
+ result += QLatin1Char('m');
+
+ break;
+
+ case 'S':
+ if (!abbrev_next)
+ result += QLatin1String("ss");
+ else
+ result += QLatin1Char('s');
+
+ break;
+
+ case 'B':
+ // only done for 12h clock
+ if (tf == ETime24)
+ break;
+
+ // fallthru to A
+ case 'A': {
+ // quickie to get capitalization, can't use s60 string as is because Qt 'hh' format's am/pm logic
+ TAmPmName ampm = TAmPmName();
+ TChar first(ampm[0]);
+ QString qtampm = QString::fromLatin1(first.IsUpper() ? "AP" : "ap");
+
+ int pos = locale->AmPmSymbolPosition();
+
+ if ((minus_mode && pos != ELocaleBefore) ||
+ (plus_mode && pos != ELocaleAfter))
+ break;
+
+ if (!abbrev_next && locale->AmPmSpaceBetween()) {
+ if (pos == ELocaleBefore)
+ qtampm.append(QLatin1Char(' '));
+ else
+ qtampm.prepend(QLatin1Char(' '));
+ }
+
+ result += qtampm;
+ }
+ break;
+
+ case '.': {
+ // decimal sep
+ TChar s = locale->DecimalSeparator();
+ TUint val = s;
+ if (val > 0)
+ result += QChar(val);
+ }
+ break;
+
+ case 'C':
+ // six digits in s60, three digits in qt
+ if (!abbrev_next) {
+ result += QLatin1String("zzz");
+ } else {
+ // next char is number from 0-6, how many digits to display
+ ++i;
+ if (i >= sys_fmt.size())
+ break;
+
+ c = sys_fmt.at(i);
+
+ if (c.isDigit()) {
+ // try to match wanted digits
+ QChar val(c.digitValue());
+
+ if (val >= 3) {
+ result += QLatin1String("zzz");
+ } else if (val > 0) {
+ result += QLatin1Char('z');
+ }
+ }
+ }
+ break;
+
+ // these cases fallthru
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+
+ // shouldn't parse these with %F
+ if (locale_indep_ordering)
+ break;
+
+ TDateFormat df = locale->DateFormat();
+
+ const char **locale_dep;
+ switch (df) {
+ default: // fallthru to american
+ case EDateAmerican:
+ locale_dep = us_locale_dep;
+ break;
+ case EDateEuropean:
+ locale_dep = eu_locale_dep;
+ break;
+ case EDateJapanese:
+ locale_dep = jp_locale_dep;
+ break;
+ }
+ int offset = 0;
+ if (abbrev_next)
+ offset += 5;
+ if (n_mode)
+ offset += 10;
+
+ result += QLatin1String(locale_dep[offset + (c.digitValue()-1)]);
+ break;
+
+ case '%': // fallthru percent
+ // any junk gets copied as is
+ default:
+ result += c;
+ break;
+
+ case 'Z': // Qt doesn't support these :(
+ case 'X':
+ case 'W':
+ break;
+ }
+ } else {
+ // double any single quotes, don't begin escape
+ if (c.unicode() == '\'') {
+ // end open escape
+ if (open_escape) {
+ result += other;
+ other.clear();
+ result += QLatin1Char('\'');
+ open_escape = false;
+ }
+
+ other += c;
+ }
+
+ // gather chars and escape them in one go if any format chars are found
+ if (!open_escape && qtformatchars.indexOf(c) != -1) {
+ result += QLatin1Char('\'');
+ open_escape = true;
+ }
+ other += c;
+ }
+
+ ++i;
+ }
+
+ if (!other.isEmpty())
+ result += other;
+ if (open_escape)
+ result += QLatin1Char('\'');
+
+ return result;
+}
+
+/*!
+ Retrieves Symbian locale decimal separator.
+*/
+static QString symbianDecimalPoint()
+{
+ TLocale *locale = _s60Locale.GetLocale();
+
+ TChar decPoint = locale->DecimalSeparator();
+ int val = decPoint;
+ return QChar(val);
+}
+
+/*!
+ Retrieves Symbian locale group separator.
+*/
+static QString symbianGroupSeparator()
+{
+ TLocale *locale = _s60Locale.GetLocale();
+
+ TChar grpSep = locale->ThousandsSeparator();
+ int val = grpSep;
+ return QChar(val);
+}
+
+/*!
+ Retrieves Symbian locale zero digit.
+*/
+static QString symbianZeroDigit()
+{
+ TLocale *locale = _s60Locale.GetLocale();
+
+ // TDigitType enumeration value returned by TLocale
+ // will always correspond to zero digit unicode value.
+ TDigitType digit = locale->DigitType();
+ return QChar(digit);
+}
+
+/*!
+ Retrieves a day name from Symbian locale. The \a day is an integer
+ from 1 to 7. When \a short_format is true the method returns
+ the day in short format. Otherwise it returns the day in a long format.
+*/
+static QString symbianDayName(int day, bool short_format)
+{
+ day -= 1;
+
+ if (day < 0 || day > 6)
+ return QString();
+
+ if (short_format) {
+ return qt_TDes2QStringL(TDayNameAbb(TDay(day)));
+ } else {
+ return qt_TDes2QStringL(TDayName(TDay(day)));
+ }
+}
+
+/*!
+ Retrieves a month name from Symbian locale. The \a month is an integer
+ from 1 to 12. When \a short_format is true the method returns
+ the month in short format. Otherwise it returns the month in a long format.
+*/
+static QString symbianMonthName(int month, bool short_format)
+{
+ month -= 1;
+ if (month < 0 || month > 11)
+ return QString();
+
+ if (short_format) {
+ return qt_TDes2QStringL(TMonthNameAbb(TMonth(month)));
+ } else {
+ return qt_TDes2QStringL(TMonthName(TMonth(month)));
+ }
+}
+
+/*!
+ Retrieves date format from Symbian locale and
+ transforms it to Qt format.
+
+ When \a short_format is true the method returns
+ short date format. Otherwise it returns the long format.
+*/
+static QString symbianDateFormat(bool short_format)
+{
+ TPtrC dateFormat;
+
+ if (short_format) {
+ dateFormat.Set(ptrGetShortDateFormatSpec(_s60Locale));
+ } else {
+ dateFormat.Set(ptrGetLongDateFormatSpec(_s60Locale));
+ }
+
+ return s60ToQtFormat(qt_TDesC2QStringL(dateFormat));
+}
+
+/*!
+ Retrieves time format from Symbian locale and
+ transforms it to Qt format.
+*/
+static QString symbianTimeFormat()
+{
+ return s60ToQtFormat(qt_TDesC2QStringL(ptrGetTimeFormatSpec(_s60Locale)));
+}
+
+/*!
+ Returns localized string representation of given \a date
+ formatted with Symbian locale date format.
+
+ If \a short_format is true the format will be a short version.
+ Otherwise it uses a longer version.
+*/
+static QString symbianDateToString(const QDate &date, bool short_format)
+{
+ int month = date.month() - 1;
+ int day = date.day() - 1;
+ int year = date.year();
+
+ TDateTime dateTime;
+ dateTime.Set(year, TMonth(month), day, 0, 0, 0, 0);
+
+ TTime timeStr(dateTime);
+ TBuf<KMaxLongDateFormatSpec*2> buffer;
+
+ TPtrC dateFormat;
+ if (short_format) {
+ dateFormat.Set(ptrGetShortDateFormatSpec(_s60Locale));
+ } else {
+ dateFormat.Set(ptrGetLongDateFormatSpec(_s60Locale));
+ }
+
+ TRAPD(err, ptrTimeFormatL(timeStr, buffer, dateFormat, *_s60Locale.GetLocale());)
+
+ if (err == KErrNone)
+ return qt_TDes2QStringL(buffer);
+ else
+ return QString();
+}
+
+/*!
+ Returns localized string representation of given \a time
+ formatted with Symbian locale time format.
+*/
+static QString symbianTimeToString(const QTime &time)
+{
+ int hour = time.hour();
+ int minute = time.minute();
+ int second = time.second();
+ int milliseconds = 0;
+
+ TDateTime dateTime;
+ dateTime.Set(0, TMonth(0), 0, hour, minute, second, milliseconds);
+
+ TTime timeStr(dateTime);
+ TBuf<KMaxTimeFormatSpec*2> buffer;
+
+ TRAPD(err, ptrTimeFormatL(
+ timeStr,
+ buffer,
+ ptrGetTimeFormatSpec(_s60Locale),
+ *_s60Locale.GetLocale());
+ )
+
+ if (err == KErrNone)
+ return qt_TDes2QStringL(buffer);
+ else
+ return QString();
+}
+
+/*!
+ Returns the measurement system stored in Symbian locale
+
+ \sa QLocale::MeasurementSystem
+*/
+static QLocale::MeasurementSystem symbianMeasurementSystem()
+{
+ TLocale *locale = _s60Locale.GetLocale();
+
+ TUnitsFormat unitFormat = locale->UnitsGeneral();
+ if (unitFormat == EUnitsImperial)
+ return QLocale::ImperialSystem;
+ else
+ return QLocale::MetricSystem;
+}
+
+QLocale QSystemLocale::fallbackLocale() const
+{
+ // load system data before query calls
+ static bool initDone = false;
+ if (!initDone) {
+ _s60Locale.LoadSystemSettings();
+
+ // Initialize platform version dependent function pointers
+ ptrTimeFormatL = reinterpret_cast<FormatFunc>
+ (qt_resolveS60PluginFunc(S60Plugin_TimeFormatL));
+ ptrGetTimeFormatSpec = reinterpret_cast<FormatSpecFunc>
+ (qt_resolveS60PluginFunc(S60Plugin_GetTimeFormatSpec));
+ ptrGetLongDateFormatSpec = reinterpret_cast<FormatSpecFunc>
+ (qt_resolveS60PluginFunc(S60Plugin_GetLongDateFormatSpec));
+ ptrGetShortDateFormatSpec = reinterpret_cast<FormatSpecFunc>
+ (qt_resolveS60PluginFunc(S60Plugin_GetShortDateFormatSpec));
+ if (!ptrTimeFormatL)
+ ptrTimeFormatL = &defaultTimeFormatL;
+ if (!ptrGetTimeFormatSpec)
+ ptrGetTimeFormatSpec = &defaultFormatSpec;
+ if (!ptrGetLongDateFormatSpec)
+ ptrGetLongDateFormatSpec = &defaultFormatSpec;
+ if (!ptrGetShortDateFormatSpec)
+ ptrGetShortDateFormatSpec = &defaultFormatSpec;
+ }
+
+ TLanguage lang = User::Language();
+ QString locale = symbianLocaleName(lang);
+ return QLocale(locale);
+}
+
+/*!
+ Generic query method for locale data. Provides indirection.
+ Denotes the \a type of the query
+ with \a in as input data depending on the query.
+
+ \sa QSystemLocale::QueryType
+*/
+QVariant QSystemLocale::query(QueryType type, QVariant in = QVariant()) const
+{
+ switch(type) {
+ case DecimalPoint:
+ return symbianDecimalPoint();
+ case GroupSeparator:
+ return symbianGroupSeparator();
+
+ case ZeroDigit:
+ return symbianZeroDigit();
+
+ case DayNameLong:
+ case DayNameShort:
+ return symbianDayName(in.toInt(), (type == DayNameShort) );
+
+ case MonthNameLong:
+ case MonthNameShort:
+ return symbianMonthName(in.toInt(), (type == MonthNameShort) );
+
+ case DateFormatLong:
+ case DateFormatShort:
+ return symbianDateFormat( (type == DateFormatShort) );
+ case TimeFormatLong:
+ case TimeFormatShort:
+ return symbianTimeFormat();
+ case DateTimeFormatLong:
+ case DateTimeFormatShort:
+ return symbianDateFormat( (type == DateTimeFormatShort) ) + QLatin1Char(' ') + symbianTimeFormat();
+ case DateToStringShort:
+ case DateToStringLong:
+ return symbianDateToString(in.toDate(), (type == DateToStringShort) );
+ case TimeToStringShort:
+ case TimeToStringLong:
+ return symbianTimeToString(in.toTime());
+ case DateTimeToStringShort:
+ case DateTimeToStringLong: {
+ const QDateTime dt = in.toDateTime();
+ return symbianDateToString(dt.date(), (type == DateTimeToStringShort) )
+ + QLatin1Char(' ') + symbianTimeToString(dt.time());
+ }
+ case MeasurementSystem:
+ return static_cast<int>(symbianMeasurementSystem());
+ case LanguageId:
+ case CountryId: {
+ TLanguage language = User::Language();
+ QString locale = symbianLocaleName(language);
+ QLocale::Language lang;
+ QLocale::Country cntry;
+ getLangAndCountry(locale, lang, cntry);
+ if (type == LanguageId)
+ return lang;
+ // few iso codes have no country and will use this
+ if (cntry == QLocale::AnyCountry)
+ return fallbackLocale().country();
+
+ return cntry;
+ }
+ case NegativeSign:
+ case PositiveSign:
+ case AMText:
+ case PMText:
+ break;
+ default:
+ break;
+ }
+ return QVariant();
+}
+
+QT_END_NAMESPACE
diff --git a/src/corelib/tools/qrect.cpp b/src/corelib/tools/qrect.cpp
index 3930a0d..5602170 100644
--- a/src/corelib/tools/qrect.cpp
+++ b/src/corelib/tools/qrect.cpp
@@ -901,7 +901,7 @@ void QRect::moveCenter(const QPoint &p)
/*!
\fn bool QRect::contains(const QPoint &point, bool proper) const
- Returns true if the the given \a point is inside or on the edge of
+ Returns true if the given \a point is inside or on the edge of
the rectangle, otherwise returns false. If \a proper is true, this
function only returns true if the given \a point is \e inside the
rectangle (i.e., not on the edge).
diff --git a/src/corelib/tools/qsharedpointer_impl.h b/src/corelib/tools/qsharedpointer_impl.h
index b8c3f3d..88b8b8c 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -244,6 +244,7 @@ namespace QtSharedPointer {
template <class X> friend class ExternalRefCount;
template <class X> friend class QWeakPointer;
template <class X, class Y> friend QSharedPointer<X> qSharedPointerCastHelper(const QSharedPointer<Y> &src, X *);
+ template <class X, class Y> friend QSharedPointer<X> qSharedPointerDynamicCastHelper(const QSharedPointer<Y> &src, X *);
template <class X, class Y> friend QSharedPointer<X> qSharedPointerConstCastHelper(const QSharedPointer<Y> &src, X *);
template <class X, class Y> friend QSharedPointer<X> QtSharedPointer::qStrongRefFromWeakHelper(const QWeakPointer<Y> &src, X *);
#endif
@@ -521,6 +522,14 @@ namespace QtSharedPointer {
return result;
}
template <class X, class T>
+ Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerDynamicCastHelper(const QSharedPointer<T> &src, X *)
+ {
+ QSharedPointer<X> result;
+ register T *ptr = src.data();
+ result.internalSet(src.d, dynamic_cast<X *>(ptr));
+ return result;
+ }
+ template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerConstCastHelper(const QSharedPointer<T> &src, X *)
{
QSharedPointer<X> result;
@@ -556,9 +565,7 @@ template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerDynamicCast(const QSharedPointer<T> &src)
{
X *x = 0;
- if (QtSharedPointer::qVerifyDynamicCast(src.data(), x))
- return QtSharedPointer::qSharedPointerCastHelper(src, x);
- return QSharedPointer<X>();
+ return QtSharedPointer::qSharedPointerDynamicCastHelper(src, x);
}
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerDynamicCast(const QWeakPointer<T> &src)
@@ -570,17 +577,13 @@ template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerConstCast(const QSharedPointer<T> &src)
{
X *x = 0;
- if (QtSharedPointer::qVerifyConstCast(src.data(), x))
- return QtSharedPointer::qSharedPointerConstCastHelper(src, x);
- return QSharedPointer<X>();
+ return QtSharedPointer::qSharedPointerConstCastHelper(src, x);
}
template <class X, class T>
Q_INLINE_TEMPLATE QSharedPointer<X> qSharedPointerConstCast(const QWeakPointer<T> &src)
{
X *x = 0;
- if (QtSharedPointer::qVerifyConstCast(src.data(), x))
- return QtSharedPointer::qSharedPointerCastHelper(src, x);
- return QSharedPointer<X>();
+ return QtSharedPointer::qSharedPointerConstCastHelper(src, x);
}
template <class X, class T>
diff --git a/src/corelib/tools/qsize.cpp b/src/corelib/tools/qsize.cpp
index 76a5484..bbf6c2a 100644
--- a/src/corelib/tools/qsize.cpp
+++ b/src/corelib/tools/qsize.cpp
@@ -781,7 +781,7 @@ void QSizeF::scale(const QSizeF &s, Qt::AspectRatioMode mode)
\fn QDataStream &operator<<(QDataStream &stream, const QSizeF &size)
\relates QSizeF
- Writes the the given \a size to the given \a stream and returns a
+ Writes the given \a size to the given \a stream and returns a
reference to the stream.
\sa {Format of the QDataStream Operators}
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 375d672..c3649e3 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -743,7 +743,9 @@ int QString::grow(int size)
/*!
\since 4.2
- Returns a copy of the \a string string encoded in ucs4.
+ Returns a copy of the \a string, where the encoding of \a string depends on
+ the size of wchar. If wchar is 4 bytes, the \a string is interpreted as ucs-4,
+ if wchar is 2 bytes it is interpreted as ucs-2.
If \a size is -1 (default), the \a string has to be 0 terminated.
diff --git a/src/corelib/tools/qstringlist.cpp b/src/corelib/tools/qstringlist.cpp
index 386321f1..e22f122 100644
--- a/src/corelib/tools/qstringlist.cpp
+++ b/src/corelib/tools/qstringlist.cpp
@@ -397,7 +397,7 @@ void QtPrivate::QStringList_replaceInStrings(QStringList *that, const QRegExp &r
\fn QString QStringList::join(const QString &separator) const
Joins all the string list's strings into a single string with each
- element separated by the the given \a separator (which can be an
+ element separated by the given \a separator (which can be an
empty string).
\sa QString::split()
diff --git a/src/corelib/tools/qtimeline.cpp b/src/corelib/tools/qtimeline.cpp
index 2979a09..3a03558 100644
--- a/src/corelib/tools/qtimeline.cpp
+++ b/src/corelib/tools/qtimeline.cpp
@@ -225,7 +225,9 @@ void QTimeLinePrivate::setCurrentTime(int msecs)
valueForTime() and emitting valueChanged(). By default, valueForTime()
applies an interpolation algorithm to generate these value. You can choose
from a set of predefined timeline algorithms by calling
- setCurveShape(). By default, QTimeLine uses the EaseInOut curve shape,
+ setCurveShape().
+
+ Note that by default, QTimeLine uses the EaseInOut curve shape,
which provides a value that grows slowly, then grows steadily, and
finally grows slowly. For a custom timeline, you can reimplement
valueForTime(), in which case QTimeLine's curveShape property is ignored.
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index 45e92bf..c2381ce 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -65,6 +65,7 @@ SOURCES += \
tools/qvector.cpp \
tools/qvsnprintf.cpp
+symbian:SOURCES+=tools/qlocale_symbian.cpp
#zlib support
contains(QT_CONFIG, zlib) {
diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp
index 2c27381..f40a45f 100644
--- a/src/dbus/qdbusintegrator.cpp
+++ b/src/dbus/qdbusintegrator.cpp
@@ -1125,12 +1125,7 @@ void QDBusConnectionPrivate::objectDestroyed(QObject *obj)
void QDBusConnectionPrivate::relaySignal(QObject *obj, const QMetaObject *mo, int signalId,
const QVariantList &args)
{
- int mciid = mo->indexOfClassInfo(QCLASSINFO_DBUS_INTERFACE);
- Q_ASSERT(mciid != -1);
-
- QMetaClassInfo mci = mo->classInfo(mciid);
- Q_ASSERT(mci.value());
- const char *interface = mci.value();
+ QString interface = qDBusInterfaceFromMetaObject(mo);
QMetaMethod mm = mo->method(signalId);
QByteArray memberName = mm.signature();
@@ -1146,12 +1141,12 @@ void QDBusConnectionPrivate::relaySignal(QObject *obj, const QMetaObject *mo, in
}
QDBusReadLocker locker(RelaySignalAction, this);
- QDBusMessage message = QDBusMessage::createSignal(QLatin1String("/"), QLatin1String(interface),
+ QDBusMessage message = QDBusMessage::createSignal(QLatin1String("/"), interface,
QLatin1String(memberName));
message.setArguments(args);
DBusMessage *msg = QDBusMessagePrivate::toDBusMessage(message);
if (!msg) {
- qWarning("QDBusConnection: Could not emit signal %s.%s", interface, memberName.constData());
+ qWarning("QDBusConnection: Could not emit signal %s.%s", qPrintable(interface), memberName.constData());
return;
}
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index 15a99af..220faa3 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -706,15 +706,10 @@ void QMessageBoxPrivate::_q_buttonClicked(QAbstractButton *button)
Constructs a message box with no text and no buttons. \a parent is
passed to the QDialog constructor.
- If \a parent is 0, the message box is an \l{Qt::ApplicationModal}
- {application modal} dialog box. If \a parent is a widget, the
- message box is \l{Qt::WindowModal} {window modal} relative to \a
- parent.
-
- On Mac OS X, if \a parent is not 0 and you want your message box
- to appear as a Qt::Sheet of that parent, set the message box's
- \l{setWindowModality()} {window modality} to Qt::WindowModal
- (default). Otherwise, the message box will be a standard dialog.
+ On Mac OS X, if you want your message box to appear
+ as a Qt::Sheet of its \a parent, set the message box's
+ \l{setWindowModality()} {window modality} to Qt::WindowModal or use open().
+ Otherwise, the message box will be a standard dialog.
*/
QMessageBox::QMessageBox(QWidget *parent)
diff --git a/src/gui/dialogs/qpagesetupdialog.cpp b/src/gui/dialogs/qpagesetupdialog.cpp
index 63775d2..682071a 100644
--- a/src/gui/dialogs/qpagesetupdialog.cpp
+++ b/src/gui/dialogs/qpagesetupdialog.cpp
@@ -180,6 +180,12 @@ void QPageSetupDialog::open(QObject *receiver, const char *member)
QDialog::open();
}
+#if defined(Q_WS_MAC) || defined(Q_OS_WIN)
+/*! \fn void QPageSetupDialog::setVisible(bool visible)
+ \reimp
+*/
+#endif
+
QT_END_NAMESPACE
#endif
diff --git a/src/gui/dialogs/qpagesetupdialog_mac.mm b/src/gui/dialogs/qpagesetupdialog_mac.mm
index 401d95f..24aef34 100644
--- a/src/gui/dialogs/qpagesetupdialog_mac.mm
+++ b/src/gui/dialogs/qpagesetupdialog_mac.mm
@@ -251,9 +251,6 @@ QPageSetupDialog::QPageSetupDialog(QWidget *parent)
d->ep = static_cast<QMacPrintEngine *>(d->printer->paintEngine())->d_func();
}
-/*!
- \reimp
-*/
void QPageSetupDialog::setVisible(bool visible)
{
Q_D(QPageSetupDialog);
diff --git a/src/gui/dialogs/qsidebar.cpp b/src/gui/dialogs/qsidebar.cpp
index 26108d7..000a06b 100644
--- a/src/gui/dialogs/qsidebar.cpp
+++ b/src/gui/dialogs/qsidebar.cpp
@@ -249,9 +249,9 @@ void QUrlModel::addUrls(const QList<QUrl> &list, int row, bool move)
continue;
for (int j = 0; move && j < rowCount(); ++j) {
#if defined(Q_OS_WIN)
- if (index(j, 0).data(UrlRole).toUrl().toLocalFile().toLower() == url.toLocalFile().toLower()) {
+ if (QDir::cleanPath(index(j, 0).data(UrlRole).toUrl().toLocalFile()).toLower() == QDir::cleanPath(url.toLocalFile()).toLower()) {
#else
- if (index(j, 0).data(UrlRole) == url) {
+ if (QDir::cleanPath(index(j, 0).data(UrlRole).toUrl().toLocalFile()) == QDir::cleanPath(url.toLocalFile())) {
#endif
removeRow(j);
if (j <= row)
diff --git a/src/gui/dialogs/qwizard.cpp b/src/gui/dialogs/qwizard.cpp
index 32395c4..298f23f 100644
--- a/src/gui/dialogs/qwizard.cpp
+++ b/src/gui/dialogs/qwizard.cpp
@@ -1465,7 +1465,7 @@ void QWizardPrivate::handleAeroStyleChange()
return; // prevent recursion
inHandleAeroStyleChange = true;
- vistaHelper->backButton()->disconnect();
+ vistaHelper->disconnectBackButton();
q->removeEventFilter(vistaHelper);
if (isVistaThemeEnabled()) {
@@ -1491,7 +1491,7 @@ void QWizardPrivate::handleAeroStyleChange()
q->setMouseTracking(true); // ### original value possibly different
q->unsetCursor(); // ### ditto
antiFlickerWidget->move(0, 0);
- vistaHelper->backButton()->hide();
+ vistaHelper->hideBackButton();
vistaHelper->setTitleBarIconAndCaptionVisible(true);
}
diff --git a/src/gui/dialogs/qwizard_win.cpp b/src/gui/dialogs/qwizard_win.cpp
index 64696de..8aad4af 100644
--- a/src/gui/dialogs/qwizard_win.cpp
+++ b/src/gui/dialogs/qwizard_win.cpp
@@ -239,9 +239,11 @@ void QVistaBackButton::paintEvent(QPaintEvent *)
QVistaHelper::QVistaHelper(QWizard *wizard)
: pressed(false)
, wizard(wizard)
+ , backButton_(0)
{
is_vista = resolveSymbols();
- backButton_ = new QVistaBackButton(wizard);
+ if (is_vista)
+ backButton_ = new QVistaBackButton(wizard);
}
QVistaHelper::~QVistaHelper()
@@ -310,6 +312,7 @@ void QVistaHelper::drawTitleBar(QPainter *painter)
QRect(0, 0, wizard->width(), titleBarSize() + topOffset()),
painter->paintEngine()->getDC());
+ Q_ASSERT(backButton_);
const int btnTop = backButton_->mapToParent(QPoint()).y();
const int btnHeight = backButton_->size().height();
const int verticalCenter = (btnTop + btnHeight / 2);
diff --git a/src/gui/dialogs/qwizard_win_p.h b/src/gui/dialogs/qwizard_win_p.h
index cbb3b17..148be26 100644
--- a/src/gui/dialogs/qwizard_win_p.h
+++ b/src/gui/dialogs/qwizard_win_p.h
@@ -94,6 +94,8 @@ public:
void resizeEvent(QResizeEvent *event);
void paintEvent(QPaintEvent *event);
QVistaBackButton *backButton() const { return backButton_; }
+ void disconnectBackButton() { if (backButton_) backButton_->disconnect(); }
+ void hideBackButton() { if (backButton_) backButton_->hide(); }
void setWindowPosHack();
QColor basicWindowFrameColor();
enum VistaState { VistaAero, VistaBasic, Classic, Dirty };
diff --git a/src/gui/embedded/qscreen_qws.cpp b/src/gui/embedded/qscreen_qws.cpp
index 6741f2c..39a74d5 100644
--- a/src/gui/embedded/qscreen_qws.cpp
+++ b/src/gui/embedded/qscreen_qws.cpp
@@ -1394,7 +1394,7 @@ QImage::Format QScreenPrivate::preferredImageFormat() const
altered. Note that the default implementations of these functions
do nothing.
- Reimplement the the mapFromDevice() and mapToDevice() functions to
+ Reimplement the mapFromDevice() and mapToDevice() functions to
map objects from the framebuffer coordinate system to the
coordinate space used by the application, and vice versa. Be aware
that the default implementations simply return the given objects
diff --git a/src/gui/embedded/qsoundqss_qws.cpp b/src/gui/embedded/qsoundqss_qws.cpp
index c72ea91..283bbd3 100644
--- a/src/gui/embedded/qsoundqss_qws.cpp
+++ b/src/gui/embedded/qsoundqss_qws.cpp
@@ -52,6 +52,7 @@
#include <qalgorithms.h>
#include <qtimer.h>
#include <qpointer.h>
+#include <qendian.h>
#include <unistd.h>
#include <stdlib.h>
@@ -335,7 +336,13 @@ public:
virtual int readySamples(int) = 0;
int getSample(int off, int bps) {
- return (bps == 1) ? (data[out+off] - 128) * 128 : ((short*)data)[(out/2)+off];
+
+ //
+ // 16-bit audio data is converted to native endian so that it can be scaled
+ // Yes, this is ugly on a BigEndian machine
+ // Perhaps it shouldn't be scaled at all
+ //
+ return (bps == 1) ? (data[out+off] - 128) * 128 : qToLittleEndian(((short*)data)[(out/2)+off]);
}
int add(int* mixl, int* mixr, int count)
@@ -547,7 +554,7 @@ public:
wavedata_remaining = 0;
mFinishedRead = true;
} else if ( qstrncmp(chunk.id,"data",4) == 0 ) {
- wavedata_remaining = chunk.size;
+ wavedata_remaining = qToLittleEndian( chunk.size );
//out = max = sound_buffer_size;
@@ -572,10 +579,23 @@ public:
//qDebug("couldn't ready chunkdata");
mFinishedRead = true;
}
+
#define WAVE_FORMAT_PCM 1
- else if ( chunkdata.formatTag != WAVE_FORMAT_PCM ) {
- //qDebug("WAV file: UNSUPPORTED FORMAT %d",chunkdata.formatTag);
- mFinishedRead = true;
+ else
+ {
+ /*
+ ** Endian Fix the chuck data
+ */
+ chunkdata.formatTag = qToLittleEndian( chunkdata.formatTag );
+ chunkdata.channels = qToLittleEndian( chunkdata.channels );
+ chunkdata.samplesPerSec = qToLittleEndian( chunkdata.samplesPerSec );
+ chunkdata.avgBytesPerSec = qToLittleEndian( chunkdata.avgBytesPerSec );
+ chunkdata.blockAlign = qToLittleEndian( chunkdata.blockAlign );
+ chunkdata.wBitsPerSample = qToLittleEndian( chunkdata.wBitsPerSample );
+ if ( chunkdata.formatTag != WAVE_FORMAT_PCM ) {
+ qWarning("WAV file: UNSUPPORTED FORMAT %d",chunkdata.formatTag);
+ mFinishedRead = true;
+ }
}
} else {
// ignored chunk
@@ -1166,9 +1186,15 @@ bool QWSSoundServerPrivate::openDevice()
if (ioctl(fd, SNDCTL_DSP_SETFRAGMENT, &v))
qWarning("Could not set fragments to %08x",v);
#ifdef QT_QWS_SOUND_16BIT
- v=AFMT_S16_LE; if (ioctl(fd, SNDCTL_DSP_SETFMT, &v))
+ //
+ // Use native endian
+ // Since we have manipulated the data volume the data
+ // is now in native format, even though its stored
+ // as little endian in the WAV file
+ //
+ v=AFMT_S16_NE; if (ioctl(fd, SNDCTL_DSP_SETFMT, &v))
qWarning("Could not set format %d",v);
- if (AFMT_S16_LE != v)
+ if (AFMT_S16_NE != v)
qDebug("Want format %d got %d", AFMT_S16_LE, v);
#else
v=AFMT_U8; if (ioctl(fd, SNDCTL_DSP_SETFMT, &v))
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 30c15bc..4908296 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -2572,6 +2572,10 @@ QTransform QGraphicsItem::sceneTransform() const
*/
QTransform QGraphicsItem::deviceTransform(const QTransform &viewportTransform) const
{
+ // Ensure we return the standard transform if we're not untransformable.
+ if (!d_ptr->itemIsUntransformable())
+ return sceneTransform() * viewportTransform;
+
// Find the topmost item that ignores view transformations.
const QGraphicsItem *untransformedAncestor = this;
QList<const QGraphicsItem *> parents;
diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp
index eaa97ff..b46e05e 100644
--- a/src/gui/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp
@@ -255,7 +255,7 @@ QGraphicsItem *QGraphicsLayoutItemPrivate::parentItem() const
passing a QGraphicsLayoutItem pointer to QGraphicsLayoutItem's
protected constructor, or by calling setParentLayoutItem(). The
parentLayoutItem() function returns a pointer to the item's layoutItem
- parent. If the item's parent is 0 or if the the parent does not inherit
+ parent. If the item's parent is 0 or if the parent does not inherit
from QGraphicsItem, the parentLayoutItem() function then returns 0.
isLayout() returns true if the QGraphicsLayoutItem subclass is itself a
layout, or false otherwise.
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 13f70e5..b89e352 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -2289,12 +2289,7 @@ void QGraphicsScene::render(QPainter *painter, const QRectF &target, const QRect
// Calculate a simple level-of-detail metric.
// ### almost identical code in QGraphicsView::paintEvent()
// and QGraphicsView::render() - consider refactoring
- QTransform itemToDeviceTransform;
- if (item->d_ptr->itemIsUntransformable()) {
- itemToDeviceTransform = item->deviceTransform(painterTransform);
- } else {
- itemToDeviceTransform = item->sceneTransform() * painterTransform;
- }
+ QTransform itemToDeviceTransform = item->deviceTransform(painterTransform);
option.levelOfDetail = qSqrt(itemToDeviceTransform.map(v1).length() * itemToDeviceTransform.map(v2).length());
option.matrix = itemToDeviceTransform.toAffine(); //### discards perspective
@@ -5078,11 +5073,7 @@ void QGraphicsScene::drawItems(QPainter *painter,
// optimization, but it's hit very rarely.
for (int i = clippers.size() - 1; i >= 0; --i) {
QGraphicsItem *clipper = clippers[i];
- if (clipper->d_ptr->itemIsUntransformable()) {
- painter->setWorldTransform(clipper->deviceTransform(viewTransform), false);
- } else {
- painter->setWorldTransform(clipper->sceneTransform() * viewTransform, false);
- }
+ painter->setWorldTransform(clipper->deviceTransform(viewTransform), false);
childClippers.append(clipper);
painter->save();
@@ -5093,12 +5084,8 @@ void QGraphicsScene::drawItems(QPainter *painter,
}
// Set up the painter transform
- if (item->d_ptr->itemIsUntransformable()) {
- painter->setWorldTransform(item->deviceTransform(viewTransform), false);
- } else {
- painter->setWorldTransform(item->sceneTransform() * viewTransform, false);
- }
-
+ painter->setWorldTransform(item->deviceTransform(viewTransform), false);
+
// Save painter
bool saveState = (d->painterStateProtection || (item->flags() & QGraphicsItem::ItemClipsToShape));
if (saveState)
diff --git a/src/gui/graphicsview/qgraphicssceneevent.cpp b/src/gui/graphicsview/qgraphicssceneevent.cpp
index b819c2c..0ffd2b1 100644
--- a/src/gui/graphicsview/qgraphicssceneevent.cpp
+++ b/src/gui/graphicsview/qgraphicssceneevent.cpp
@@ -844,7 +844,7 @@ QGraphicsSceneContextMenuEvent::~QGraphicsSceneContextMenuEvent()
/*!
Returns the position of the mouse cursor in item coordinates at the moment
- the the context menu was requested.
+ the context menu was requested.
\sa scenePos(), screenPos()
*/
@@ -992,7 +992,7 @@ QGraphicsSceneHoverEvent::~QGraphicsSceneHoverEvent()
/*!
Returns the position of the mouse cursor in item coordinates at the moment
- the the hover event was sent.
+ the hover event was sent.
\sa scenePos(), screenPos()
*/
@@ -1017,7 +1017,7 @@ void QGraphicsSceneHoverEvent::setPos(const QPointF &pos)
/*!
Returns the position of the mouse cursor in scene coordinates at the
- moment the the hover event was sent.
+ moment the hover event was sent.
\sa pos(), screenPos()
*/
@@ -1042,7 +1042,7 @@ void QGraphicsSceneHoverEvent::setScenePos(const QPointF &pos)
/*!
Returns the position of the mouse cursor in screen coordinates at the
- moment the the hover event was sent.
+ moment the hover event was sent.
\sa pos(), scenePos()
*/
@@ -1138,7 +1138,7 @@ void QGraphicsSceneHoverEvent::setLastScreenPos(const QPoint &pos)
/*!
\since 4.4
- Returns the keyboard modifiers at the moment the the hover event was sent.
+ Returns the keyboard modifiers at the moment the hover event was sent.
*/
Qt::KeyboardModifiers QGraphicsSceneHoverEvent::modifiers() const
{
@@ -1184,7 +1184,7 @@ QGraphicsSceneHelpEvent::~QGraphicsSceneHelpEvent()
/*!
Returns the position of the mouse cursor in scene coordinates at the
- moment the the help event was sent.
+ moment the help event was sent.
\sa screenPos()
*/
@@ -1209,7 +1209,7 @@ void QGraphicsSceneHelpEvent::setScenePos(const QPointF &pos)
/*!
Returns the position of the mouse cursor in screen coordinates at the
- moment the the help event was sent.
+ moment the help event was sent.
\sa scenePos()
*/
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 05e4907..a795fb4 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -1153,11 +1153,7 @@ void QGraphicsViewPrivate::generateStyleOptions(const QList<QGraphicsItem *> &it
// Calculate a simple level-of-detail metric.
// ### almost identical code in QGraphicsScene::render()
// and QGraphicsView::render() - consider refactoring
- if (item->d_ptr->itemIsUntransformable()) {
- itemToViewportTransform = item->deviceTransform(worldTransform);
- } else {
- itemToViewportTransform = item->sceneTransform() * worldTransform;
- }
+ itemToViewportTransform = item->deviceTransform(worldTransform);
if (itemToViewportTransform.type() <= QTransform::TxTranslate) {
// Translation and rotation only? The LOD is 1.
@@ -1681,6 +1677,7 @@ void QGraphicsView::setScene(QGraphicsScene *scene)
disconnect(d->scene, SIGNAL(sceneRectChanged(QRectF)),
this, SLOT(updateSceneRect(QRectF)));
d->scene->d_func()->views.removeAll(this);
+ d->connectedToScene = false;
}
// Assign the new scene and update the contents (scrollbars, etc.)).
@@ -2159,12 +2156,7 @@ void QGraphicsView::render(QPainter *painter, const QRectF &target, const QRect
// Calculate a simple level-of-detail metric.
// ### almost identical code in QGraphicsScene::render()
// and QGraphicsView::paintEvent() - consider refactoring
- QTransform itemToViewportTransform;
- if (item->d_ptr->itemIsUntransformable()) {
- itemToViewportTransform = item->deviceTransform(painterMatrix);
- } else {
- itemToViewportTransform = item->sceneTransform() * painterMatrix;
- }
+ QTransform itemToViewportTransform = item->deviceTransform(painterMatrix);
option->levelOfDetail = qSqrt(itemToViewportTransform.map(v1).length() * itemToViewportTransform.map(v2).length());
option->matrix = itemToViewportTransform.toAffine();
diff --git a/src/gui/gui.pro b/src/gui/gui.pro
index d3b7388..30aaa51 100644
--- a/src/gui/gui.pro
+++ b/src/gui/gui.pro
@@ -42,4 +42,7 @@ QMAKE_DYNAMIC_LIST_FILE = $$PWD/QtGui.dynlist
DEFINES += Q_INTERNAL_QAPP_SRC
-symbian:TARGET.UID3=0x2001B2DD \ No newline at end of file
+symbian:TARGET.UID3=0x2001B2DD
+
+# ro-section in gui can exceed default allocated space, so more rw-section little further
+symbian-sbsv2: MMP_RULES += "LINKEROPTION armcc --rw-base 0x800000" \ No newline at end of file
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index 3c71f15..a880a13 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -854,6 +854,9 @@ void QIcon::addPixmap(const QPixmap &pixmap, Mode mode, State state)
QImageWriter::supportedImageFormats() functions to retrieve a
complete list of the supported file formats.
+ Note: When you add a non-empty filename to a QIcon, the icon becomes
+ non-null, even if the file doesn't exist or points to a corrupt file.
+
\sa addPixmap()
*/
void QIcon::addFile(const QString &fileName, const QSize &size, Mode mode, State state)
@@ -919,7 +922,7 @@ QList<QSize> QIcon::availableSizes(Mode mode, State state) const
\relates QIcon
\since 4.2
- Writes the given \a icon to the the given \a stream as a PNG
+ Writes the given \a icon to the given \a stream as a PNG
image. If the icon contains more than one image, all images will
be written to the stream. Note that writing the stream to a file
will not produce a valid image file.
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp
index c7a20db..70d4e2c 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -4996,7 +4996,7 @@ QPoint QImage::offset() const
/*!
\fn void QImage::setOffset(const QPoint& offset)
- Sets the the number of pixels by which the image is intended to be
+ Sets the number of pixels by which the image is intended to be
offset by when positioning relative to other images, to \a offset.
\sa offset(), {QImage#Image Information}{Image Information}
diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp
index 82be1b9..3ef5be3 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1236,7 +1236,7 @@ bool QPixmap::convertFromImage(const QImage &image, ColorMode mode)
/*!
\relates QPixmap
- Writes the given \a pixmap to the the given \a stream as a PNG
+ Writes the given \a pixmap to the given \a stream as a PNG
image. Note that writing the stream to a file will not produce a
valid image file.
diff --git a/src/gui/image/qpixmap_win.cpp b/src/gui/image/qpixmap_win.cpp
index 3ec441b..cbe9004 100644
--- a/src/gui/image/qpixmap_win.cpp
+++ b/src/gui/image/qpixmap_win.cpp
@@ -319,6 +319,7 @@ static QImage qt_fromWinHBITMAP(HDC hdc, HBITMAP bitmap, int w, int h)
} else {
qWarning("qt_fromWinHBITMAP(), failed to get bitmap bits");
}
+ qFree(data);
return image;
}
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index d1f3791..159a997 100644
--- a/src/gui/itemviews/qabstractitemview.cpp
+++ b/src/gui/itemviews/qabstractitemview.cpp
@@ -1338,7 +1338,7 @@ QSize QAbstractItemView::iconSize() const
/*!
\property QAbstractItemView::textElideMode
- \brief the the position of the "..." in elided text.
+ \brief the position of the "..." in elided text.
The default value for all item views is Qt::ElideRight.
*/
@@ -3221,9 +3221,9 @@ QStyleOptionViewItem QAbstractItemView::viewOptions() const
option.state &= ~QStyle::State_MouseOver;
option.font = font();
-#ifdef Q_WS_WIN
- // Note this is currently required on Windows
- // do give non-focused item views inactive appearance
+#ifndef Q_WS_MAC
+ // On mac the focus appearance follows window activation
+ // not widget activation
if (!hasFocus())
option.state &= ~QStyle::State_Active;
#endif
diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp
index 147f523..fda6255 100644
--- a/src/gui/itemviews/qitemdelegate.cpp
+++ b/src/gui/itemviews/qitemdelegate.cpp
@@ -47,6 +47,7 @@
#include <qbrush.h>
#include <qlineedit.h>
#include <qtextedit.h>
+#include <qplaintextedit.h>
#include <qpainter.h>
#include <qpalette.h>
#include <qpoint.h>
@@ -218,7 +219,7 @@ QSizeF QItemDelegatePrivate::doTextLayout(int lineWidth) const
editor widget, which is a widget that is placed on top of the view
while editing takes place. Editors are created with a
QItemEditorFactory; a default static instance provided by
- QItemEditorFactory is installed on all item delagates. You can set
+ QItemEditorFactory is installed on all item delegates. You can set
a custom factory using setItemEditorFactory() or set a new default
factory with QItemEditorFactory::setDefaultFactory(). It is the
data stored in the item model with the Qt::EditRole that is edited.
@@ -1194,7 +1195,7 @@ bool QItemDelegate::eventFilter(QObject *object, QEvent *event)
case Qt::Key_Enter:
case Qt::Key_Return:
#ifndef QT_NO_TEXTEDIT
- if (qobject_cast<QTextEdit*>(editor))
+ if (qobject_cast<QTextEdit *>(editor) || qobject_cast<QPlainTextEdit *>(editor))
return false; // don't filter enter key events for QTextEdit
// We want the editor to be able to process the key press
// before committing the data (e.g. so it can do
diff --git a/src/gui/itemviews/qlistwidget.cpp b/src/gui/itemviews/qlistwidget.cpp
index 7a366d1..bf3b43c 100644
--- a/src/gui/itemviews/qlistwidget.cpp
+++ b/src/gui/itemviews/qlistwidget.cpp
@@ -1158,7 +1158,7 @@ void QListWidgetPrivate::_q_dataChanged(const QModelIndex &topLeft,
/*!
\fn void QListWidget::addItem(QListWidgetItem *item)
- Inserts the \a item at the the end of the list widget.
+ Inserts the \a item at the end of the list widget.
\warning A QListWidgetItem can only be added to a
QListWidget once. Adding the same QListWidgetItem multiple
diff --git a/src/gui/itemviews/qstyleditemdelegate.cpp b/src/gui/itemviews/qstyleditemdelegate.cpp
index 4dc54a1..b75f151 100644
--- a/src/gui/itemviews/qstyleditemdelegate.cpp
+++ b/src/gui/itemviews/qstyleditemdelegate.cpp
@@ -47,6 +47,7 @@
#include <qbrush.h>
#include <qlineedit.h>
#include <qtextedit.h>
+#include <qplaintextedit.h>
#include <qpainter.h>
#include <qpalette.h>
#include <qpoint.h>
@@ -646,7 +647,7 @@ bool QStyledItemDelegate::eventFilter(QObject *object, QEvent *event)
case Qt::Key_Enter:
case Qt::Key_Return:
#ifndef QT_NO_TEXTEDIT
- if (qobject_cast<QTextEdit*>(editor))
+ if (qobject_cast<QTextEdit *>(editor) || qobject_cast<QPlainTextEdit *>(editor))
return false; // don't filter enter key events for QTextEdit
// We want the editor to be able to process the key press
// before committing the data (e.g. so it can do
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index 1906025..fb002a3 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -2054,12 +2054,10 @@ QWidget *QApplication::focusWidget()
void QApplicationPrivate::setFocusWidget(QWidget *focus, Qt::FocusReason reason)
{
- if (focus && focus->window()
#ifndef QT_NO_GRAPHICSVIEW
- && focus->window()->graphicsProxyWidget()
-#endif
- )
+ if (focus && focus->window()->graphicsProxyWidget())
return;
+#endif
hidden_focus_widget = 0;
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 72c2855..dd51fcd 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -302,7 +302,6 @@ void QSymbianControl::HandleLongTapEventL( const TPoint& aPenEventLocation, cons
QWidget *alienWidget;
QPoint widgetPos = QPoint(aPenEventLocation.iX, aPenEventLocation.iY);
QPoint globalPos = QPoint(aPenEventScreenLocation.iX,aPenEventScreenLocation.iY);
- //### possible bug, within manhattan lenght if the target is slipped outside ....
alienWidget = qwidget->childAt(widgetPos);
if (!alienWidget)
alienWidget = qwidget;
@@ -321,6 +320,7 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent)
QMouseEvent::Type type;
Qt::MouseButton button;
mapS60MouseEventTypeToQt(&type, &button, &pEvent);
+
if (m_previousEventLongTap)
if (type == QEvent::MouseButtonRelease){
button = Qt::RightButton;
@@ -368,27 +368,30 @@ void QSymbianControl::HandlePointerEventL(const TPointerEvent& pEvent)
button, QApplicationPrivate::mouse_buttons, mapToQtModifiers(pEvent.iModifiers));
events.append(Event(S60->lastPointerEventTarget,mEventLeave));
}
- QMouseEvent mEventEnter(QEvent::Enter, alienWidget->mapFrom(qwidget, widgetPos), globalPos,
+ QMouseEvent mEventEnter(QEvent::Enter, alienWidget->mapFromGlobal(globalPos), globalPos,
button, QApplicationPrivate::mouse_buttons, mapToQtModifiers(pEvent.iModifiers));
+
events.append(Event(alienWidget,mEventEnter));
}
S60->lastCursorPos = globalPos;
S60->lastPointerEventPos = widgetPos;
S60->lastPointerEventTarget = alienWidget;
-
- QMouseEvent mEvent(type, alienWidget->mapFrom(qwidget, widgetPos), globalPos,
- button, QApplicationPrivate::mouse_buttons, mapToQtModifiers(pEvent.iModifiers));
- events.append(Event(alienWidget,mEvent));
- QEventDispatcherS60 *dispatcher;
- // It is theoretically possible for someone to install a different event dispatcher.
- if (dispatcher = qobject_cast<QEventDispatcherS60 *>(alienWidget->d_func()->threadData->eventDispatcher)) {
- if (dispatcher->excludeUserInputEvents()) {
- for (int i=0;i < events.count();++i)
- {
- Event next = events[i];
- dispatcher->saveInputEvent(this, next.first, new QMouseEvent(next.second));
+ if (alienWidget)
+ {
+ QMouseEvent mEvent(type, alienWidget->mapFromGlobal(globalPos), globalPos,
+ button, QApplicationPrivate::mouse_buttons, mapToQtModifiers(pEvent.iModifiers));
+ events.append(Event(alienWidget,mEvent));
+ QEventDispatcherS60 *dispatcher;
+ // It is theoretically possible for someone to install a different event dispatcher.
+ if (dispatcher = qobject_cast<QEventDispatcherS60 *>(alienWidget->d_func()->threadData->eventDispatcher)) {
+ if (dispatcher->excludeUserInputEvents()) {
+ for (int i=0;i < events.count();++i)
+ {
+ Event next = events[i];
+ dispatcher->saveInputEvent(this, next.first, new QMouseEvent(next.second));
+ }
+ return;
}
- return;
}
}
for (int i=0;i < events.count();++i)
@@ -672,6 +675,10 @@ void QSymbianControl::HandleResourceChange(int resourceType)
CCoeControl::HandleResourceChange(resourceType);
}
+void QSymbianControl::CancelLongTapTimer()
+{
+ m_longTapDetector->Cancel();
+}
TTypeUid::Ptr QSymbianControl::MopSupplyObject(TTypeUid id)
{
@@ -786,6 +793,7 @@ void QApplicationPrivate::openPopup(QWidget *popup)
Q_ASSERT(popup->testAttribute(Qt::WA_WState_Created));
WId id = popup->effectiveWinId();
id->SetPointerCapture(true);
+ id->SetGloballyCapturing(true);
autoGrabWindow = id;
}
@@ -797,6 +805,7 @@ void QApplicationPrivate::openPopup(QWidget *popup)
popup->focusWidget()->setFocus(Qt::PopupFocusReason);
} else if (QApplicationPrivate::popupWidgets->count() == 1) { // this was the first popup
if (QWidget *fw = QApplication::focusWidget()) {
+ static_cast<QSymbianControl*>(fw->effectiveWinId())->CancelLongTapTimer();
QFocusEvent e(QEvent::FocusOut, Qt::PopupFocusReason);
q_func()->sendEvent(fw, &e);
}
@@ -816,6 +825,7 @@ void QApplicationPrivate::closePopup(QWidget *popup)
Q_ASSERT(popup->testAttribute(Qt::WA_WState_Created));
WId id = popup->effectiveWinId();
id->SetPointerCapture(false);
+ id->SetGloballyCapturing(false);
if (QWidgetPrivate::mouseGrabber != 0)
QWidgetPrivate::mouseGrabber->grabMouse();
diff --git a/src/gui/kernel/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index 917b5d5..bab3449 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -466,7 +466,7 @@ void QClipboard::setPixmap(const QPixmap &pixmap, Mode mode)
The \a mode argument is used to control which part of the system
clipboard is used. If \a mode is QClipboard::Clipboard, this
- function clears the the global clipboard contents. If \a mode is
+ function clears the global clipboard contents. If \a mode is
QClipboard::Selection, this function clears the global mouse
selection contents. If \a mode is QClipboard::FindBuffer, this
function clears the search string buffer.
diff --git a/src/gui/kernel/qcocoapanel_mac.mm b/src/gui/kernel/qcocoapanel_mac.mm
index c69826f..b2941fe 100644
--- a/src/gui/kernel/qcocoapanel_mac.mm
+++ b/src/gui/kernel/qcocoapanel_mac.mm
@@ -107,9 +107,16 @@ QT_USE_NAMESPACE
- (void)sendEvent:(NSEvent *)event
{
- [self retain];
-
QWidget *widget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self];
+
+ // Cocoa can hold onto the window after we've disavowed its knowledge. So,
+ // if we get sent an event afterwards just have it go through the super's
+ // version and don't do any stuff with Qt.
+ if (!widget) {
+ [super sendEvent:event];
+ return;
+ }
+ [self retain];
QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(qt_mac_nativeview_for(widget));
Qt::MouseButton mouseButton = cocoaButton2QtButton([event buttonNumber]);
diff --git a/src/gui/kernel/qcocoawindow_mac.mm b/src/gui/kernel/qcocoawindow_mac.mm
index 89f481f..8e62f02 100644
--- a/src/gui/kernel/qcocoawindow_mac.mm
+++ b/src/gui/kernel/qcocoawindow_mac.mm
@@ -128,12 +128,19 @@ QT_USE_NAMESPACE
- (void)sendEvent:(NSEvent *)event
{
- [self retain];
-
QWidget *widget = [[QT_MANGLE_NAMESPACE(QCocoaWindowDelegate) sharedDelegate] qt_qwidgetForWindow:self];
+
+ // Cocoa can hold onto the window after we've disavowed its knowledge. So,
+ // if we get sent an event afterwards just have it go through the super's
+ // version and don't do any stuff with Qt.
+ if (!widget) {
+ [super sendEvent:event];
+ return;
+ }
+
+ [self retain];
QT_MANGLE_NAMESPACE(QCocoaView) *view = static_cast<QT_MANGLE_NAMESPACE(QCocoaView) *>(qt_mac_nativeview_for(widget));
Qt::MouseButton mouseButton = cocoaButton2QtButton([event buttonNumber]);
-
// sometimes need to redirect mouse events to the popup.
QWidget *popup = qAppInstance()->activePopupWidget();
if (popup && popup != widget) {
diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp
index 8c7e47d..2aed287 100644
--- a/src/gui/kernel/qevent.cpp
+++ b/src/gui/kernel/qevent.cpp
@@ -675,12 +675,13 @@ QWheelEvent::QWheelEvent(const QPoint &pos, const QPoint& globalPos, int delta,
The \a type parameter must be QEvent::KeyPress, QEvent::KeyRelease,
or QEvent::ShortcutOverride.
- If \a key is 0, the event is not a result of
- a known key; for example, it may be the result of a compose
- sequence or keyboard macro. The \a modifiers holds the keyboard
- modifiers, and the given \a text is the Unicode text that the
- key generated. If \a autorep is true, isAutoRepeat() will be
- true. \a count is the number of keys involved in the event.
+ Int \a key is the code for the Qt::Key that the event loop should listen
+ for. If \a key is 0, the event is not a result of a known key; for
+ example, it may be the result of a compose sequence or keyboard macro.
+ The \a modifiers holds the keyboard modifiers, and the given \a text
+ is the Unicode text that the key generated. If \a autorep is true,
+ isAutoRepeat() will be true. \a count is the number of keys involved
+ in the event.
*/
QKeyEvent::QKeyEvent(Type type, int key, Qt::KeyboardModifiers modifiers, const QString& text,
bool autorep, ushort count)
diff --git a/src/gui/kernel/qshortcutmap.cpp b/src/gui/kernel/qshortcutmap.cpp
index ed9654b..86894b4 100644
--- a/src/gui/kernel/qshortcutmap.cpp
+++ b/src/gui/kernel/qshortcutmap.cpp
@@ -753,6 +753,7 @@ bool QShortcutMap::correctGraphicsWidgetContext(Qt::ShortcutContext context, QGr
tw = tw->parentWidget();
return tw == w;
}
+ return false;
}
// Below is Qt::WindowShortcut context
diff --git a/src/gui/kernel/qt_s60_p.h b/src/gui/kernel/qt_s60_p.h
index 35755c3..4eac35e 100644
--- a/src/gui/kernel/qt_s60_p.h
+++ b/src/gui/kernel/qt_s60_p.h
@@ -108,6 +108,7 @@ public:
void setWidget(QWidget *w);
void sendInputEvent(QWidget *widget, QInputEvent *inputEvent);
void setIgnoreFocusChanged(bool enabled) { m_ignoreFocusChanged = enabled; }
+ void CancelLongTapTimer();
protected:
void Draw(const TRect& aRect) const;
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 06f618d..dae4179 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -2361,13 +2361,26 @@ void QWidgetPrivate::setStyle_helper(QStyle *newStyle, bool propagate, bool
)
{
Q_Q(QWidget);
- createExtra();
-
QStyle *oldStyle = q->style();
#ifndef QT_NO_STYLE_STYLESHEET
- QStyle *origStyle = extra->style;
+ QStyle *origStyle = 0;
+#endif
+
+#ifdef Q_WS_MAC
+ // the metalhack boolean allows Qt/Mac to do a proper re-polish depending
+ // on how the Qt::WA_MacBrushedMetal attribute is set. It is only ever
+ // set when changing that attribute and passes the widget's CURRENT style.
+ // therefore no need to do a reassignment.
+ if (!metalHack)
#endif
- extra->style = newStyle;
+ {
+ createExtra();
+
+#ifndef QT_NO_STYLE_STYLESHEET
+ origStyle = extra->style;
+#endif
+ extra->style = newStyle;
+ }
// repolish
if (q->windowType() != Qt::Desktop) {
@@ -6287,7 +6300,7 @@ QByteArray QWidget::saveGeometry() const
returns false.
If the restored geometry is off-screen, it will be modified to be
- inside the the available screen geometry.
+ inside the available screen geometry.
To restore geometry saved using QSettings, you can use code like
this:
diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm
index b315eaf..f863428 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -786,16 +786,6 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
// By also setting the current modal window back into the event, we
// help Carbon determining which window is supposed to be raised.
handled_event = qApp->activePopupWidget() ? true : false;
- QWidget *top = 0;
- if (!QApplicationPrivate::tryModalHelper(widget, &top) && top && top != widget){
- if(!qt_mac_is_macsheet(top) || top->parentWidget() != widget) {
- handled_event = true;
- WindowPtr topWindowRef = qt_mac_window_for(top);
- SetEventParameter(event, kEventParamModalWindow, typeWindowRef, sizeof(topWindowRef), &topWindowRef);
- HIModalClickResult clickResult = kHIModalClickIsModal;
- SetEventParameter(event, kEventParamModalClickResult, typeModalClickResult, sizeof(clickResult), &clickResult);
- }
- }
#endif
} else if(ekind == kEventWindowClose) {
widget->d_func()->close_helper(QWidgetPrivate::CloseWithSpontaneousEvent);
@@ -4045,8 +4035,8 @@ void QWidgetPrivate::applyMaxAndMinSizeOnWindow()
NSSize max = NSMakeSize(SF(extra->maxw), SF(extra->maxh));
NSSize min = NSMakeSize(SF(extra->minw), SF(extra->minh));
#undef SF
- [qt_mac_window_for(q) setMinSize:min];
- [qt_mac_window_for(q) setMaxSize:max];
+ [qt_mac_window_for(q) setContentMinSize:min];
+ [qt_mac_window_for(q) setContentMaxSize:max];
#endif
}
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 5d7d4ab..c50004e 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -1369,7 +1369,7 @@ QColor QColor::toRgb() const
*/
QColor QColor::toHsv() const
{
- if (!isValid())
+ if (!isValid() || cspec == Hsv)
return *this;
if (cspec != Rgb)
@@ -1421,7 +1421,7 @@ QColor QColor::toHsv() const
*/
QColor QColor::toCmyk() const
{
- if (!isValid())
+ if (!isValid() || cspec == Cmyk)
return *this;
if (cspec != Rgb)
return toRgb().toCmyk();
@@ -2241,4 +2241,12 @@ QDataStream &operator>>(QDataStream &stream, QColor &color)
\sa QColor::rgb(), QColor::rgba()
*/
+/*! \fn void QColormap::initialize()
+ \internal
+*/
+
+/*! \fn void QColormap::cleanup()
+ \internal
+*/
+
QT_END_NAMESPACE
diff --git a/src/gui/painting/qcolormap_x11.cpp b/src/gui/painting/qcolormap_x11.cpp
index ccf6955..c9186b1 100644
--- a/src/gui/painting/qcolormap_x11.cpp
+++ b/src/gui/painting/qcolormap_x11.cpp
@@ -337,8 +337,6 @@ static void init_direct(QColormapPrivate *d, bool ownColormap)
static QColormap **cmaps = 0;
-/*! \internal
-*/
void QColormap::initialize()
{
Display *display = QX11Info::display();
@@ -578,8 +576,6 @@ void QColormap::initialize()
}
}
-/*! \internal
-*/
void QColormap::cleanup()
{
Display *display = QX11Info::display();
diff --git a/src/gui/painting/qemulationpaintengine.cpp b/src/gui/painting/qemulationpaintengine.cpp
index 3397c45..175f1ab 100644
--- a/src/gui/painting/qemulationpaintengine.cpp
+++ b/src/gui/painting/qemulationpaintengine.cpp
@@ -123,14 +123,30 @@ void QEmulationPaintEngine::stroke(const QVectorPath &path, const QPen &pen)
real_engine->stroke(path, bgPen);
}
-
QBrush brush = pen.brush();
+ QPen copy = pen;
Qt::BrushStyle style = qbrush_style(brush);
if (style >= Qt::LinearGradientPattern && style <= Qt::ConicalGradientPattern) {
const QGradient *g = brush.gradient();
+
if (g->coordinateMode() > QGradient::LogicalMode) {
- QPaintEngineEx::stroke(path, pen);
- return;
+ if (g->coordinateMode() == QGradient::StretchToDeviceMode) {
+ QTransform mat = brush.transform();
+ mat.scale(real_engine->painter()->device()->width(), real_engine->painter()->device()->height());
+ brush.setTransform(mat);
+ copy.setBrush(brush);
+ real_engine->stroke(path, copy);
+ return;
+ } else if (g->coordinateMode() == QGradient::ObjectBoundingMode) {
+ QTransform mat = brush.transform();
+ QRealRect r = path.controlPointRect();
+ mat.translate(r.x1, r.y1);
+ mat.scale(r.x2 - r.x1, r.y2 - r.y1);
+ brush.setTransform(mat);
+ copy.setBrush(brush);
+ real_engine->stroke(path, copy);
+ return;
+ }
}
}
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index baa9ce3..cc48d24 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -7159,14 +7159,14 @@ QPoint QPainter::xFormDev(const QPoint &p) const
\fn QRect QPainter::xFormDev(const QRect &rectangle) const
\overload
- Use combineMatrix() combined with QMatrix::inverted() instead.
+ Use mapRect() combined with QMatrix::inverted() instead.
\oldcode
QPainter painter(this);
QRect transformed = painter.xFormDev(rectangle);
\newcode
QPainter painter(this);
- QRect transformed = rectangle * painter.combinedMatrix().inverted();
+ QRect transformed = painter.combinedMatrix().inverted(rectangle);
\endcode
*/
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index e1f5eea..9ce16d3 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -1006,7 +1006,7 @@ void QPainterPath::addPolygon(const QPolygonF &polygon)
/*!
\fn void QPainterPath::addEllipse(const QRectF &boundingRectangle)
- Creates an ellipse within the the specified \a boundingRectangle
+ Creates an ellipse within the specified \a boundingRectangle
and adds it to the painter path as a closed subpath.
The ellipse is composed of a clockwise curve, starting and
diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp
index 1ea40ba..3fd1ffb 100644
--- a/src/gui/painting/qtextureglyphcache.cpp
+++ b/src/gui/painting/qtextureglyphcache.cpp
@@ -88,11 +88,12 @@ void QTextureGlyphCache::populate(const QTextItemInt &ti,
ti.ascent.toReal(),
ti.descent.toReal());
#endif
- int glyph_width = metrics.width.ceil().toInt() + margin * 2;
- int glyph_height = metrics.height.ceil().toInt() + margin * 2;
+ int glyph_width = metrics.width.ceil().toInt();
+ int glyph_height = metrics.height.ceil().toInt();
if (glyph_height == 0 || glyph_width == 0)
continue;
-
+ glyph_width += margin * 2 + 2;
+ glyph_height += margin * 2 + 2;
// align to 8-bit boundary
if (m_type == QFontEngineGlyphCache::Raster_Mono)
glyph_width = (glyph_width+7)&~7;
@@ -188,11 +189,7 @@ void QImageTextureGlyphCache::createTextureData(int width, int height)
int QImageTextureGlyphCache::glyphMargin() const
{
-#ifdef Q_WS_MAC
return 2;
-#else
- return m_type == QFontEngineGlyphCache::Raster_RGBMask ? 2 : 0;
-#endif
}
void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g)
diff --git a/src/gui/painting/qtransform.cpp b/src/gui/painting/qtransform.cpp
index 2383272..cec2d16 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -1355,7 +1355,8 @@ static inline QHomogeneousCoordinate mapHomogeneous(const QTransform &transform,
return c;
}
-static inline bool lineTo_clipped(QPainterPath &path, const QTransform &transform, const QPointF &a, const QPointF &b, bool needsMoveTo)
+static inline bool lineTo_clipped(QPainterPath &path, const QTransform &transform, const QPointF &a, const QPointF &b,
+ bool needsMoveTo, bool needsLineTo = true)
{
QHomogeneousCoordinate ha = mapHomogeneous(transform, a);
QHomogeneousCoordinate hb = mapHomogeneous(transform, b);
@@ -1388,7 +1389,8 @@ static inline bool lineTo_clipped(QPainterPath &path, const QTransform &transfor
if (needsMoveTo)
path.moveTo(ha.toPoint());
- path.lineTo(hb.toPoint());
+ if (needsLineTo)
+ path.lineTo(hb.toPoint());
return true;
}
@@ -1455,7 +1457,7 @@ static QPainterPath mapProjective(const QTransform &transform, const QPainterPat
}
if (path.elementCount() > 0 && lastMoveTo != last)
- lineTo_clipped(result, transform, last, lastMoveTo, needsMoveTo);
+ lineTo_clipped(result, transform, last, lastMoveTo, needsMoveTo, false);
return result;
}
diff --git a/src/gui/styles/gtksymbols.cpp b/src/gui/styles/gtksymbols.cpp
index 0842ec7..d8a67c2 100644
--- a/src/gui/styles/gtksymbols.cpp
+++ b/src/gui/styles/gtksymbols.cpp
@@ -633,31 +633,14 @@ GtkStyle* QGtk::gtkStyle(const QString &path)
return 0;
}
-#ifdef Q_OS_LINUX
-QT_END_NAMESPACE
-
-int getresuid(uid_t *ruid, uid_t *euid, uid_t *suid);
-int getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid);
-
-QT_BEGIN_NAMESPACE
-#endif
-
void QGtk::initGtkWidgets()
{
// From gtkmain.c
-
- uid_t ruid, rgid, euid, egid, suid, sgid;
-
-#ifdef Q_OS_LINUX
- if (getresuid (&ruid, &euid, &suid) != 0 || getresgid (&rgid, &egid, &sgid) != 0)
-#endif
- {
- suid = ruid = getuid ();
- sgid = rgid = getgid ();
- euid = geteuid ();
- egid = getegid ();
- }
- if (ruid != euid || ruid != suid || rgid != egid || rgid != sgid) {
+ uid_t ruid = getuid ();
+ uid_t rgid = getgid ();
+ uid_t euid = geteuid ();
+ uid_t egid = getegid ();
+ if (ruid != euid || rgid != egid) {
qWarning("\nThis process is currently running setuid or setgid.\nGTK+ does not allow this "
"therefore Qt cannot use the GTK+ integration.\nTry launching your app using \'gksudo\', "
"\'kdesudo\' or a similar tool.\n\n"
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index 3cae08a..f3d1537 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -1693,7 +1693,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
if (toolbutton->toolButtonStyle == Qt::ToolButtonTextUnderIcon) {
pr.setHeight(pmSize.height() + 6);
- tr.adjust(0, pr.height(), 0, -3);
+ tr.adjust(0, pr.height() - 1, 0, -3);
pr.translate(shiftX, shiftY);
if (!hasArrow) {
drawItemPixmap(p, pr, Qt::AlignCenter, pm);
diff --git a/src/gui/styles/qgtkstyle.cpp b/src/gui/styles/qgtkstyle.cpp
index ca71da2..86653df 100644
--- a/src/gui/styles/qgtkstyle.cpp
+++ b/src/gui/styles/qgtkstyle.cpp
@@ -140,10 +140,7 @@ static const char * const dock_widget_restore_xpm[] =
class QGtkStyleFilter : public QObject
{
public:
- QGtkStyleFilter() {
- qApp->installEventFilter(this);
- }
-
+ QGtkStyleFilter() {}
private:
bool eventFilter(QObject *obj, QEvent *e);
};
@@ -167,7 +164,12 @@ class QGtkStylePrivate : public QCleanlooksStylePrivate
public:
QGtkStylePrivate()
: QCleanlooksStylePrivate()
- {}
+ {
+ QGtk::initGtkWidgets();
+ if (QGtk::isThemeAvailable())
+ qApp->installEventFilter(&filter);
+
+ }
QGtkStyleFilter filter;
};
@@ -243,7 +245,6 @@ static QString uniqueName(const QString &key, const QStyleOption *option, const
QGtkStyle::QGtkStyle()
: QCleanlooksStyle(*new QGtkStylePrivate)
{
- QGtk::initGtkWidgets();
}
/*!
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 7a870fe..1be3d6e 100644
--- a/src/gui/styles/qmacstyle_mac.mm
+++ b/src/gui/styles/qmacstyle_mac.mm
@@ -39,6 +39,11 @@
**
****************************************************************************/
+/*
+ Note: The qdoc comments for QMacStyle are contained in
+ .../doc/src/qstyles.qdoc.
+*/
+
#include "qmacstyle_mac.h"
#if defined(Q_WS_MAC) && !defined(QT_NO_STYLE_MAC)
@@ -1988,87 +1993,12 @@ void QMacStylePrivate::drawColorlessButton(const HIRect &macRect, HIThemeButtonD
p->drawPixmap(int(macRect.origin.x), int(macRect.origin.y) + finalyoff, width, height, pm);
}
-/*!
- \class QMacStyle
- \brief The QMacStyle class provides a Mac OS X style using the Apple Appearance Manager.
-
- \ingroup appearance
-
- This class is implemented as a wrapper to the HITheme
- APIs, allowing applications to be styled according to the current
- theme in use on Mac OS X. This is done by having primitives
- in QStyle implemented in terms of what Mac OS X would normally theme.
-
- \warning This style is only available on Mac OS X because it relies on the
- HITheme APIs.
-
- There are additional issues that should be taken
- into consideration to make an application compatible with the
- \link http://developer.apple.com/documentation/UserExperience/Conceptual/OSXHIGuidelines/index.html
- Apple Human Interface Guidelines \endlink. Some of these issues are outlined
- below.
-
- \list
-
- \i Layout - The restrictions on window layout are such that some
- aspects of layout that are style-dependent cannot be achieved
- using QLayout. Changes are being considered (and feedback would be
- appreciated) to make layouts QStyle-able. Some of the restrictions
- involve horizontal and vertical widget alignment and widget size
- (covered below).
-
- \i Widget size - Mac OS X allows widgets to have specific fixed sizes. Qt
- does not fully implement this behavior so as to maintain cross-platform
- compatibility. As a result some widgets sizes may be inappropriate (and
- subsequently not rendered correctly by the HITheme APIs).The
- QWidget::sizeHint() will return the appropriate size for many
- managed widgets (widgets enumerated in \l QStyle::ContentsType).
-
- \i Effects - QMacStyle uses HITheme for performing most of the drawing, but
- also uses emulation in a few cases where HITheme does not provide the
- required functionality (for example, tab bars on Panther, the toolbar
- separator, etc). We tried to make the emulation as close to the original as
- possible. Please report any issues you see in effects or non-standard
- widgets.
-
- \endlist
-
- There are other issues that need to be considered in the feel of
- your application (including the general color scheme to match the
- Aqua colors). The Guidelines mentioned above will remain current
- with new advances and design suggestions for Mac OS X.
-
- Note that the functions provided by QMacStyle are
- reimplementations of QStyle functions; see QStyle for their
- documentation.
-
- \img qmacstyle.png
- \sa QWindowsXPStyle, QWindowsStyle, QPlastiqueStyle, QCDEStyle, QMotifStyle
-*/
-
-
-/*!
- \enum QMacStyle::WidgetSizePolicy
-
- \value SizeSmall
- \value SizeLarge
- \value SizeMini
- \value SizeDefault
- \omitvalue SizeNone
-*/
-
-/*!
- Constructs a QMacStyle object.
-*/
QMacStyle::QMacStyle()
: QWindowsStyle()
{
d = new QMacStylePrivate(this);
}
-/*!
- Destructs a QMacStyle object.
-*/
QMacStyle::~QMacStyle()
{
delete qt_mac_backgroundPattern;
@@ -2142,7 +2072,6 @@ void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QPoint
}
}
-/*! \reimp */
void QMacStyle::polish(QPalette &pal)
{
if (!qt_mac_backgroundPattern) {
@@ -2166,17 +2095,14 @@ void QMacStyle::polish(QPalette &pal)
}
}
-/*! \reimp */
void QMacStyle::polish(QApplication *)
{
}
-/*! \reimp */
void QMacStyle::unpolish(QApplication *)
{
}
-/*! \reimp */
void QMacStyle::polish(QWidget* w)
{
d->addWidget(w);
@@ -2240,7 +2166,6 @@ void QMacStyle::polish(QWidget* w)
}
}
-/*! \reimp */
void QMacStyle::unpolish(QWidget* w)
{
d->removeWidget(w);
@@ -2271,7 +2196,6 @@ void QMacStyle::unpolish(QWidget* w)
QWindowsStyle::unpolish(w);
}
-/*! \reimp */
int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QWidget *widget) const
{
int controlSize = getControlSize(opt, widget);
@@ -2650,7 +2574,6 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
return ret;
}
-/*! \reimp */
QPalette QMacStyle::standardPalette() const
{
QPalette pal = QWindowsStyle::standardPalette();
@@ -2660,7 +2583,6 @@ QPalette QMacStyle::standardPalette() const
return pal;
}
-/*! \reimp */
int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w,
QStyleHintReturn *hret) const
{
@@ -2955,7 +2877,6 @@ int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
return ret;
}
-/*! \reimp */
QPixmap QMacStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixmap,
const QStyleOption *opt) const
{
@@ -2981,7 +2902,6 @@ QPixmap QMacStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixm
}
-/*! \reimp */
QPixmap QMacStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt,
const QWidget *widget) const
{
@@ -3012,31 +2932,7 @@ QPixmap QMacStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOpt
}
return icon.pixmap(size, size);
}
-/*!
- \enum QMacStyle::FocusRectPolicy
-
- This type is used to signify a widget's focus rectangle policy.
-
- \value FocusEnabled show a focus rectangle when the widget has focus.
- \value FocusDisabled never show a focus rectangle for the widget.
- \value FocusDefault show a focus rectangle when the widget has
- focus and the widget is a QSpinWidget, QDateTimeEdit, QLineEdit,
- QListBox, QListView, editable QTextEdit, or one of their
- subclasses.
-*/
-
-/*!
- \obsolete
- Sets the focus rectangle policy of \a w. The \a policy can be one of
- \l{QMacStyle::FocusRectPolicy}.
-
- This is now simply an interface to the Qt::WA_MacShowFocusRect attribute and the
- FocusDefault value does nothing anymore. If you want to set a widget back
- to its default value, you must save the old value of the attribute before
- you change it.
- \sa focusRectPolicy() QWidget::setAttribute()
-*/
void QMacStyle::setFocusRectPolicy(QWidget *w, FocusRectPolicy policy)
{
switch (policy) {
@@ -3049,29 +2945,11 @@ void QMacStyle::setFocusRectPolicy(QWidget *w, FocusRectPolicy policy)
}
}
-/*!
- \obsolete
- Returns the focus rectangle policy for the widget \a w.
-
- The focus rectangle policy can be one of \l{QMacStyle::FocusRectPolicy}.
-
- In 4.3 and up this function will simply test for the
- Qt::WA_MacShowFocusRect attribute and will never return
- QMacStyle::FocusDefault.
-
- \sa setFocusRectPolicy(), QWidget::testAttribute()
-*/
QMacStyle::FocusRectPolicy QMacStyle::focusRectPolicy(const QWidget *w)
{
return w->testAttribute(Qt::WA_MacShowFocusRect) ? FocusEnabled : FocusDisabled;
}
-/*!
- \obsolete
-
- Call QWidget::setAttribute() with Qt::WA_MacMiniSize, Qt::WA_MacSmallSize,
- or Qt::WA_MacNormalSize instead.
-*/
void QMacStyle::setWidgetSizePolicy(const QWidget *widget, WidgetSizePolicy policy)
{
QWidget *wadget = const_cast<QWidget *>(widget);
@@ -3080,12 +2958,6 @@ void QMacStyle::setWidgetSizePolicy(const QWidget *widget, WidgetSizePolicy poli
wadget->setAttribute(Qt::WA_MacMiniSize, policy == SizeMini);
}
-/*!
- \obsolete
-
- Call QWidget::testAttribute() with Qt::WA_MacMiniSize, Qt::WA_MacSmallSize,
- or Qt::WA_MacNormalSize instead.
-*/
QMacStyle::WidgetSizePolicy QMacStyle::widgetSizePolicy(const QWidget *widget)
{
while (widget) {
@@ -3101,7 +2973,6 @@ QMacStyle::WidgetSizePolicy QMacStyle::widgetSizePolicy(const QWidget *widget)
return SizeDefault;
}
-/*! \reimp */
void QMacStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, QPainter *p,
const QWidget *w) const
{
@@ -3534,7 +3405,6 @@ static inline QPixmap darkenPixmap(const QPixmap &pixmap)
-/*! \reimp */
void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter *p,
const QWidget *w) const
{
@@ -4558,7 +4428,7 @@ static void setLayoutItemMargins(int left, int top, int right, int bottom, QRect
rect->adjust(left, top, right, bottom);
}
}
-/*! \reimp */
+
QRect QMacStyle::subElementRect(SubElement sr, const QStyleOption *opt,
const QWidget *widget) const
{
@@ -4852,7 +4722,6 @@ static inline void drawToolbarButtonArrow(const QRect &toolButtonRect, ThemeDraw
HIThemeDrawPopupArrow(&hirect, &padi, cg, kHIThemeOrientationNormal);
}
-/*! \reimp */
void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex *opt, QPainter *p,
const QWidget *widget) const
{
@@ -5235,7 +5104,8 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
arrowOpt.state = tb->state;
arrowOpt.palette = tb->palette;
drawPrimitive(PE_IndicatorArrowDown, &arrowOpt, p, widget);
- } else if (tb->features & QStyleOptionToolButton::HasMenu) {
+ } else if ((tb->features & QStyleOptionToolButton::HasMenu)
+ && (tb->toolButtonStyle != Qt::ToolButtonTextOnly && !tb->icon.isNull())) {
drawToolbarButtonArrow(tb->rect, tds, cg);
}
if (tb->state & State_On) {
@@ -5349,7 +5219,6 @@ void QMacStyle::drawComplexControl(ComplexControl cc, const QStyleOptionComplex
}
}
-/*! \reimp */
QStyle::SubControl QMacStyle::hitTestComplexControl(ComplexControl cc,
const QStyleOptionComplex *opt,
const QPoint &pt, const QWidget *widget) const
@@ -5480,7 +5349,6 @@ QStyle::SubControl QMacStyle::hitTestComplexControl(ComplexControl cc,
return sc;
}
-/*! \reimp */
QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc,
const QWidget *widget) const
{
@@ -5820,7 +5688,6 @@ QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *op
return ret;
}
-/*! \reimp */
QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
const QSize &csz, const QWidget *widget) const
{
@@ -6107,9 +5974,6 @@ QSize QMacStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
return sz;
}
-/*!
- \reimp
-*/
void QMacStyle::drawItemText(QPainter *p, const QRect &r, int flags, const QPalette &pal,
bool enabled, const QString &text, QPalette::ColorRole textRole) const
{
@@ -6118,9 +5982,6 @@ void QMacStyle::drawItemText(QPainter *p, const QRect &r, int flags, const QPale
QWindowsStyle::drawItemText(p, r, flags, pal, enabled, text, textRole);
}
-/*!
- \reimp
-*/
bool QMacStyle::event(QEvent *e)
{
if(e->type() == QEvent::FocusIn) {
@@ -6195,9 +6056,6 @@ void qt_mac_constructQIconFromIconRef(const IconRef icon, const IconRef overlayI
}
}
-/*!
- \internal
-*/
QIcon QMacStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *opt,
const QWidget *widget) const
{
@@ -6311,9 +6169,6 @@ QIcon QMacStyle::standardIconImplementation(StandardPixmap standardIcon, const Q
return QWindowsStyle::standardIconImplementation(standardIcon, opt, widget);
}
-/*!
- \internal
-*/
int QMacStyle::layoutSpacingImplementation(QSizePolicy::ControlType control1,
QSizePolicy::ControlType control2,
Qt::Orientation orientation,
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index caac359..071b60a 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -10,33 +10,39 @@
****************************************************************************/
#include "qs60style_p.h"
+
#include "qapplication.h"
#include "qpainter.h"
#include "qstyleoption.h"
#include "qresizeevent"
#include "qpixmapcache"
-#include "qlistview.h"
+
#include "qcalendarwidget.h"
-#include "qtabbar.h"
+#include "qdial.h"
+#include "qdialog.h"
+#include "qerrormessage.h"
+#include "qgroupbox.h"
+#include "qheaderview.h"
+#include "qlist.h"
#include "qlistwidget.h"
+#include "qlistview.h"
#include "qmenu.h"
-#include "qpushbutton.h"
#include "qmenubar.h"
+#include "qmessagebox.h"
+#include "qpushbutton.h"
+#include "qscrollarea.h"
+#include "qscrollbar.h"
+#include "qtabbar.h"
#include "qtablewidget.h"
+#include "qtableview.h"
#include "qtoolbar.h"
-#include "qgroupbox.h"
#include "qtoolbutton.h"
+#include "qtreeview.h"
+
#include "private/qtoolbarextension_p.h"
#include "private/qcombobox_p.h"
#include "private/qwidget_p.h"
-#include "qscrollbar.h"
-#include "qlist.h"
-#include "qtableview.h"
-#include "qheaderview.h"
-#include "qtreeview.h"
-#include "qdialog.h"
-#include "qmessagebox.h"
-#include "qerrormessage.h"
+#include "private/qapplication_p.h"
#if !defined(QT_NO_STYLE_S60) || defined(QT_PLUGIN)
@@ -105,113 +111,13 @@ const struct QS60StylePrivate::frameElementCenter QS60StylePrivate::m_frameEleme
{SE_ToolBarButton, QS60StyleEnums::SP_QsnFrSctrlButtonCenter},
{SE_ToolBarButtonPressed, QS60StyleEnums::SP_QsnFrSctrlButtonCenterPressed},
{SE_PanelBackground, QS60StyleEnums::SP_QsnFrSetOptCenter},
+ {SE_ButtonInactive, QS60StyleEnums::SP_QsnFrButtonCenterInactive},
};
static const int frameElementsCount =
int(sizeof(QS60StylePrivate::m_frameElementsData)/sizeof(QS60StylePrivate::m_frameElementsData[0]));
const int KNotFound = -1;
-void QS60StylePrivate::drawPart(QS60StyleEnums::SkinParts skinPart,
- QPainter *painter, const QRect &rect, SkinElementFlags flags)
-{
- static const bool doCache =
-#if defined(Q_WS_S60)
- // Freezes on 3.1. Anyways, caching is only really needed on touch UI
- !(QSysInfo::s60Version() == QSysInfo::SV_S60_3_1 || QSysInfo::s60Version() == QSysInfo::SV_S60_3_2);
-#else
- true;
-#endif
- const QPixmap skinPartPixMap((doCache ? cachedPart : part)(skinPart, rect.size(), flags));
- if (!skinPartPixMap.isNull())
- painter->drawPixmap(rect.topLeft(), skinPartPixMap);
-}
-
-void QS60StylePrivate::drawFrame(SkinFrameElements frameElement, QPainter *painter, const QRect &rect, SkinElementFlags flags)
-{
- static const bool doCache =
-#if defined(Q_WS_S60)
- // Freezes on 3.1. Anyways, caching is only really needed on touch UI
- !(QSysInfo::s60Version() == QSysInfo::SV_S60_3_1 || QSysInfo::s60Version() == QSysInfo::SV_S60_3_2);
-#else
- true;
-#endif
- const QPixmap frameElementPixMap((doCache ? cachedFrame : frame)(frameElement, rect.size(), flags));
- if (!frameElementPixMap.isNull())
- painter->drawPixmap(rect.topLeft(), frameElementPixMap);
-}
-
-void QS60StylePrivate::drawRow(QS60StyleEnums::SkinParts start,
- QS60StyleEnums::SkinParts middle, QS60StyleEnums::SkinParts end,
- Qt::Orientation orientation, QPainter *painter, const QRect &rect,
- SkinElementFlags flags)
-{
- QSize startEndSize(partSize(start, flags));
- startEndSize.scale(rect.size(), Qt::KeepAspectRatio);
-
- QRect startRect = QRect(rect.topLeft(), startEndSize);
- QRect middleRect = rect;
- QRect endRect;
-
- if (orientation == Qt::Horizontal) {
- startRect.setWidth(qMin(rect.width() / 2 - 1, startRect.width()));
- endRect = startRect.translated(rect.width() - startRect.width(), 0);
- middleRect.adjust(startRect.width(), 0, -startRect.width(), 0);
- } else {
- startRect.setHeight(qMin(rect.height() / 2 - 1, startRect.height()));
- endRect = startRect.translated(0, rect.height() - startRect.height());
- middleRect.adjust(0, startRect.height(), 0, -startRect.height());
- }
-
-#if 0
- painter->save();
- painter->setOpacity(.3);
- painter->fillRect(startRect, Qt::red);
- painter->fillRect(middleRect, Qt::green);
- painter->fillRect(endRect, Qt::blue);
- painter->restore();
-#else
- drawPart(start, painter, startRect, flags);
- if (middleRect.isValid())
- drawPart(middle, painter, middleRect, flags);
- drawPart(end, painter, endRect, flags);
-#endif
-}
-
-QPixmap QS60StylePrivate::cachedPart(QS60StyleEnums::SkinParts part,
- const QSize &size, SkinElementFlags flags)
-{
- QPixmap result;
- const QString cacheKey =
- QString::fromLatin1("S60Style: SkinParts=%1 QSize=%2|%3 SkinElementFlags=%4")
- .arg((int)part).arg(size.width()).arg(size.height()).arg((int)flags);
- if (!QPixmapCache::find(cacheKey, result)) {
- result = QS60StylePrivate::part(part, size, flags);
- QPixmapCache::insert(cacheKey, result);
- }
- return result;
-}
-
-QPixmap QS60StylePrivate::cachedFrame(SkinFrameElements frame, const QSize &size, SkinElementFlags flags)
-{
- QPixmap result;
- const QString cacheKey =
- QString::fromLatin1("S60Style: SkinFrameElements=%1 QSize=%2|%3 SkinElementFlags=%4")
- .arg((int)frame).arg(size.width()).arg(size.height()).arg((int)flags);
- if (!QPixmapCache::find(cacheKey, result)) {
- result = QS60StylePrivate::frame(frame, size, flags);
- QPixmapCache::insert(cacheKey, result);
- }
- return result;
-}
-
-void QS60StylePrivate::refreshUI()
-{
- foreach (QWidget *topLevelWidget, QApplication::allWidgets()) {
- topLevelWidget->updateGeometry();
- QCoreApplication::postEvent(topLevelWidget, new QResizeEvent(topLevelWidget->size(), topLevelWidget->size()));
- }
-}
-
void QS60StylePrivate::drawSkinElement(SkinElements element, QPainter *painter,
const QRect &rect, SkinElementFlags flags)
{
@@ -331,78 +237,14 @@ void QS60StylePrivate::drawSkinElement(SkinElements element, QPainter *painter,
drawRow(QS60StyleEnums::SP_QsnCpScrollHandleTopPressed, QS60StyleEnums::SP_QsnCpScrollHandleMiddlePressed,
QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed, Qt::Vertical, painter, rect, flags | SF_PointNorth);
break;
+ case SE_ButtonInactive:
+ drawFrame(SF_ButtonInactive, painter, rect, flags | SF_PointNorth);
+ break;
default:
break;
}
}
-QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlags flags)
-{
- QSize result(20, 20);
- switch (part)
- {
- case QS60StyleEnums::SP_QgnGrafBarProgress:
- result.setWidth(pixelMetric(QStyle::PM_ProgressBarChunkWidth));
- break;
- case QS60StyleEnums::SP_QgnGrafTabActiveM:
- case QS60StyleEnums::SP_QgnGrafTabPassiveM:
- case QS60StyleEnums::SP_QgnGrafTabActiveR:
- case QS60StyleEnums::SP_QgnGrafTabPassiveR:
- case QS60StyleEnums::SP_QgnGrafTabPassiveL:
- case QS60StyleEnums::SP_QgnGrafTabActiveL:
- break;
- case QS60StyleEnums::SP_QgnIndiSliderEdit:
- result.scale(pixelMetric(QStyle::PM_SliderLength),
- pixelMetric(QStyle::PM_SliderControlThickness), Qt::IgnoreAspectRatio);
- break;
-
- case QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed:
- case QS60StyleEnums::SP_QsnCpScrollHandleTopPressed:
- case QS60StyleEnums::SP_QsnCpScrollHandleMiddlePressed:
- case QS60StyleEnums::SP_QsnCpScrollBgBottom:
- case QS60StyleEnums::SP_QsnCpScrollBgMiddle:
- case QS60StyleEnums::SP_QsnCpScrollBgTop:
- case QS60StyleEnums::SP_QsnCpScrollHandleBottom:
- case QS60StyleEnums::SP_QsnCpScrollHandleMiddle:
- case QS60StyleEnums::SP_QsnCpScrollHandleTop:
- result.setHeight(pixelMetric(QStyle::PM_ScrollBarExtent));
- result.setWidth(pixelMetric(QStyle::PM_ScrollBarExtent));
- break;
- default:
- // Generic frame part size gathering.
- for (int i = 0; i < frameElementsCount; ++i)
- {
- switch (m_frameElementsData[i].center - part) {
- case 8: /* CornerTl */
- case 7: /* CornerTr */
- case 6: /* CornerBl */
- case 5: /* CornerBr */
- result.setWidth(pixelMetric(PM_Custom_FrameCornerWidth));
- // Falltrough intended...
- case 4: /* SideT */
- case 3: /* SideB */
- result.setHeight(pixelMetric(PM_Custom_FrameCornerHeight));
- break;
- case 2: /* SideL */
- case 1: /* SideR */
- result.setWidth(pixelMetric(PM_Custom_FrameCornerWidth));
- break;
- case 0: /* center */
- default:
- break;
- }
- }
- break;
- }
- if (flags & (QS60StylePrivate::SF_PointEast | QS60StylePrivate::SF_PointWest)) {
- const int temp = result.width();
- result.setWidth(result.height());
- result.setHeight(temp);
- }
- return result;
-}
-
-
void QS60StylePrivate::drawSkinPart(QS60StyleEnums::SkinParts part,
QPainter *painter, const QRect &rect, SkinElementFlags flags)
{
@@ -428,6 +270,109 @@ void QS60StylePrivate::setStyleProperty(const char *name, const QVariant &value)
}
}
+QVariant QS60StylePrivate::styleProperty(const char *name) const
+{
+ if (name == propertyKeyLayouts) {
+#if !defined(QT_WS_S60) || defined(QT_S60STYLE_LAYOUTDATA_SIMULATED)
+ static QStringList layouts;
+ if (layouts.isEmpty())
+ for (int i = 0; i < QS60StylePrivate::m_numberOfLayouts; i++)
+ layouts.append(QS60StylePrivate::m_layoutHeaders[i].layoutName);
+ return layouts;
+#else
+ qFatal("Cannot return list of 'canned' static layouts. Dynamic layouts are used!");
+#endif
+ }
+ return QVariant();
+}
+
+QColor QS60StylePrivate::stateColor(const QColor& color, const QStyleOption *option)
+{
+ QColor retColor (color);
+ if (option && !(option->state & QStyle::State_Enabled)) {
+ QColor hsvColor = retColor.toHsv();
+ int colorSat = hsvColor.saturation();
+ int colorVal = hsvColor.value();
+ colorSat = (colorSat!=0) ? (colorSat>>1) : 128;
+ colorVal = (colorVal!=0) ? (colorVal>>1) : 128;
+ hsvColor.setHsv(hsvColor.hue(), colorSat, colorVal);
+ retColor = hsvColor.toRgb();
+ }
+ return retColor;
+}
+
+QColor QS60StylePrivate::lighterColor(const QColor &baseColor)
+{
+ QColor result(baseColor);
+ bool modifyColor = false;
+ if (result.saturation() == 0) {
+ result.setHsv(result.hue(), 128, result.value());
+ modifyColor = true;
+ }
+ if (result.value() == 0) {
+ result.setHsv(result.hue(), result.saturation(), 128);
+ modifyColor = true;
+ }
+ if (modifyColor)
+ result = result.lighter(175);
+ else
+ result = result.lighter(225);
+ return result;
+}
+
+bool QS60StylePrivate::drawsOwnThemeBackground(const QWidget *widget)
+{
+ return (qobject_cast<const QMessageBox *> (widget) ||
+ qobject_cast<const QErrorMessage *> (widget));
+}
+
+QFont QS60StylePrivate::s60Font(
+ QS60StyleEnums::FontCategories fontCategory, int pointSize) const
+{
+ QFont result;
+ int actualPointSize = pointSize;
+ if (actualPointSize <= 0) {
+ const QFont appFont = QApplication::font();
+ actualPointSize = appFont.pointSize();
+ if (actualPointSize <= 0)
+ actualPointSize = appFont.pixelSize() * 72 / qt_defaultDpiY();
+ }
+ Q_ASSERT(actualPointSize > 0);
+ const QPair<QS60StyleEnums::FontCategories, int> key(fontCategory, actualPointSize);
+ if (!m_mappedFontsCache.contains(key)) {
+ result = s60Font_specific(fontCategory, actualPointSize);
+ m_mappedFontsCache.insert(key, result);
+ } else {
+ result = m_mappedFontsCache.value(key);
+ if (result.pointSize() != actualPointSize)
+ result.setPointSize(actualPointSize);
+ }
+ return result;
+}
+
+void QS60StylePrivate::clearCaches(QS60StylePrivate::CacheClearReason reason)
+{
+ switch(reason){
+ case CC_LayoutChange:
+ // when layout changes, the colors remain in cache, but graphics and fonts can change
+ m_mappedFontsCache.clear();
+ m_backgroundValid = false;
+ QPixmapCache::clear();
+ break;
+ case CC_ThemeChange:
+ m_colorCache.clear();
+ QPixmapCache::clear();
+ m_backgroundValid = false;
+ case CC_UndefinedChange:
+ default:
+ m_colorCache.clear();
+ m_mappedFontsCache.clear();
+ QPixmapCache::clear();
+ m_backgroundValid = false;
+ break;
+ }
+}
+
// Since S60Style has 'button' and 'tooltip' as a graphic, we don't have any native color which to use
// for QPalette::Button and QPalette::ToolTipBase. Therefore we need to guesstimate
// this by calculating average rgb values for button pixels.
@@ -449,7 +394,6 @@ QColor QS60StylePrivate::colorFromFrameGraphics(QS60StylePrivate::SkinFrameEleme
const int pixels = frameImage.numBytes()/sizeof(QRgb);
const int bytesPerLine = frameImage.bytesPerLine();
Q_ASSERT(bytesPerLine);
- const int rows = frameImage.numBytes()/(sizeof(QRgb)*bytesPerLine);
int estimatedRed = 0;
int estimatedGreen = 0;
@@ -490,11 +434,6 @@ QColor QS60StylePrivate::colorFromFrameGraphics(QS60StylePrivate::SkinFrameEleme
}
-int QS60StylePrivate::focusRectPenWidth()
-{
- return pixelMetric(QS60Style::PM_DefaultFrameWidth);
-}
-
void QS60StylePrivate::setThemePalette(QApplication *app) const
{
if (!app)
@@ -524,7 +463,7 @@ void QS60StylePrivate::setThemePalette(QApplication *app) const
widgetPalette.setBrush(QPalette::Window, QS60StylePrivate::backgroundTexture());
widgetPalette.setColor(QPalette::Base, Qt::transparent);
// set button and tooltipbase based on pixel colors
- QColor buttonColor = colorFromFrameGraphics(QS60StylePrivate::SF_ButtonNormal);
+ const QColor buttonColor = colorFromFrameGraphics(QS60StylePrivate::SF_ButtonNormal);
widgetPalette.setColor(QPalette::Button, buttonColor );
widgetPalette.setColor(QPalette::Light, widgetPalette.color(QPalette::Button).lighter());
widgetPalette.setColor(QPalette::Dark, widgetPalette.color(QPalette::Button).darker());
@@ -537,46 +476,10 @@ void QS60StylePrivate::setThemePalette(QApplication *app) const
app->setPalette(widgetPalette);
}
-void QS60StylePrivate::setBackgroundTexture(QApplication *app) const
+void QS60StylePrivate::setThemePalette(QWidget *widget) const
{
- if (!app)
- return;
- QPalette applicationPalette = app->palette();
- applicationPalette.setBrush(QPalette::Window, QS60StylePrivate::backgroundTexture());
- app->setPalette(applicationPalette);
-}
-
-void QS60Style::polish(QApplication *application)
-{
- Q_D(const QS60Style);
- originalPalette = application->palette();
- d->setThemePalette(application);
-}
-
-void QS60Style::polish(QWidget *widget)
-{
- Q_D(const QS60Style);
- QCommonStyle::polish(widget);
-
- if (!widget)
+ if(!widget)
return;
-
- if (QS60StylePrivate::isSkinnableDialog(widget)) {
- widget->setAttribute(Qt::WA_StyledBackground);
- } else if (false
-#ifndef QT_NO_MENU
- || qobject_cast<const QMenu *> (widget)
-#endif // QT_NO_MENU
- ) {
- widget->setAttribute(Qt::WA_StyledBackground);
- } else if (false
-#ifndef QT_NO_COMBOBOX
- || qobject_cast<const QComboBoxListView *>(widget)
-#endif //QT_NO_COMBOBOX
- ) {
- widget->setAttribute(Qt::WA_StyledBackground);
- }
-
QPalette widgetPalette = widget->palette();
// widget specific colors and fonts
@@ -585,16 +488,19 @@ void QS60Style::polish(QWidget *widget)
QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnLineColors, 8, 0));
QApplication::setPalette(widgetPalette, "QSlider");
} else if (qobject_cast<QPushButton *>(widget)){
- const QFont suggestedFont = d->s60Font(
+ const QFont suggestedFont = s60Font(
QS60StyleEnums::FC_Primary, widget->font().pointSizeF());
widget->setFont(suggestedFont);
widgetPalette.setColor(QPalette::Active, QPalette::ButtonText,
QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 6, 0));
widgetPalette.setColor(QPalette::Inactive, QPalette::ButtonText,
QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 6, 0));
+ const QStyleOption opt;
+ widgetPalette.setColor(QPalette::Disabled, QPalette::ButtonText,
+ QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 6, &opt));
QApplication::setPalette(widgetPalette, "QPushButton");
} else if (qobject_cast<QToolButton *>(widget)){
- const QFont suggestedFont = d->s60Font(
+ const QFont suggestedFont = s60Font(
QS60StyleEnums::FC_Primary, widget->font().pointSizeF());
widget->setFont(suggestedFont);
widgetPalette.setColor(QPalette::Active, QPalette::ButtonText,
@@ -603,7 +509,7 @@ void QS60Style::polish(QWidget *widget)
QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 6, 0));
QApplication::setPalette(widgetPalette, "QToolButton");
} else if (qobject_cast<QHeaderView *>(widget)){
- const QFont suggestedFont = d->s60Font(
+ const QFont suggestedFont = s60Font(
QS60StyleEnums::FC_Secondary, widget->font().pointSizeF());
widget->setFont(suggestedFont);
widgetPalette.setColor(QPalette::Active, QPalette::ButtonText,
@@ -626,142 +532,216 @@ void QS60Style::polish(QWidget *widget)
QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 22, 0));
QApplication::setPalette(widgetPalette, "QTableView");
} else if (qobject_cast<QGroupBox *>(widget)){
- const QFont suggestedFont = d->s60Font(
+ const QFont suggestedFont = s60Font(
QS60StyleEnums::FC_Title, widget->font().pointSizeF());
widget->setFont(suggestedFont);
} else if (qobject_cast<QLineEdit *>(widget)) {
- widgetPalette.setColor(QPalette::All, QPalette::HighlightedText,
+ widgetPalette.setColor(QPalette::All, QPalette::HighlightedText,
QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 24, 0));
QApplication::setPalette(widgetPalette, "QLineEdit");
-
+ } else if (qobject_cast<QDial *> (widget)) {
+ const QColor color(QS60StylePrivate::s60Color(QS60StyleEnums::CL_QsnTextColors, 6, 0));
+ widgetPalette.setColor(QPalette::WindowText, color);
+ widgetPalette.setColor(QPalette::Button, QApplication::palette().color(QPalette::Button));
+ widgetPalette.setColor(QPalette::Dark, color.darker());
+ widgetPalette.setColor(QPalette::Light, color.lighter());
+ QApplication::setPalette(widgetPalette, "QDial");
+ } else if (qobject_cast<QScrollArea *>(widget)) {
+ widgetPalette.setBrush(QPalette::Window, QBrush());
+ QApplication::setPalette(widgetPalette, "QScrollArea");
}
}
-void QS60Style::unpolish(QApplication *application)
+void QS60StylePrivate::setBackgroundTexture(QApplication *app) const
{
- application->setPalette(originalPalette);
+ if (!app)
+ return;
+ QPalette applicationPalette = app->palette();
+ applicationPalette.setBrush(QPalette::Window, QS60StylePrivate::backgroundTexture());
+ app->setPalette(applicationPalette);
}
-void QS60Style::unpolish(QWidget *widget)
+int QS60StylePrivate::focusRectPenWidth()
{
- if (QS60StylePrivate::isSkinnableDialog(widget)) {
- widget->setAttribute(Qt::WA_StyledBackground, false);
- } else if (false
-#ifndef QT_NO_MENU
- || qobject_cast<const QMenu *> (widget)
-#endif // QT_NO_MENU
- ) {
- widget->setAttribute(Qt::WA_StyledBackground, false);
- } else if (false
-#ifndef QT_NO_COMBOBOX
- || qobject_cast<const QComboBoxListView *>(widget)
-#endif //QT_NO_COMBOBOX
- ) {
- widget->setAttribute(Qt::WA_StyledBackground, false);
- }
+ return pixelMetric(QS60Style::PM_DefaultFrameWidth);
+}
- if (widget) {
- widget->setPalette(QPalette());
- }
+#if !defined(QT_WS_S60) || defined(QT_S60STYLE_LAYOUTDATA_SIMULATED)
+void QS60StylePrivate::setCurrentLayout(int index)
+{
+ m_pmPointer = data[index];
+}
+#endif
- QCommonStyle::unpolish(widget);
+
+void QS60StylePrivate::drawPart(QS60StyleEnums::SkinParts skinPart,
+ QPainter *painter, const QRect &rect, SkinElementFlags flags)
+{
+ static const bool doCache =
+#if defined(Q_WS_S60)
+ // Freezes on 3.1. Anyways, caching is only really needed on touch UI
+ !(QSysInfo::s60Version() == QSysInfo::SV_S60_3_1 || QSysInfo::s60Version() == QSysInfo::SV_S60_3_2);
+#else
+ true;
+#endif
+ const QPixmap skinPartPixMap((doCache ? cachedPart : part)(skinPart, rect.size(), flags));
+ if (!skinPartPixMap.isNull())
+ painter->drawPixmap(rect.topLeft(), skinPartPixMap);
}
-QVariant QS60StylePrivate::styleProperty(const char *name) const
+void QS60StylePrivate::drawFrame(SkinFrameElements frameElement, QPainter *painter, const QRect &rect, SkinElementFlags flags)
{
- if (name == propertyKeyLayouts) {
-#if !defined(QT_WS_S60) || defined(QT_S60STYLE_LAYOUTDATA_SIMULATED)
- static QStringList layouts;
- if (layouts.isEmpty())
- for (int i = 0; i < QS60StylePrivate::m_numberOfLayouts; i++)
- layouts.append(QS60StylePrivate::m_layoutHeaders[i].layoutName);
- return layouts;
+ static const bool doCache =
+#if defined(Q_WS_S60)
+ // Freezes on 3.1. Anyways, caching is only really needed on touch UI
+ !(QSysInfo::s60Version() == QSysInfo::SV_S60_3_1 || QSysInfo::s60Version() == QSysInfo::SV_S60_3_2);
#else
- qFatal("Cannot return list of 'canned' static layouts. Dynamic layouts are used!");
+ true;
#endif
- }
- return QVariant();
+ const QPixmap frameElementPixMap((doCache ? cachedFrame : frame)(frameElement, rect.size(), flags));
+ if (!frameElementPixMap.isNull())
+ painter->drawPixmap(rect.topLeft(), frameElementPixMap);
}
-QFont QS60StylePrivate::s60Font(
- QS60StyleEnums::FontCategories fontCategory, int pointSize) const
+void QS60StylePrivate::drawRow(QS60StyleEnums::SkinParts start,
+ QS60StyleEnums::SkinParts middle, QS60StyleEnums::SkinParts end,
+ Qt::Orientation orientation, QPainter *painter, const QRect &rect,
+ SkinElementFlags flags)
{
- QFont result;
- int actualPointSize = pointSize;
- if (actualPointSize <= 0) {
- const QFont appFont = QApplication::font();
- actualPointSize = appFont.pointSize();
- if (actualPointSize <= 0)
- actualPointSize = appFont.pixelSize() * 72 / qt_defaultDpiY();
- }
- Q_ASSERT(actualPointSize > 0);
- const QPair<QS60StyleEnums::FontCategories, int> key(fontCategory, actualPointSize);
- if (!m_mappedFontsCache.contains(key)) {
- result = s60Font_specific(fontCategory, actualPointSize);
- m_mappedFontsCache.insert(key, result);
+ QSize startEndSize(partSize(start, flags));
+ startEndSize.scale(rect.size(), Qt::KeepAspectRatio);
+
+ QRect startRect = QRect(rect.topLeft(), startEndSize);
+ QRect middleRect = rect;
+ QRect endRect;
+
+ if (orientation == Qt::Horizontal) {
+ startRect.setWidth(qMin(rect.width() / 2 - 1, startRect.width()));
+ endRect = startRect.translated(rect.width() - startRect.width(), 0);
+ middleRect.adjust(startRect.width(), 0, -startRect.width(), 0);
} else {
- result = m_mappedFontsCache.value(key);
- if (result.pointSize() != actualPointSize)
- result.setPointSize(actualPointSize);
+ startRect.setHeight(qMin(rect.height() / 2 - 1, startRect.height()));
+ endRect = startRect.translated(0, rect.height() - startRect.height());
+ middleRect.adjust(0, startRect.height(), 0, -startRect.height());
}
- return result;
-}
-//todo: you could pass a reason to clear cache here, so that we could
-// deduce whether or not the specific cache needs to be cleared
-void QS60StylePrivate::clearCaches()
-{
- m_colorCache.clear();
- m_mappedFontsCache.clear();
- QPixmapCache::clear();
- m_backgroundValid = false;
+#if 0
+ painter->save();
+ painter->setOpacity(.3);
+ painter->fillRect(startRect, Qt::red);
+ painter->fillRect(middleRect, Qt::green);
+ painter->fillRect(endRect, Qt::blue);
+ painter->restore();
+#else
+ drawPart(start, painter, startRect, flags);
+ if (middleRect.isValid())
+ drawPart(middle, painter, middleRect, flags);
+ drawPart(end, painter, endRect, flags);
+#endif
}
-QColor QS60StylePrivate::lighterColor(const QColor &baseColor)
+QPixmap QS60StylePrivate::cachedPart(QS60StyleEnums::SkinParts part,
+ const QSize &size, SkinElementFlags flags)
{
- QColor result(baseColor);
- bool modifyColor = false;
- if (result.saturation() == 0) {
- result.setHsv(result.hue(), 128, result.value());
- modifyColor = true;
- }
- if (result.value() == 0) {
- result.setHsv(result.hue(), result.saturation(), 128);
- modifyColor = true;
+ QPixmap result;
+ const QString cacheKey =
+ QString::fromLatin1("S60Style: SkinParts=%1 QSize=%2|%3 SkinPartFlags=%4")
+ .arg((int)part).arg(size.width()).arg(size.height()).arg((int)flags);
+ if (!QPixmapCache::find(cacheKey, result)) {
+ result = QS60StylePrivate::part(part, size, flags);
+ QPixmapCache::insert(cacheKey, result);
}
- if (modifyColor)
- result = result.lighter(175);
- else
- result = result.lighter(225);
return result;
}
-bool QS60StylePrivate::isSkinnableDialog(const QWidget *widget)
+QPixmap QS60StylePrivate::cachedFrame(SkinFrameElements frame, const QSize &size, SkinElementFlags flags)
{
- return (qobject_cast<const QMessageBox *> (widget) ||
- qobject_cast<const QErrorMessage *> (widget));
+ QPixmap result;
+ const QString cacheKey =
+ QString::fromLatin1("S60Style: SkinFrameElements=%1 QSize=%2|%3 SkinElementFlags=%4")
+ .arg((int)frame).arg(size.width()).arg(size.height()).arg((int)flags);
+ if (!QPixmapCache::find(cacheKey, result)) {
+ result = QS60StylePrivate::frame(frame, size, flags);
+ QPixmapCache::insert(cacheKey, result);
+ }
+ return result;
}
-#if !defined(QT_WS_S60) || defined(QT_S60STYLE_LAYOUTDATA_SIMULATED)
-void QS60StylePrivate::setCurrentLayout(int index)
+void QS60StylePrivate::refreshUI()
{
- m_pmPointer = data[index];
+ foreach (QWidget *topLevelWidget, QApplication::allWidgets()) {
+ topLevelWidget->updateGeometry();
+ //todo: study how we can get rid of this. Apparently scrollbars cache pixelmetrics values, and we need them to update themselves
+ // maybe styleChanged event is enough?
+ //QCoreApplication::postEvent(topLevelWidget, new QEvent(QEvent::StyleChange));
+ QCoreApplication::postEvent(topLevelWidget, new QResizeEvent(topLevelWidget->size(), topLevelWidget->size()));
+ }
}
-#endif
-QColor QS60StylePrivate::stateColor(const QColor& color, const QStyleOption *option)
+QSize QS60StylePrivate::partSize(QS60StyleEnums::SkinParts part, SkinElementFlags flags)
{
- QColor retColor (color);
- if (option && !(option->state & QStyle::State_Enabled)) {
- QColor hsvColor = retColor.toHsv();
- int colorSat = hsvColor.saturation();
- int colorVal = hsvColor.value();
- colorSat = (colorSat!=0) ? (colorSat>>1) : 128;
- colorVal = (colorVal!=0) ? (colorVal>>1) : 128;
- hsvColor.setHsv(hsvColor.hue(), colorSat, colorVal);
- retColor = hsvColor.toRgb();
+ QSize result(20, 20);
+ switch (part)
+ {
+ case QS60StyleEnums::SP_QgnGrafBarProgress:
+ result.setWidth(pixelMetric(QStyle::PM_ProgressBarChunkWidth));
+ break;
+ case QS60StyleEnums::SP_QgnGrafTabActiveM:
+ case QS60StyleEnums::SP_QgnGrafTabPassiveM:
+ case QS60StyleEnums::SP_QgnGrafTabActiveR:
+ case QS60StyleEnums::SP_QgnGrafTabPassiveR:
+ case QS60StyleEnums::SP_QgnGrafTabPassiveL:
+ case QS60StyleEnums::SP_QgnGrafTabActiveL:
+ break;
+ case QS60StyleEnums::SP_QgnIndiSliderEdit:
+ result.scale(pixelMetric(QStyle::PM_SliderLength),
+ pixelMetric(QStyle::PM_SliderControlThickness), Qt::IgnoreAspectRatio);
+ break;
+
+ case QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed:
+ case QS60StyleEnums::SP_QsnCpScrollHandleTopPressed:
+ case QS60StyleEnums::SP_QsnCpScrollHandleMiddlePressed:
+ case QS60StyleEnums::SP_QsnCpScrollBgBottom:
+ case QS60StyleEnums::SP_QsnCpScrollBgMiddle:
+ case QS60StyleEnums::SP_QsnCpScrollBgTop:
+ case QS60StyleEnums::SP_QsnCpScrollHandleBottom:
+ case QS60StyleEnums::SP_QsnCpScrollHandleMiddle:
+ case QS60StyleEnums::SP_QsnCpScrollHandleTop:
+ result.setHeight(pixelMetric(QStyle::PM_ScrollBarExtent));
+ result.setWidth(pixelMetric(QStyle::PM_ScrollBarExtent));
+ break;
+ default:
+ // Generic frame part size gathering.
+ for (int i = 0; i < frameElementsCount; ++i)
+ {
+ switch (m_frameElementsData[i].center - part) {
+ case 8: /* CornerTl */
+ case 7: /* CornerTr */
+ case 6: /* CornerBl */
+ case 5: /* CornerBr */
+ result.setWidth(pixelMetric(PM_Custom_FrameCornerWidth));
+ // Falltrough intended...
+ case 4: /* SideT */
+ case 3: /* SideB */
+ result.setHeight(pixelMetric(PM_Custom_FrameCornerHeight));
+ break;
+ case 2: /* SideL */
+ case 1: /* SideR */
+ result.setWidth(pixelMetric(PM_Custom_FrameCornerWidth));
+ break;
+ case 0: /* center */
+ default:
+ break;
+ }
+ }
+ break;
}
- return retColor;
+ if (flags & (QS60StylePrivate::SF_PointEast | QS60StylePrivate::SF_PointWest)) {
+ const int temp = result.width();
+ result.setWidth(result.height());
+ result.setHeight(temp);
+ }
+ return result;
}
/*!
@@ -793,8 +773,6 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom
const QS60StylePrivate::SkinElementFlags flags = (option->state & State_Enabled) ? QS60StylePrivate::SF_StateEnabled : QS60StylePrivate::SF_StateDisabled;
SubControls sub = option->subControls;
- Q_D(const QS60Style);
-
switch (control) {
#ifndef QT_NO_SCROLLBAR
case CC_ScrollBar:
@@ -807,18 +785,18 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom
const QS60StylePrivate::SkinElements grooveElement =
horizontal ? QS60StylePrivate::SE_ScrollBarGrooveHorizontal : QS60StylePrivate::SE_ScrollBarGrooveVertical;
QS60StylePrivate::drawSkinElement(grooveElement, painter, grooveRect, flags);
-
- QStyle::SubControls subControls = optionSlider->subControls;
-
+
+ QStyle::SubControls subControls = optionSlider->subControls;
+
// select correct slider (horizontal/vertical/pressed)
const bool sliderPressed = ((optionSlider->state & QStyle::State_Sunken) && (subControls & SC_ScrollBarSlider));
const QS60StylePrivate::SkinElements handleElement =
- horizontal ?
- ( sliderPressed ?
- QS60StylePrivate::SE_ScrollBarHandlePressedHorizontal :
- QS60StylePrivate::SE_ScrollBarHandleHorizontal ) :
- ( sliderPressed ?
- QS60StylePrivate::SE_ScrollBarHandlePressedVertical :
+ horizontal ?
+ ( sliderPressed ?
+ QS60StylePrivate::SE_ScrollBarHandlePressedHorizontal :
+ QS60StylePrivate::SE_ScrollBarHandleHorizontal ) :
+ ( sliderPressed ?
+ QS60StylePrivate::SE_ScrollBarHandlePressedVertical :
QS60StylePrivate::SE_ScrollBarHandleVertical);
QS60StylePrivate::drawSkinElement(handleElement, painter, scrollBarSlider, flags);
}
@@ -864,7 +842,6 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom
const bool direction = cmb->direction == Qt::LeftToRight;
// Button frame
- //todo: why calc rect here for button? Is there no suitable SE_xxx for that?
QStyleOptionFrame buttonOption;
buttonOption.QStyleOption::operator=(*cmb);
const int maxHeight = cmbxFrame.height();
@@ -874,20 +851,14 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom
buttonOption.rect = buttonRect;
buttonOption.state = cmb->state & (State_Enabled | State_MouseOver);
drawPrimitive(PE_PanelButtonCommand, &buttonOption, painter, widget);
- // todo: we could draw qgn_prop_set_button skin item here
// draw label background - label itself is drawn separately
const QS60StylePrivate::SkinElements skinElement = QS60StylePrivate::SE_FrameLineEdit;
QS60StylePrivate::drawSkinElement(skinElement, painter, cmbxEditField, flags);
if (sub & SC_ComboBoxArrow) {
- const int iconRectWidth = buttonOption.rect.width()>>1;
- const int nudgeWidth = iconRectWidth>>1;
-
// Draw the little arrow
- const QRect arrowRect(((buttonOption.rect.left()+buttonOption.rect.right())>>1) - nudgeWidth,
- buttonOption.rect.center().y()-(buttonOption.rect.height()>>2)+nudgeWidth, iconRectWidth, iconRectWidth);
-
+ buttonOption.rect.adjust(1, 1, -1, -1);
painter->save();
painter->setPen(option->palette.buttonText().color());
drawPrimitive(PE_IndicatorSpinDown, &buttonOption, painter, widget);
@@ -1129,18 +1100,15 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom
}
break;
#endif //QT_NO_GROUPBOX
-
- //todo: remove non-used complex widgets in final version
- case CC_TitleBar:
-#ifdef QT3_SUPPORT
- case CC_Q3ListView:
-#endif //QT3_SUPPORT
#ifndef QT_NO_DIAL
case CC_Dial:
+ if (const QStyleOptionSlider *slider = qstyleoption_cast<const QStyleOptionSlider *>(option)) {
+ QStyleOptionSlider optionSlider = *slider;
+ QCommonStyle::drawComplexControl(control, &optionSlider, painter, widget);
+ }
+ break;
#endif //QT_NO_DIAL
-#ifndef QT_NO_WORKSPACE
- case CC_MdiControls:
-#endif //QT_NO_WORKSPACE
+
default:
QCommonStyle::drawComplexControl(control, option, painter, widget);
}
@@ -1161,21 +1129,6 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
QStyleOptionButton subopt = *btn;
subopt.rect = subElementRect(SE_PushButtonContents, btn, widget);
- if (const QAbstractButton *buttonWidget = (qobject_cast<const QAbstractButton *>(widget))) {
- if (buttonWidget->isCheckable()) {
- QStyleOptionButton checkopt = subopt;
-
- const int indicatorHeight(pixelMetric(PM_IndicatorHeight));
- const int verticalAdjust = (option->rect.height() - indicatorHeight) >> 1;
-
- checkopt.rect.adjust(pixelMetric(PM_ButtonMargin), verticalAdjust, 0, 0);
- checkopt.rect.setWidth(pixelMetric(PM_IndicatorWidth));
- checkopt.rect.setHeight(indicatorHeight);
-
- drawPrimitive(PE_IndicatorCheckBox, &checkopt, painter, widget);
- }
- }
-
drawControl(CE_PushButtonLabel, &subopt, painter, widget);
if (btn->state & State_HasFocus) {
QStyleOptionFocusRect fropt;
@@ -1187,29 +1140,35 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
break;
case CE_PushButtonBevel:
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
- const bool isPressed = option->state & QStyle::State_Sunken;
- if (button->features & QStyleOptionButton::Flat) {
- const QS60StyleEnums::SkinParts skinPart =
- isPressed ? QS60StyleEnums::SP_QsnFrButtonTbCenterPressed : QS60StyleEnums::SP_QsnFrButtonTbCenter;
- QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags);
+ const bool isDisabled = !(option->state & QStyle::State_Enabled);
+ const bool isFlat = button->features & QStyleOptionButton::Flat;
+ QS60StyleEnums::SkinParts skinPart;
+ QS60StylePrivate::SkinElements skinElement;
+ if (!isDisabled) {
+ const bool isPressed = (option->state & QStyle::State_Sunken) ||
+ (option->state & QStyle::State_On);
+ if (isFlat) {
+ skinPart =
+ isPressed ? QS60StyleEnums::SP_QsnFrButtonTbCenterPressed : QS60StyleEnums::SP_QsnFrButtonTbCenter;
+ } else {
+ skinElement =
+ isPressed ? QS60StylePrivate::SE_ButtonPressed : QS60StylePrivate::SE_ButtonNormal;
+ }
} else {
- const QS60StylePrivate::SkinElements skinElement =
- isPressed ? QS60StylePrivate::SE_ButtonPressed : QS60StylePrivate::SE_ButtonNormal;
+ if (isFlat)
+ skinPart =QS60StyleEnums::SP_QsnFrButtonCenterInactive;
+ else
+ skinElement = QS60StylePrivate::SE_ButtonInactive;
+ }
+ if (isFlat)
+ QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags);
+ else
QS60StylePrivate::drawSkinElement(skinElement, painter, option->rect, flags);
}
- }
break;
case CE_PushButtonLabel:
if (const QStyleOptionButton *button = qstyleoption_cast<const QStyleOptionButton *>(option)) {
QStyleOptionButton optionButton = *button;
-
- if (const QAbstractButton *buttonWidget = (qobject_cast<const QAbstractButton *>(widget))) {
- if (buttonWidget->isCheckable()) {
- // space for check box.
- optionButton.rect.adjust(pixelMetric(PM_IndicatorWidth)
- + pixelMetric(PM_ButtonMargin) + pixelMetric(PM_CheckBoxLabelSpacing), 0, 0, 0);
- }
- }
QCommonStyle::drawControl(element, &optionButton, painter, widget);
}
break;
@@ -1229,13 +1188,13 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
case CE_ToolButtonLabel:
if (const QStyleOptionToolButton *toolBtn = qstyleoption_cast<const QStyleOptionToolButton *>(option)) {
QStyleOptionToolButton optionToolButton = *toolBtn;
-
- if (!optionToolButton.icon.isNull() && (optionToolButton.state & QStyle::State_Sunken)
+
+ if (!optionToolButton.icon.isNull() && (optionToolButton.state & QStyle::State_Sunken)
&& (optionToolButton.state & State_Enabled)) {
-
+
const QIcon::State state = optionToolButton.state & State_On ? QIcon::On : QIcon::Off;
const QPixmap pm(optionToolButton.icon.pixmap(optionToolButton.rect.size().boundedTo(optionToolButton.iconSize),
- QIcon::Normal, state));
+ QIcon::Normal, state));
optionToolButton.icon = generatedIconPixmap(QIcon::Selected, pm, &optionToolButton);
}
@@ -1320,21 +1279,24 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
const QRect iconRect = subElementRect(SE_ItemViewItemDecoration, &voptAdj, widget);
QRect textRect = subElementRect(SE_ItemViewItemText, &voptAdj, widget);
- // draw the background
- const QStyleOptionViewItemV4 *tableOption = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option);
- const QTableView *table = qobject_cast<const QTableView *>(widget);
- if (table && tableOption) {
- const QModelIndex index = tableOption->index;
- //todo: Draw cell background only once - for the first cell.
- QStyleOptionViewItemV4 voptAdj2 = voptAdj2;
- const QModelIndex indexFirst = table->model()->index(0,0);
- const QModelIndex indexLast = table->model()->index(
- table->model()->rowCount()-1,table->model()->columnCount()-1);
- if (table->viewport())
- voptAdj2.rect = QRect( table->visualRect(indexFirst).topLeft(),
- table->visualRect(indexLast).bottomRight()).intersect(table->viewport()->rect());
- drawPrimitive(PE_PanelItemViewItem, &voptAdj2, painter, widget);
- }
+ // draw themed background for table unless background brush has been defined.
+ if (vopt->backgroundBrush == Qt::NoBrush) {
+ // draw the background
+ const QStyleOptionViewItemV4 *tableOption = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option);
+ const QTableView *table = qobject_cast<const QTableView *>(widget);
+ if (table && tableOption) {
+ const QModelIndex index = tableOption->index;
+ //todo: Draw cell background only once - for the first cell.
+ QStyleOptionViewItemV4 voptAdj2 = voptAdj2;
+ const QModelIndex indexFirst = table->model()->index(0,0);
+ const QModelIndex indexLast = table->model()->index(
+ table->model()->rowCount()-1,table->model()->columnCount()-1);
+ if (table->viewport())
+ voptAdj2.rect = QRect( table->visualRect(indexFirst).topLeft(),
+ table->visualRect(indexLast).bottomRight()).intersect(table->viewport()->rect());
+ drawPrimitive(PE_PanelItemViewItem, &voptAdj2, painter, widget);
+ }
+ } else { QCommonStyle::drawPrimitive(PE_PanelItemViewItem, option, painter, widget);}
// draw the focus rect
if (isSelected)
@@ -1444,7 +1406,6 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
const int tabOverlap =
QS60StylePrivate::pixelMetric(QStyle::PM_TabBarTabOverlap) - borderThickness;
//todo: draw navi wipe behind tabbar - must be drawn with first draw
- //QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_TableHeaderItem, painter, windowRect, flags);
if (skinElement==QS60StylePrivate::SE_TabBarTabEastInactive||
skinElement==QS60StylePrivate::SE_TabBarTabEastActive||
@@ -1721,7 +1682,6 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
break;
#endif //QT_NO_MENU
- //todo: remove non-used widgets in final version
case CE_MenuEmptyArea:
#ifndef QT_NO_MENUBAR
case CE_MenuBarEmptyArea:
@@ -1830,6 +1790,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option,
break;
#endif //QT_NO_TOOLBAR
+ //todo: remove non-used widgets in final version
case CE_ShapedFrame:
case CE_MenuVMargin:
case CE_MenuHMargin:
@@ -1919,8 +1880,12 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
drawPrimitive(PE_IndicatorCheckBox, option, painter, widget);
// ... or normal "tick" selection at the end.
} else if (option->state & QStyle::State_Selected) {
+ QRect tickRect = option->rect;
+ const int frameBorderWidth = QS60StylePrivate::pixelMetric(PM_Custom_FrameCornerWidth);
+ // adjust tickmark rect to exclude frame border
+ tickRect.adjust(0,-frameBorderWidth,0,-frameBorderWidth);
QS60StyleEnums::SkinParts skinPart = QS60StyleEnums::SP_QgnIndiMarkedAdd;
- QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect,
+ QS60StylePrivate::drawSkinPart(skinPart, painter, tickRect,
(flags | QS60StylePrivate::SF_ColorSkinned));
}
}
@@ -1964,70 +1929,43 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
case PE_IndicatorArrowRight:
case PE_IndicatorArrowUp:
{
- if (option->rect.width() <= 1 || option->rect.height() <= 1)
- break;
- QRect r = option->rect;
- int size = qMin(r.height(), r.width());
- int border = size/5;
- int sqsize = 2*(size>>1);
- QImage image(sqsize, sqsize, QImage::Format_ARGB32);
- image.fill(Qt::transparent);
- QPainter imagePainter(&image);
-
- QPolygon a;
- int halfsqsize = sqsize>>1;
- int borderlessSqSize = sqsize - border;
- switch (element) {
- case PE_IndicatorArrowUp:
- a.setPoints(3, border, halfsqsize, halfsqsize, border, borderlessSqSize, halfsqsize);
- break;
- case PE_IndicatorArrowDown:
- a.setPoints(3, border, halfsqsize, halfsqsize, borderlessSqSize, borderlessSqSize, halfsqsize);
- break;
- case PE_IndicatorArrowRight:
- a.setPoints(3, borderlessSqSize, halfsqsize, halfsqsize, border, halfsqsize, borderlessSqSize);
- break;
- case PE_IndicatorArrowLeft:
- a.setPoints(3, border, halfsqsize, halfsqsize, border, halfsqsize, borderlessSqSize);
- break;
- default:
- break;
- }
-
- int bsx = 0;
- int bsy = 0;
-
- if (option->state & State_Sunken) {
- bsx = pixelMetric(PM_ButtonShiftHorizontal);
- bsy = pixelMetric(PM_ButtonShiftVertical);
- }
-
- QRect bounds = a.boundingRect();
- int sx = halfsqsize - bounds.center().x() - 1;
- int sy = halfsqsize - bounds.center().y() - 1;
- QPalette themeColor = option->palette;
- imagePainter.translate(sx + bsx, sy + bsy);
- imagePainter.setPen(themeColor.buttonText().color());
-
- if (!(option->state & State_Enabled)) {
- imagePainter.translate(1, 1);
- imagePainter.setPen(themeColor.light().color());
- imagePainter.drawPolygon(a);
- imagePainter.translate(-1, -1);
- imagePainter.setPen(themeColor.mid().color());
- }
- imagePainter.drawPolygon(a);
- imagePainter.end();
- int xOffset = r.x() + ((r.width() - size)>>1);
- int yOffset = r.y() + ((r.height() - size)>>1);
-
- painter->drawImage(xOffset, yOffset, image);
+ QS60StyleEnums::SkinParts skinPart;
+ if (element==PE_IndicatorArrowDown)
+ skinPart = QS60StyleEnums::SP_QgnGrafScrollArrowDown;
+ else if (element==PE_IndicatorArrowLeft)
+ skinPart = QS60StyleEnums::SP_QgnGrafScrollArrowLeft;
+ else if (element==PE_IndicatorArrowRight)
+ skinPart = QS60StyleEnums::SP_QgnGrafScrollArrowRight;
+ else if (element==PE_IndicatorArrowUp)
+ skinPart = QS60StyleEnums::SP_QgnGrafScrollArrowUp;
+
+ QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags);
}
break;
#endif //QT_NO_TOOLBUTTON
#ifndef QT_NO_SPINBOX
case PE_IndicatorSpinDown:
case PE_IndicatorSpinUp:
+ if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
+ QStyleOptionSpinBox optionSpinBox = *spinBox;
+ const QS60StyleEnums::SkinParts part = (element == PE_IndicatorSpinUp) ?
+ QS60StyleEnums::SP_QgnGrafScrollArrowUp :
+ QS60StyleEnums::SP_QgnGrafScrollArrowDown;
+ const int adjustment = qMin(optionSpinBox.rect.width(), optionSpinBox.rect.height())/6;
+ optionSpinBox.rect.translate(0, (element == PE_IndicatorSpinDown) ? adjustment : -adjustment );
+ QS60StylePrivate::drawSkinPart(part, painter, optionSpinBox.rect,flags);
+ }
+#ifndef QT_NO_COMBOBOX
+ else if (const QStyleOptionFrame *cmb = qstyleoption_cast<const QStyleOptionFrame *>(option)) {
+ // We want to draw down arrow here for comboboxes as well.
+ const QS60StyleEnums::SkinParts part = QS60StyleEnums::SP_QgnGrafScrollArrowDown;
+ QStyleOptionFrame comboBox = *cmb;
+ const int adjustment = qMin(comboBox.rect.width(), comboBox.rect.height())/6;
+ comboBox.rect.translate(0, (element == PE_IndicatorSpinDown) ? adjustment : -adjustment );
+ QS60StylePrivate::drawSkinPart(part, painter, comboBox.rect,flags);
+ }
+#endif //QT_NO_COMBOBOX
+ break;
case PE_IndicatorSpinMinus:
case PE_IndicatorSpinPlus:
if (const QStyleOptionSpinBox *spinBox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
@@ -2075,7 +2013,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
}
break;
case PE_Widget:
- if (QS60StylePrivate::isSkinnableDialog(widget) ||
+ if (QS60StylePrivate::drawsOwnThemeBackground(widget) ||
qobject_cast<const QComboBoxListView *>(widget) ||
qobject_cast<const QMenu *> (widget)) {
QS60StylePrivate::SkinElements skinElement = QS60StylePrivate::SE_OptionsMenu;
@@ -2170,30 +2108,27 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti
drawSkinPart = true;
}
- if ( drawSkinPart ) {
- QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect,
- (flags | QS60StylePrivate::SF_ColorSkinned));
- }
-
+ if ( drawSkinPart )
+ QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags);
+
if (option->state & State_Children) {
- QS60StyleEnums::SkinParts skinPart =
- (option->state & State_Open) ? QS60StyleEnums::SP_QgnIndiHlColSuper : QS60StyleEnums::SP_QgnIndiHlExpSuper;
+ QS60StyleEnums::SkinParts skinPart =
+ (option->state & State_Open) ? QS60StyleEnums::SP_QgnIndiHlColSuper : QS60StyleEnums::SP_QgnIndiHlExpSuper;
int minDimension = qMin(option->rect.width(), option->rect.height());
const int resizeValue = minDimension >> 1;
minDimension += resizeValue; // Adjust the icon bigger because of empty space in svg icon.
QRect iconRect(option->rect.topLeft(), QSize(minDimension, minDimension));
int verticalMagic(0);
// magic values for positioning svg icon.
- if (option->rect.width() <= option->rect.height())
- verticalMagic = 3;
+ if (option->rect.width() <= option->rect.height())
+ verticalMagic = 3;
iconRect.translate(3, verticalMagic - resizeValue);
- iconRect.adjust(-3,5,0,0);
- QS60StylePrivate::drawSkinPart(skinPart, painter, iconRect, flags);
- }
+ QS60StylePrivate::drawSkinPart(skinPart, painter, iconRect, flags);
+ }
+ }
}
- }
- break;
-
+ break;
+
// todo: items are below with #ifdefs "just in case". in final version, remove all non-required cases
case PE_FrameLineEdit:
case PE_IndicatorButtonDropDown:
@@ -2261,7 +2196,7 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
case CT_PushButton:
sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget);
if (const QAbstractButton *buttonWidget = (qobject_cast<const QAbstractButton *>(widget)))
- if (buttonWidget->isCheckable())
+ if (buttonWidget->isCheckable())
sz += QSize(pixelMetric(PM_IndicatorWidth) + pixelMetric(PM_CheckBoxLabelSpacing), 0);
break;
case CT_LineEdit:
@@ -2305,6 +2240,8 @@ int QS60Style::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w
case SH_ComboBox_PopupFrameStyle:
retValue = QFrame::NoFrame;
break;
+ case SH_Dial_BackgroundRole:
+ retValue = QPalette::Base;
default:
break;
}
@@ -2388,10 +2325,8 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
case CC_SpinBox:
if (const QStyleOptionSpinBox *spinbox = qstyleoption_cast<const QStyleOptionSpinBox *>(option)) {
const int frameThickness = spinbox->frame ? pixelMetric(PM_SpinBoxFrameWidth, spinbox, widget) : 0;
- const int buttonMargin = 2; //spinbox->frame ? /*QS60StylePrivate::pixelMetric(QStyle::PM_ButtonMargin)*/2 : 0;
- const int buttonWidth =
- QS60StylePrivate::pixelMetric(QStyle::PM_ButtonIconSize) + 2*buttonMargin;
- //todo: buttonMargin commented out as WAY too big in pixel metrics
+ const int buttonMargin = spinbox->frame ? 2 : 0;
+ const int buttonWidth = QS60StylePrivate::pixelMetric(QStyle::PM_ButtonIconSize) + 2*buttonMargin;
QSize buttonSize;
buttonSize.setHeight(qMax(8, spinbox->rect.height() - frameThickness));
buttonSize.setWidth(buttonWidth);
@@ -2439,8 +2374,7 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
ret = cmb->rect;
const int width = cmb->rect.width();
const int height = cmb->rect.height();
- //todo: buttonMargin commented out as WAY too big in pixel metrics
- const int buttonMargin = cmb->frame ? /*QS60StylePrivate::pixelMetric(QStyle::PM_ButtonMargin)*/2 : 0;
+ const int buttonMargin = cmb->frame ? 2 : 0;
// lets use spinbox frame here as well, as no combobox specific value available.
const int frameThickness = cmb->frame ? pixelMetric(PM_SpinBoxFrameWidth, cmb, widget) : 0;
const int buttonWidth = QS60StylePrivate::pixelMetric(QStyle::PM_ButtonIconSize);
@@ -2478,7 +2412,6 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
//slightly indent text and boxes, so that dialog border does not mess with them.
const int horizontalSpacing =
QS60StylePrivate::pixelMetric(QStyle::PM_LayoutHorizontalSpacing);
- const int bottomMargin = QS60StylePrivate::pixelMetric(QStyle::PM_LayoutBottomMargin);
ret.adjust(2,horizontalSpacing-3,0,0);
break;
case SC_GroupBoxFrame: {
@@ -2509,7 +2442,6 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
case SE_LineEditContents: {
// in S60 the input text box doesn't start from line Edit's TL, but
// a bit indented.
- // todo: Should we NOT do this for combo boxes and spin boxes?
QRect lineEditRect = opt->rect;
int adjustment = opt->rect.height()>>2;
lineEditRect.adjust(adjustment,0,0,0);
@@ -2583,13 +2515,10 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
}
} else if (const QStyleOptionMenuItem *menuItem = qstyleoption_cast<const QStyleOptionMenuItem *>(opt)) {
const bool checkable = menuItem->checkType != QStyleOptionMenuItem::NotCheckable;
- const bool subMenu = menuItem->menuItemType == QStyleOptionMenuItem::SubMenu;
int indicatorWidth = checkable ?
pixelMetric(PM_ListViewIconSize, opt, widget) :
pixelMetric(PM_SmallIconSize, opt, widget);
ret = menuItem->rect;
- const int verticalSpacing =
- QS60StylePrivate::pixelMetric(QStyle::PM_LayoutVerticalSpacing);
if (element == SE_ItemViewItemDecoration) {
if (menuItem->direction == Qt::RightToLeft)
@@ -2673,6 +2602,87 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con
return ret;
}
+void QS60Style::polish(QWidget *widget)
+{
+ Q_D(const QS60Style);
+ QCommonStyle::polish(widget);
+
+ if (!widget)
+ return;
+
+ if (false
+#ifndef QT_NO_SCROLLBAR
+ || qobject_cast<QScrollBar *>(widget)
+#endif
+ ) {
+ widget->setAttribute(Qt::WA_OpaquePaintEvent, false);
+ }
+
+ if (QS60StylePrivate::drawsOwnThemeBackground(widget)) {
+ widget->setAttribute(Qt::WA_StyledBackground);
+ } else if (false
+#ifndef QT_NO_MENU
+ || qobject_cast<const QMenu *> (widget)
+#endif // QT_NO_MENU
+ ) {
+ widget->setAttribute(Qt::WA_StyledBackground);
+ } else if (false
+#ifndef QT_NO_COMBOBOX
+ || qobject_cast<const QComboBoxListView *>(widget)
+#endif //QT_NO_COMBOBOX
+ ) {
+ widget->setAttribute(Qt::WA_StyledBackground);
+ }
+ d->setThemePalette(widget);
+}
+
+void QS60Style::unpolish(QWidget *widget)
+{
+ if (false
+ #ifndef QT_NO_SCROLLBAR
+ || qobject_cast<QScrollBar *>(widget)
+ #endif
+ ) {
+ widget->setAttribute(Qt::WA_OpaquePaintEvent);
+ }
+
+ if (QS60StylePrivate::drawsOwnThemeBackground(widget)) {
+ widget->setAttribute(Qt::WA_StyledBackground, false);
+ } else if (false
+#ifndef QT_NO_MENU
+ || qobject_cast<const QMenu *> (widget)
+#endif // QT_NO_MENU
+ ) {
+ widget->setAttribute(Qt::WA_StyledBackground, false);
+ } else if (false
+#ifndef QT_NO_COMBOBOX
+ || qobject_cast<const QComboBoxListView *>(widget)
+#endif //QT_NO_COMBOBOX
+ ) {
+ widget->setAttribute(Qt::WA_StyledBackground, false);
+ }
+
+ if (widget) {
+ widget->setPalette(QPalette());
+ }
+
+ QCommonStyle::unpolish(widget);
+}
+
+void QS60Style::polish(QApplication *application)
+{
+ Q_D(const QS60Style);
+ originalPalette = application->palette();
+ d->setThemePalette(application);
+}
+
+void QS60Style::unpolish(QApplication *application)
+{
+ QPalette newPalette = qApp->style()->standardPalette();
+ application->setPalette(newPalette);
+ QApplicationPrivate::setSystemPalette(originalPalette);
+}
+
void QS60Style::setStyleProperty(const char *name, const QVariant &value)
{
Q_D(QS60Style);
diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h
index e0b3a2a..ba7dca3 100644
--- a/src/gui/styles/qs60style_p.h
+++ b/src/gui/styles/qs60style_p.h
@@ -79,6 +79,10 @@ public:
SP_QgnGrafBarFrameSideL,
SP_QgnGrafBarFrameSideR,
SP_QgnGrafBarProgress,
+ SP_QgnGrafScrollArrowDown,
+ SP_QgnGrafScrollArrowLeft,
+ SP_QgnGrafScrollArrowRight,
+ SP_QgnGrafScrollArrowUp,
SP_QgnGrafTabActiveL,
SP_QgnGrafTabActiveM,
SP_QgnGrafTabActiveR,
@@ -109,7 +113,7 @@ public:
SP_QgnPropFolderCurrent,
SP_QgnPropFolderSmall,
SP_QgnPropFolderSmallNew,
- SP_QgnPropPhoneMemcLarge,
+ SP_QgnPropPhoneMemcLarge,
SP_QsnCpScrollHandleBottomPressed, //ScrollBar handle, pressed state
SP_QsnCpScrollHandleMiddlePressed,
SP_QsnCpScrollHandleTopPressed,
@@ -227,7 +231,16 @@ public:
SP_QsnFrSctrlButtonSideBPressed,
SP_QsnFrSctrlButtonSideLPressed,
SP_QsnFrSctrlButtonSideRPressed,
- SP_QsnFrSctrlButtonCenterPressed
+ SP_QsnFrSctrlButtonCenterPressed,
+ SP_QsnFrButtonCornerTlInactive, // Inactive button
+ SP_QsnFrButtonCornerTrInactive,
+ SP_QsnFrButtonCornerBlInactive,
+ SP_QsnFrButtonCornerBrInactive,
+ SP_QsnFrButtonSideTInactive,
+ SP_QsnFrButtonSideBInactive,
+ SP_QsnFrButtonSideLInactive,
+ SP_QsnFrButtonSideRInactive,
+ SP_QsnFrButtonCenterInactive
};
enum ColorLists {
@@ -288,6 +301,7 @@ public:
SE_PanelBackground,
SE_ScrollBarHandlePressedHorizontal, //only for 5.0+
SE_ScrollBarHandlePressedVertical,
+ SE_ButtonInactive,
};
enum SkinFrameElements {
@@ -303,7 +317,8 @@ public:
SF_ToolBar,
SF_ToolBarButton,
SF_ToolBarButtonPressed,
- SF_PanelBackground
+ SF_PanelBackground,
+ SF_ButtonInactive,
};
enum SkinElementFlag {
@@ -316,6 +331,13 @@ public:
SF_StateDisabled = 0x0020,
SF_ColorSkinned = 0x0040,
};
+
+ enum CacheClearReason {
+ CC_UndefinedChange = 0,
+ CC_LayoutChange,
+ CC_ThemeChange
+ };
+
Q_DECLARE_FLAGS(SkinElementFlags, SkinElementFlag)
// draws skin element
@@ -340,14 +362,18 @@ public:
int index, const QStyleOption *option);
// gets state specific color
static QColor stateColor(const QColor &color, const QStyleOption *option);
+ // gets lighter color than base color
static QColor lighterColor(const QColor &baseColor);
- static bool isSkinnableDialog(const QWidget *widget);
+ //deduces if the given widget should have separately themeable background
+ static bool drawsOwnThemeBackground(const QWidget *widget);
// gets layout
static const QHash<QStyle::PixelMetric, int> &s60StyleLayout();
QFont s60Font(QS60StyleEnums::FontCategories fontCategory,
int pointSize = -1) const;
- void clearCaches();
+ // clears all style caches (fonts, colors, pixmaps)
+ void clearCaches(CacheClearReason reason = CC_UndefinedChange);
+ // returns themed background texture
static QPixmap backgroundTexture();
static bool isTouchSupported();
@@ -356,6 +382,7 @@ public:
// calculates average color based on button skin graphics (minus borders).
QColor colorFromFrameGraphics(QS60StylePrivate::SkinFrameElements frame) const;
void setThemePalette(QApplication *application) const;
+ void setThemePalette(QWidget *widget) const;
void setBackgroundTexture(QApplication *application) const;
static int focusRectPenWidth();
@@ -393,19 +420,20 @@ private:
static void drawFrame(SkinFrameElements frame, QPainter *painter,
const QRect &rect, SkinElementFlags flags = KDefaultSkinElementFlags);
- static QSize partSize(QS60StyleEnums::SkinParts part,
- SkinElementFlags flags = KDefaultSkinElementFlags);
- static QPixmap part(QS60StyleEnums::SkinParts part, const QSize &size,
- SkinElementFlags flags = KDefaultSkinElementFlags);
static QPixmap cachedPart(QS60StyleEnums::SkinParts part, const QSize &size,
SkinElementFlags flags = KDefaultSkinElementFlags);
static QPixmap cachedFrame(SkinFrameElements frame, const QSize &size,
SkinElementFlags flags = KDefaultSkinElementFlags);
+
+ static void refreshUI();
+
+ static QSize partSize(QS60StyleEnums::SkinParts part,
+ SkinElementFlags flags = KDefaultSkinElementFlags);
+ static QPixmap part(QS60StyleEnums::SkinParts part, const QSize &size,
+ SkinElementFlags flags = KDefaultSkinElementFlags);
static QFont s60Font_specific(QS60StyleEnums::FontCategories fontCategory, int pointSize);
- static void refreshUI();
-
static QSize screenSize();
static bool m_backgroundValid;
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp
index 17c1ebe..65336ae 100644
--- a/src/gui/styles/qs60style_simulated.cpp
+++ b/src/gui/styles/qs60style_simulated.cpp
@@ -191,6 +191,26 @@ QVariant QS60StylePrivate::styleProperty_specific(const char *name) const
return styleProperty(name);
}
+QPixmap QS60StylePrivate::backgroundTexture()
+{
+ static QPixmap result;
+ // Poor mans caching. + Making sure that there is always only one background image in memory at a time
+
+/*
+ TODO: 1) Hold the background QPixmap as pointer in a static class member.
+ Also add a deleteBackground() function and call that in ~QS60StylePrivate()
+ 2) Don't cache the background at all as soon as we have native pixmap support
+*/
+
+ if (!m_backgroundValid) {
+ result = QPixmap();
+ const QSize size = QApplication::activeWindow()?QApplication::activeWindow()->size():QSize(100, 100);
+ result = part(QS60StyleEnums::SP_QsnBgScreen, size);
+ m_backgroundValid = true;
+ }
+ return result;
+}
+
bool QS60StylePrivate::isTouchSupported()
{
#ifdef QT_KEYPAD_NAVIGATION
@@ -266,8 +286,10 @@ QStringList QS60Style::colorListKeys()
void QS60Style::setS60Theme(const QHash<QString, QPicture> &parts,
const QHash<QPair<QString , int>, QColor> &colors)
{
+ Q_D(QS60Style);
QS60StyleModeSpecifics::m_partPictures = parts;
QS60StyleModeSpecifics::m_colors = colors;
+ d->clearCaches(QS60StylePrivate::CC_ThemeChange);
}
QT_END_NAMESPACE
diff --git a/src/gui/styles/qs60style_symbian.cpp b/src/gui/styles/qs60style_symbian.cpp
index 199e7ff..3fc4c8c 100644
--- a/src/gui/styles/qs60style_symbian.cpp
+++ b/src/gui/styles/qs60style_symbian.cpp
@@ -80,6 +80,8 @@ public:
const QSize &size, QS60StylePrivate::SkinElementFlags flags);
static QColor colorValue(const TAknsItemID &colorGroup, int colorIndex);
static QPixmap fromFbsBitmap(CFbsBitmap *icon, CFbsBitmap *mask, QS60StylePrivate::SkinElementFlags flags, QImage::Format format);
+ static bool disabledPartGraphic(QS60StyleEnums::SkinParts &part);
+ static bool disabledFrameGraphic(QS60StylePrivate::SkinFrameElements &frame);
static QPixmap generateMissingThemeGraphic(QS60StyleEnums::SkinParts &part, const QSize &size, QS60StylePrivate::SkinElementFlags flags);
private:
@@ -108,6 +110,10 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QgnGrafBarFrameSideL */ {KAknsIIDQgnGrafBarFrameSideL, EDrawIcon, ES60_AllReleases, -1,-1},
/* SP_QgnGrafBarFrameSideR */ {KAknsIIDQgnGrafBarFrameSideR, EDrawIcon, ES60_AllReleases, -1,-1},
/* SP_QgnGrafBarProgress */ {KAknsIIDQgnGrafBarProgress, EDrawIcon, ES60_AllReleases, -1,-1},
+ /* SP_QgnGrafScrollArrowDown */ {KAknsIIDQgnGrafScrollArrowDown, EDrawIcon, ES60_AllReleases, -1,-1},
+ /* SP_QgnGrafScrollArrowLeft */ {KAknsIIDQgnGrafScrollArrowLeft, EDrawIcon, ES60_AllReleases, -1,-1},
+ /* SP_QgnGrafScrollArrowRight */ {KAknsIIDQgnGrafScrollArrowRight, EDrawIcon, ES60_AllReleases, -1,-1},
+ /* SP_QgnGrafScrollArrowUp */ {KAknsIIDQgnGrafScrollArrowUp, EDrawIcon, ES60_AllReleases, -1,-1},
/* SP_QgnGrafTabActiveL */ {KAknsIIDQgnGrafTabActiveL, EDrawIcon, ES60_AllReleases, -1,-1},
/* SP_QgnGrafTabActiveM */ {KAknsIIDQgnGrafTabActiveM, EDrawIcon, ES60_AllReleases, -1,-1},
/* SP_QgnGrafTabActiveR */ {KAknsIIDQgnGrafTabActiveR, EDrawIcon, ES60_AllReleases, -1,-1},
@@ -157,7 +163,7 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QsnCpScrollHandleMiddle */ {KAknsIIDQsnCpScrollHandleMiddle, EDrawIcon, ES60_AllReleases, -1,-1},
/* SP_QsnCpScrollHandleTop */ {KAknsIIDQsnCpScrollHandleTop, EDrawIcon, ES60_AllReleases, -1,-1},
- /* SP_QsnFrButtonTbCornerTl */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_AllReleases, -1,-1},
+ /* SP_QsnFrButtonTbCornerTl */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_AllReleases, -1,-1}, //todo: use "normal button" from 5.0 onwards
/* SP_QsnFrButtonTbCornerTr */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_AllReleases, -1,-1},
/* SP_QsnFrButtonTbCornerBl */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_AllReleases, -1,-1},
/* SP_QsnFrButtonTbCornerBr */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_AllReleases, -1,-1},
@@ -271,15 +277,27 @@ const partMapEntry QS60StyleModeSpecifics::m_partMap[] = {
/* SP_QsnFrSctrlButtonCenter */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2309}, /*KAknsIIDQgnFrSctrlButtonCenter*/
// No pressed state for toolbar button in 3.1/3.2.
- /* SP_QsnFrSctrlButtonCornerTlPressed */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2621}, /*KAknsIIDQsnFrSctrlButtonCornerTlPressed*/
- /* SP_QsnFrSctrlButtonCornerTrPressed */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2622},
- /* SP_QsnFrSctrlButtonCornerBlPressed */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2623},
- /* SP_QsnFrSctrlButtonCornerBrPressed */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2624},
- /* SP_QsnFrSctrlButtonSideTPressed */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2625},
- /* SP_QsnFrSctrlButtonSideBPressed */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2626},
- /* SP_QsnFrSctrlButtonSideLPressed */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2627},
- /* SP_QsnFrSctrlButtonSideRPressed */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2628},
- /* SP_QsnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2629}
+ /* SP_QsnFrSctrlButtonCornerTlPressed */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2621}, /*KAknsIIDQsnFrSctrlButtonCornerTlPressed*/
+ /* SP_QsnFrSctrlButtonCornerTrPressed */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2622},
+ /* SP_QsnFrSctrlButtonCornerBlPressed */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2623},
+ /* SP_QsnFrSctrlButtonCornerBrPressed */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2624},
+ /* SP_QsnFrSctrlButtonSideTPressed */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2625},
+ /* SP_QsnFrSctrlButtonSideBPressed */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2626},
+ /* SP_QsnFrSctrlButtonSideLPressed */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2627},
+ /* SP_QsnFrSctrlButtonSideRPressed */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2628},
+ /* SP_QsnFrSctrlButtonCenterPressed */ {KAknsIIDQsnFrButtonTbCenter, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x2629},
+
+ // No inactive button graphics in 3.1/3.2
+ /* SP_QsnFrButtonCornerTlInactive */ {KAknsIIDQsnFrButtonTbCornerTl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b1}, /*KAknsIIDQsnFrButtonCornerTlInactive*/
+ /* SP_QsnFrButtonCornerTrInactive */ {KAknsIIDQsnFrButtonTbCornerTr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b2},
+ /* SP_QsnFrButtonCornerBlInactive */ {KAknsIIDQsnFrButtonTbCornerBl, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b3},
+ /* SP_QsnFrButtonCornerTrInactive */ {KAknsIIDQsnFrButtonTbCornerBr, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b4},
+ /* SP_QsnFrButtonSideTInactive */ {KAknsIIDQsnFrButtonTbSideT, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b5},
+ /* SP_QsnFrButtonSideBInactive */ {KAknsIIDQsnFrButtonTbSideB, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b6},
+ /* SP_QsnFrButtonSideLInactive */ {KAknsIIDQsnFrButtonTbSideL, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b7},
+ /* SP_QsnFrButtonSideRInactive */ {KAknsIIDQsnFrButtonTbSideR, ENoDraw, ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b8},
+ /* SP_QsnFrButtonCenterInactive */ {KAknsIIDQsnFrButtonTbCenter, EDrawIcon,ES60_3_1 | ES60_3_2, EAknsMajorSkin, 0x21b9}
+
};
QPixmap QS60StyleModeSpecifics::skinnedGraphics(
@@ -319,7 +337,7 @@ QPixmap QS60StyleModeSpecifics::colorSkinnedGraphics(
}
void QS60StyleModeSpecifics::fallbackInfo(const QS60StyleEnums::SkinParts &stylepart, TDes& fallbackFileName, TInt& fallbackIndex)
-{
+{
switch(stylepart) {
case QS60StyleEnums::SP_QgnGrafBarWait:
fallbackFileName = KAvkonBitmapFile();
@@ -373,19 +391,19 @@ void QS60StyleModeSpecifics::fallbackInfo(const QS60StyleEnums::SkinParts &style
fallbackFileName = KAvkonBitmapFile();
fallbackIndex = EMbmAvkonQgn_indi_checkbox_on;
break;
- case QS60StyleEnums::SP_QgnIndiHlColSuper:
+ case QS60StyleEnums::SP_QgnIndiHlColSuper:
fallbackFileName = KAvkonBitmapFile();
fallbackIndex = 0x4456; /* EMbmAvkonQgn_indi_hl_col_super */
break;
- case QS60StyleEnums::SP_QgnIndiHlExpSuper:
+ case QS60StyleEnums::SP_QgnIndiHlExpSuper:
fallbackFileName = KAvkonBitmapFile();
fallbackIndex = 0x4458; /* EMbmAvkonQgn_indi_hl_exp_super */
break;
- case QS60StyleEnums::SP_QgnIndiHlLineBranch:
+ case QS60StyleEnums::SP_QgnIndiHlLineBranch:
fallbackFileName = KAvkonBitmapFile();
fallbackIndex = 0x445A; /* EMbmAvkonQgn_indi_hl_line_branch */
break;
- case QS60StyleEnums::SP_QgnIndiHlLineEnd:
+ case QS60StyleEnums::SP_QgnIndiHlLineEnd:
fallbackFileName = KAvkonBitmapFile();
fallbackIndex = 0x445C; /* EMbmAvkonQgn_indi_hl_line_end */
break;
@@ -482,8 +500,8 @@ QPixmap QS60StyleModeSpecifics::colorSkinnedGraphicsL(
TInt fallbackGraphicID = -1;
HBufC* iconFile = HBufC::NewLC( KMaxFileName );
TPtr fileNamePtr = iconFile->Des();
- fallbackInfo(stylepart, fileNamePtr, fallbackGraphicID);
-
+ fallbackInfo(stylepart, fileNamePtr, fallbackGraphicID);
+
TAknsItemID colorGroup = KAknsIIDQsnIconColors;
int colorIndex = 0;
colorGroupAndIndex(stylepart, colorGroup, colorIndex);
@@ -649,6 +667,7 @@ QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsL(
HBufC* iconFile = HBufC::NewLC( KMaxFileName );
TPtr fileNamePtr = iconFile->Des();
fallbackInfo(part, fileNamePtr, fallbackGraphicID);
+ // todo: could we instead use AknIconUtils::AvkonIconFileName(); to avoid allocating each time?
CFbsBitmap *icon = 0;
CFbsBitmap *iconMask = 0;
@@ -670,7 +689,6 @@ QPixmap QS60StyleModeSpecifics::createSkinnedGraphicsL(
CleanupStack::PushL(background);
User::LeaveIfError(background->Create(targetSize, EColor16MA));
- // todo: push background into CleanupStack
CFbsBitmapDevice* dev = CFbsBitmapDevice::NewL(background);
CleanupStack::PushL(dev);
CFbsBitGc* gc = NULL;
@@ -803,7 +821,7 @@ void QS60StyleModeSpecifics::frameIdAndCenterId(QS60StylePrivate::SkinFrameEleme
switch(frameElement) {
case QS60StylePrivate::SF_ToolTip:
- if (QSysInfo::s60Version()==QSysInfo::SV_S60_5_0 || QSysInfo::s60Version()==QSysInfo::SV_S60_3_2) {
+ if (QSysInfo::s60Version()!=QSysInfo::SV_S60_3_1) {
centerId.Set(EAknsMajorGeneric, 0x19c2);
frameId.Set(EAknsMajorSkin, 0x5300);
} else {
@@ -831,17 +849,19 @@ void QS60StyleModeSpecifics::frameIdAndCenterId(QS60StylePrivate::SkinFrameEleme
TRect QS60StyleModeSpecifics::innerRectFromElement(QS60StylePrivate::SkinFrameElements frameElement, const TRect &outerRect)
{
- TInt widthShrink = 0;
- TInt heightShrink = 0;
+ TInt widthShrink = QS60StylePrivate::pixelMetric(PM_Custom_FrameCornerWidth);
+ TInt heightShrink = QS60StylePrivate::pixelMetric(PM_Custom_FrameCornerHeight);
switch(frameElement) {
case QS60StylePrivate::SF_PanelBackground:
// panel should have slightly slimmer border to enable thin line of background graphics between closest component
- widthShrink = QS60StylePrivate::pixelMetric(PM_Custom_FrameCornerWidth)-2;
- heightShrink = QS60StylePrivate::pixelMetric(PM_Custom_FrameCornerHeight)-2;
+ widthShrink = widthShrink-2;
+ heightShrink = heightShrink-2;
+ break;
+ case QS60StylePrivate::SF_ToolTip:
+ widthShrink = widthShrink>>1;
+ heightShrink = heightShrink>>1;
break;
default:
- widthShrink = QS60StylePrivate::pixelMetric(PM_Custom_FrameCornerWidth);
- heightShrink = QS60StylePrivate::pixelMetric(PM_Custom_FrameCornerHeight);
break;
}
TRect innerRect(outerRect);
@@ -942,9 +962,8 @@ QFont QS60StylePrivate::s60Font_specific(
#ifdef QT_S60STYLE_LAYOUTDATA_SIMULATED
void QS60StylePrivate::setActiveLayout()
{
- //todo: how to find layouts that are of same size (QVGA1 vs. QVGA2)
const QSize activeScreenSize(screenSize());
- int activeLayoutIndex = 0;
+ int activeLayoutIndex = -1;
const bool mirrored = !QApplication::isLeftToRight();
const short screenHeight = (short)activeScreenSize.height();
const short screenWidth = (short)activeScreenSize.width();
@@ -956,6 +975,28 @@ void QS60StylePrivate::setActiveLayout()
break;
}
}
+
+ //not found, lets try without mirroring info
+ if (activeLayoutIndex==-1){
+ for (int i=0; i<m_numberOfLayouts; i++) {
+ if (screenHeight==m_layoutHeaders[i].height &&
+ screenWidth==m_layoutHeaders[i].width) {
+ activeLayoutIndex = i;
+ break;
+ }
+ }
+ }
+
+ //not found, lets try with either of dimensions
+ if (activeLayoutIndex==-1){
+ const QSysInfo::S60Version currentRelease = QSysInfo::s60Version();
+ const bool landscape = screenHeight < screenWidth;
+
+ activeLayoutIndex = (currentRelease == QSysInfo::SV_S60_3_1 || currentRelease == QSysInfo::SV_S60_3_2) ? 0 : 4;
+ activeLayoutIndex += (!landscape) ? 2 : 0;
+ activeLayoutIndex += (!mirrored) ? 1 : 0;
+ }
+
m_pmPointer = data[activeLayoutIndex];
}
#endif // QT_S60STYLE_LAYOUTDATA_SIMULATED
@@ -973,6 +1014,23 @@ QS60StylePrivate::~QS60StylePrivate()
m_backgroundValid = false;
}
+void QS60StylePrivate::setStyleProperty_specific(const char *name, const QVariant &value)
+{
+ if (name == QLatin1String("foo")) {
+ // BaR
+ } else {
+ setStyleProperty(name, value);
+ }
+}
+
+QVariant QS60StylePrivate::styleProperty_specific(const char *name) const
+{
+ if (name == QLatin1String("foo"))
+ return QLatin1String("Bar");
+ else
+ return styleProperty(name);
+}
+
short QS60StylePrivate::pixelMetric(int metric)
{
#ifdef QT_S60STYLE_LAYOUTDATA_SIMULATED
@@ -987,6 +1045,66 @@ short QS60StylePrivate::pixelMetric(int metric)
#endif // QT_S60STYLE_LAYOUTDATA_SIMULATED
}
+QColor QS60StylePrivate::s60Color(QS60StyleEnums::ColorLists list,
+ int index, const QStyleOption *option)
+{
+ static const TAknsItemID *idMap[] = {
+ &KAknsIIDQsnHighlightColors,
+ &KAknsIIDQsnIconColors,
+ &KAknsIIDQsnLineColors,
+ &KAknsIIDQsnOtherColors,
+ &KAknsIIDQsnParentColors,
+ &KAknsIIDQsnTextColors
+ };
+ Q_ASSERT((int)list <= (int)sizeof(idMap)/sizeof(idMap[0]));
+ const QColor color = QS60StyleModeSpecifics::colorValue(*idMap[(int) list], index - 1);
+ return option ? QS60StylePrivate::stateColor(color, option) : color;
+}
+
+// In some cases, the AVKON UI themegraphic is already in 'disabled state'.
+// If so, return true for these parts.
+bool QS60StyleModeSpecifics::disabledPartGraphic(QS60StyleEnums::SkinParts &part)
+{
+ bool disabledGraphic = false;
+ switch(part){
+ // inactive button graphics are available from 5.0 onwards
+ case QS60StyleEnums::SP_QsnFrButtonCornerTlInactive:
+ case QS60StyleEnums::SP_QsnFrButtonCornerTrInactive:
+ case QS60StyleEnums::SP_QsnFrButtonCornerBlInactive:
+ case QS60StyleEnums::SP_QsnFrButtonCornerBrInactive:
+ case QS60StyleEnums::SP_QsnFrButtonSideTInactive:
+ case QS60StyleEnums::SP_QsnFrButtonSideBInactive:
+ case QS60StyleEnums::SP_QsnFrButtonSideLInactive:
+ case QS60StyleEnums::SP_QsnFrButtonSideRInactive:
+ case QS60StyleEnums::SP_QsnFrButtonCenterInactive:
+ if (!(QSysInfo::s60Version()==QSysInfo::SV_S60_3_1 ||
+ QSysInfo::s60Version()==QSysInfo::SV_S60_3_2))
+ disabledGraphic = true;
+ break;
+ default:
+ break;
+ }
+ return disabledGraphic;
+}
+
+// In some cases, the AVKON UI themegraphic is already in 'disabled state'.
+// If so, return true for these frames.
+bool QS60StyleModeSpecifics::disabledFrameGraphic(QS60StylePrivate::SkinFrameElements &frame)
+{
+ bool disabledGraphic = false;
+ switch(frame){
+ // inactive button graphics are available from 5.0 onwards
+ case QS60StylePrivate::SF_ButtonInactive:
+ if (!(QSysInfo::s60Version()==QSysInfo::SV_S60_3_1 ||
+ QSysInfo::s60Version()==QSysInfo::SV_S60_3_2))
+ disabledGraphic = true;
+ break;
+ default:
+ break;
+ }
+ return disabledGraphic;
+}
+
QPixmap QS60StyleModeSpecifics::generateMissingThemeGraphic(QS60StyleEnums::SkinParts &part,
const QSize &size, QS60StylePrivate::SkinElementFlags flags)
{
@@ -998,8 +1116,8 @@ QPixmap QS60StyleModeSpecifics::generateMissingThemeGraphic(QS60StyleEnums::Skin
// AVKON UI has a abnormal handling for scrollbar graphics. It is possible that the root
// skin does not contain mandatory graphics for scrollbar pressed states. Therefore, AVKON UI
// creates dynamically these graphics by modifying the normal state scrollbar graphics slightly.
- // S60Style needs to work similarly. Therefore if skingraphics call provides to be a miss
- // (i.e. result is not valid), style needs to draw normal graphics instead and apply some
+ // S60Style needs to work similarly. Therefore if skingraphics call provides to be a miss
+ // (i.e. result is not valid), style needs to draw normal graphics instead and apply some
// modifications (similar to generatedIconPixmap()) to the result.
case QS60StyleEnums::SP_QsnCpScrollHandleBottomPressed:
updatedPart = QS60StyleEnums::SP_QsnCpScrollHandleBottom;
@@ -1019,8 +1137,8 @@ QPixmap QS60StyleModeSpecifics::generateMissingThemeGraphic(QS60StyleEnums::Skin
QPixmap result = skinnedGraphics(updatedPart, size, flags);
// TODO: fix this
QStyleOption opt;
- // opt.palette = q->standardPalette();
-
+ //opt.palette = q->standardPalette();
+
// For now, always generate new icon based on "selected". In the future possibly, expand
// this to consist other possibilities as well.
result = QApplication::style()->generatedIconPixmap(QIcon::Selected, result, &opt);
@@ -1037,7 +1155,7 @@ QPixmap QS60StylePrivate::part(QS60StyleEnums::SkinParts part,
: QS60StyleModeSpecifics::skinnedGraphics(part, size, flags);
QS60WindowSurface::lockBitmapHeap();
- if (flags & SF_StateDisabled) {
+ if (flags & SF_StateDisabled && !QS60StyleModeSpecifics::disabledPartGraphic(part)) {
// TODO: fix this
QStyleOption opt;
// opt.palette = q->standardPalette();
@@ -1046,7 +1164,7 @@ QPixmap QS60StylePrivate::part(QS60StyleEnums::SkinParts part,
if (!result)
result = QS60StyleModeSpecifics::generateMissingThemeGraphic(part, size, flags);
-
+
return result;
}
@@ -1056,7 +1174,7 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size, Skin
QPixmap result = QS60StyleModeSpecifics::skinnedGraphics(frame, size, flags);
QS60WindowSurface::lockBitmapHeap();
- if (flags & SF_StateDisabled) {
+ if (flags & SF_StateDisabled && !QS60StyleModeSpecifics::disabledFrameGraphic(frame)) {
// TODO: fix this
QStyleOption opt;
// opt.palette = q->standardPalette();
@@ -1065,39 +1183,6 @@ QPixmap QS60StylePrivate::frame(SkinFrameElements frame, const QSize &size, Skin
return result;
}
-void QS60StylePrivate::setStyleProperty_specific(const char *name, const QVariant &value)
-{
- if (name == QLatin1String("foo")) {
- // BaR
- } else {
- setStyleProperty(name, value);
- }
-}
-
-QVariant QS60StylePrivate::styleProperty_specific(const char *name) const
-{
- if (name == QLatin1String("foo"))
- return QLatin1String("Bar");
- else
- return styleProperty(name);
-}
-
-QColor QS60StylePrivate::s60Color(QS60StyleEnums::ColorLists list,
- int index, const QStyleOption *option)
-{
- static const TAknsItemID *idMap[] = {
- &KAknsIIDQsnHighlightColors,
- &KAknsIIDQsnIconColors,
- &KAknsIIDQsnLineColors,
- &KAknsIIDQsnOtherColors,
- &KAknsIIDQsnParentColors,
- &KAknsIIDQsnTextColors
- };
- Q_ASSERT((int)list <= (int)sizeof(idMap)/sizeof(idMap[0]));
- const QColor color = QS60StyleModeSpecifics::colorValue(*idMap[(int) list], index - 1);
- return option ? QS60StylePrivate::stateColor(color, option) : color;
-}
-
// If the public SDK returns compressed images, please let us also uncompress those!
void QS60StyleModeSpecifics::unCompressBitmapL(const TRect& aTrgRect, CFbsBitmap* aTrgBitmap, CFbsBitmap* aSrcBitmap)
{
@@ -1249,17 +1334,15 @@ void QS60StyleModeSpecifics::colorGroupAndIndex(
{
switch(skinID) {
case QS60StyleEnums::SP_QgnIndiSubMenu:
- case QS60StyleEnums::SP_QgnIndiHlColSuper:
- case QS60StyleEnums::SP_QgnIndiHlExpSuper:
- case QS60StyleEnums::SP_QgnIndiHlLineBranch:
- case QS60StyleEnums::SP_QgnIndiHlLineEnd:
- case QS60StyleEnums::SP_QgnIndiHlLineStraight:
+ colorGroup = KAknsIIDQsnIconColors;
+ colorIndex = EAknsCIQsnIconColorsCG1;
+ break;
case QS60StyleEnums::SP_QgnIndiRadiobuttOff:
case QS60StyleEnums::SP_QgnIndiRadiobuttOn:
case QS60StyleEnums::SP_QgnIndiCheckboxOff:
case QS60StyleEnums::SP_QgnIndiCheckboxOn:
colorGroup = KAknsIIDQsnIconColors;
- colorIndex = EAknsCIQsnIconColorsCG1;
+ colorIndex = EAknsCIQsnIconColorsCG14;
break;
default:
break;
@@ -1269,7 +1352,7 @@ void QS60StyleModeSpecifics::colorGroupAndIndex(
void QS60Style::handleDynamicLayoutVariantSwitch()
{
Q_D(QS60Style);
- d->clearCaches();
+ d->clearCaches(QS60StylePrivate::CC_LayoutChange);
#ifdef QT_S60STYLE_LAYOUTDATA_SIMULATED
d->setActiveLayout();
#endif // QT_S60STYLE_LAYOUTDATA_SIMULATED
@@ -1282,11 +1365,12 @@ void QS60Style::handleDynamicLayoutVariantSwitch()
void QS60Style::handleSkinChange()
{
Q_D(QS60Style);
- d->clearCaches();
+ d->clearCaches(QS60StylePrivate::CC_ThemeChange);
d->setThemePalette(qApp);
foreach (QWidget *topLevelWidget, QApplication::allWidgets()){
QEvent e(QEvent::StyleChange);
QApplication::sendEvent(topLevelWidget, &e);
+ d->setThemePalette(topLevelWidget);
topLevelWidget->ensurePolished();
}
}
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index 5a97086..0bd2d9a 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -1162,13 +1162,20 @@ static bool setFontWeightFromValue(const Value &value, QFont *font)
return true;
}
-static bool setFontFamilyFromValues(const QVector<Value> &values, QFont *font)
+/** \internal
+ * parse the font family from the values (starting from index \a start)
+ * and set it the \a font
+ * \returns true if a family was extracted.
+ */
+static bool setFontFamilyFromValues(const QVector<Value> &values, QFont *font, int start = 0)
{
QString family;
- for (int i = 0; i < values.count(); ++i) {
+ for (int i = start; i < values.count(); ++i) {
const Value &v = values.at(i);
- if (v.type == Value::TermOperatorComma)
- break;
+ if (v.type == Value::TermOperatorComma) {
+ family += QLatin1Char(',');
+ continue;
+ }
const QString str = v.variant.toString();
if (str.isEmpty())
break;
@@ -1222,9 +1229,7 @@ static void parseShorthandFontProperty(const QVector<Value> &values, QFont *font
}
if (i < values.count()) {
- QString fam = values.at(i).variant.toString();
- if (!fam.isEmpty())
- font->setFamily(fam);
+ setFontFamilyFromValues(values, font, i);
}
}
diff --git a/src/gui/text/qfont.cpp b/src/gui/text/qfont.cpp
index 6ee1d03..4d316f6 100644
--- a/src/gui/text/qfont.cpp
+++ b/src/gui/text/qfont.cpp
@@ -1911,6 +1911,20 @@ void QFont::insertSubstitutions(const QString &familyName,
}
}
+/*! \fn void QFont::initialize()
+ \internal
+
+ Internal function that initializes the font system. The font cache
+ and font dict do not alloc the keys. The key is a QString which is
+ shared between QFontPrivate and QXFontName.
+*/
+
+/*! \fn void QFont::cleanup()
+ \internal
+
+ Internal function that cleans up the font system.
+*/
+
// ### mark: should be called removeSubstitutions()
/*!
Removes all the substitutions for \a familyName.
diff --git a/src/gui/text/qfont_x11.cpp b/src/gui/text/qfont_x11.cpp
index 710792c..6b0e46c 100644
--- a/src/gui/text/qfont_x11.cpp
+++ b/src/gui/text/qfont_x11.cpp
@@ -129,13 +129,6 @@ Q_GUI_EXPORT void qt_x11_set_fallback_font_family(int script, const QString &fam
int QFontPrivate::defaultEncodingID = -1;
-/*!
- Internal function that initializes the font system.
-
- \internal
- The font cache and font dict do not alloc the keys. The key is a QString
- which is shared between QFontPrivate and QXFontName.
-*/
void QFont::initialize()
{
extern int qt_encoding_id_for_mib(int mib); // from qfontdatabase_x11.cpp
@@ -184,10 +177,6 @@ void QFont::initialize()
QFontPrivate::defaultEncodingID = qt_encoding_id_for_mib(mib);
}
-/*! \internal
-
- Internal function that cleans up the font system.
-*/
void QFont::cleanup()
{
QFontCache::cleanup();
diff --git a/src/gui/text/qfontdatabase_x11.cpp b/src/gui/text/qfontdatabase_x11.cpp
index 15e626e..70e1599 100644
--- a/src/gui/text/qfontdatabase_x11.cpp
+++ b/src/gui/text/qfontdatabase_x11.cpp
@@ -494,7 +494,7 @@ static inline bool isFixedPitch(char **tokens)
Fills in a font definition (QFontDef) from an XLFD (X Logical Font
Description).
- Returns true if the the given xlfd is valid.
+ Returns true if the given xlfd is valid.
*/
bool qt_fillFontDef(const QByteArray &xlfd, QFontDef *fd, int dpi, QtFontDesc *desc)
{
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 7a236fd..6f5ee1f 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -613,7 +613,7 @@ QFontEngineFT::QFontEngineFT(const QFontDef &fd)
subpixelType = Subpixel_None;
lcdFilterType = 0;
#if defined(FT_LCD_FILTER_H)
- lcdFilterType = (int) FT_LCD_FILTER_DEFAULT;
+ lcdFilterType = (int)((quintptr) FT_LCD_FILTER_DEFAULT);
#endif
defaultFormat = Format_None;
canUploadGlyphsToServer = false;
diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm
index 425cab2..d397e4a 100644
--- a/src/gui/text/qfontengine_mac.mm
+++ b/src/gui/text/qfontengine_mac.mm
@@ -553,7 +553,9 @@ QImage QCoreTextFontEngine::alphaMapForGlyph(glyph_t glyph)
8, im.bytesPerLine(), colorspace,
cgflags);
CGContextSetFontSize(ctx, fontDef.pixelSize);
- CGContextSetShouldAntialias(ctx, fontDef.pointSize > qt_antialiasing_threshold && !(fontDef.styleStrategy & QFont::NoAntialias));
+ CGContextSetShouldAntialias(ctx, fontDef.pointSize > qt_antialiasing_threshold
+ && !(fontDef.styleStrategy & QFont::NoAntialias));
+ CGContextSetShouldSmoothFonts(ctx, false);
CGAffineTransform oldTextMatrix = CGContextGetTextMatrix(ctx);
CGAffineTransform cgMatrix = CGAffineTransformMake(1, 0, 0, 1, 0, 0);
diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp
index 1996d44..bf3a176 100644
--- a/src/gui/text/qfontengine_win.cpp
+++ b/src/gui/text/qfontengine_win.cpp
@@ -1406,8 +1406,8 @@ QNativeImage *QFontEngineWin::drawGDIGlyph(HFONT font, glyph_t glyph, int margin
#endif
#endif
- QNativeImage *ni = new QNativeImage(iw + 2 * margin,
- ih + 2 * margin,
+ QNativeImage *ni = new QNativeImage(iw + 2 * margin + 2,
+ ih + 2 * margin + 2,
QNativeImage::systemFormat(), true);
ni->image.fill(0xffffffff);
@@ -1449,7 +1449,7 @@ QImage QFontEngineWin::alphaMapForGlyph(glyph_t glyph, const QTransform &xform)
font = CreateFontIndirectW(&lf);
}
- QNativeImage *mask = drawGDIGlyph(font, glyph, 0, xform);
+ QNativeImage *mask = drawGDIGlyph(font, glyph, 2, xform);
if (mask == 0)
return QImage();
diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp
index 80a5425..d41d414 100644
--- a/src/gui/text/qtextengine.cpp
+++ b/src/gui/text/qtextengine.cpp
@@ -1099,6 +1099,16 @@ void QTextEngine::shapeTextWithCE(int item) const
}
#endif
+static inline void moveGlyphData(const QGlyphLayout &destination, const QGlyphLayout &source, int num)
+{
+ if (num > 0 && destination.glyphs != source.glyphs) {
+ memmove(destination.glyphs, source.glyphs, num * sizeof(HB_Glyph));
+ memmove(destination.attributes, source.attributes, num * sizeof(HB_GlyphAttributes));
+ memmove(destination.advances_x, source.advances_x, num * sizeof(HB_Fixed));
+ memmove(destination.offsets, source.offsets, num * sizeof(HB_FixedPoint));
+ }
+}
+
/// take the item from layoutData->items and
void QTextEngine::shapeTextWithHarfbuzz(int item) const
{
@@ -1189,7 +1199,7 @@ void QTextEngine::shapeTextWithHarfbuzz(int item) const
- int initial_glyph_pos = 0;
+ int remaining_glyphs = entire_shaper_item.num_glyphs;
int glyph_pos = 0;
// for each item shape using harfbuzz and store the results in our layoutData's glyphs array.
for (int k = 0; k < itemBoundaries.size(); k += 2) { // for the +2, see the comment at the definition of itemBoundaries
@@ -1209,7 +1219,7 @@ void QTextEngine::shapeTextWithHarfbuzz(int item) const
QFontEngine *actualFontEngine = font;
uint engineIdx = 0;
if (font->type() == QFontEngine::Multi) {
- engineIdx = uint(initialGlyphs.glyphs[itemBoundaries[k + 1]] >> 24);
+ engineIdx = uint(availableGlyphs(&si).glyphs[glyph_pos] >> 24);
actualFontEngine = static_cast<QFontEngineMulti *>(font)->engine(engineIdx);
}
@@ -1219,16 +1229,18 @@ void QTextEngine::shapeTextWithHarfbuzz(int item) const
shaper_item.glyphIndicesPresent = true;
+ remaining_glyphs -= shaper_item.initialGlyphCount;
+
do {
- ensureSpace(glyph_pos + shaper_item.num_glyphs);
- initialGlyphs = availableGlyphs(&si).mid(0, entire_shaper_item.num_glyphs);
- shaper_item.num_glyphs = layoutData->glyphLayout.numGlyphs - layoutData->used - glyph_pos;
+ ensureSpace(glyph_pos + shaper_item.num_glyphs + remaining_glyphs);
- const QGlyphLayout g = availableGlyphs(&si);
- shaper_item.glyphs = g.glyphs + glyph_pos;
- shaper_item.attributes = g.attributes + glyph_pos;
- shaper_item.advances = reinterpret_cast<HB_Fixed *>(g.advances_x + glyph_pos);
- shaper_item.offsets = reinterpret_cast<HB_FixedPoint *>(g.offsets + glyph_pos);
+ const QGlyphLayout g = availableGlyphs(&si).mid(glyph_pos);
+ moveGlyphData(g.mid(shaper_item.num_glyphs), g.mid(shaper_item.initialGlyphCount), remaining_glyphs);
+
+ shaper_item.glyphs = g.glyphs;
+ shaper_item.attributes = g.attributes;
+ shaper_item.advances = reinterpret_cast<HB_Fixed *>(g.advances_x);
+ shaper_item.offsets = reinterpret_cast<HB_FixedPoint *>(g.offsets);
if (shaper_item.glyphIndicesPresent) {
for (hb_uint32 i = 0; i < shaper_item.initialGlyphCount; ++i)
@@ -1241,18 +1253,18 @@ void QTextEngine::shapeTextWithHarfbuzz(int item) const
} while (!qShapeItem(&shaper_item)); // this does the actual shaping via harfbuzz.
QGlyphLayout g = availableGlyphs(&si).mid(glyph_pos, shaper_item.num_glyphs);
+ moveGlyphData(g.mid(shaper_item.num_glyphs), g.mid(shaper_item.initialGlyphCount), remaining_glyphs);
- for (hb_uint32 i = 0; i < shaper_item.item.length; ++i) {
+ for (hb_uint32 i = 0; i < shaper_item.num_glyphs; ++i)
g.glyphs[i] = g.glyphs[i] | (engineIdx << 24);
+
+ for (hb_uint32 i = 0; i < shaper_item.item.length; ++i)
shaper_item.log_clusters[i] += glyph_pos;
- }
if (kerningEnabled && !shaper_item.kerning_applied)
font->doKerning(&g, option.useDesignMetrics() ? QFlag(QTextEngine::DesignMetrics) : QFlag(0));
glyph_pos += shaper_item.num_glyphs;
-
- initial_glyph_pos += shaper_item.initialGlyphCount;
}
// qDebug(" -> item: script=%d num_glyphs=%d", shaper_item.script, shaper_item.num_glyphs);
diff --git a/src/gui/text/qtextformat.cpp b/src/gui/text/qtextformat.cpp
index 21bfc4d..38ac4ca 100644
--- a/src/gui/text/qtextformat.cpp
+++ b/src/gui/text/qtextformat.cpp
@@ -1449,7 +1449,7 @@ void QTextCharFormat::setUnderlineStyle(UnderlineStyle style)
/*!
\since 4.5
\fn bool QTextCharFormat::fontKerning() const
- Returns true if the the font kerning is enabled.
+ Returns true if the font kerning is enabled.
\sa setFontKerning()
\sa font()
diff --git a/src/gui/text/qtexttable.cpp b/src/gui/text/qtexttable.cpp
index ba1c04f..48708c9 100644
--- a/src/gui/text/qtexttable.cpp
+++ b/src/gui/text/qtexttable.cpp
@@ -525,7 +525,12 @@ void QTextTablePrivate::update() const
Rows and columns within a QTextTable can be merged and split using
the mergeCells() and splitCell() functions. However, only cells that span multiple
rows or columns can be split. (Merging or splitting does not increase or decrease
- the number of rows and columns.)
+ the number of rows and columns.)
+
+ Note that if you have merged multiple columns and rows into one cell, you will not
+ be able to split the merged cell into new cells spanning over more than one row
+ or column. To be able to split cells spanning over several rows and columns you
+ need to do this over several iterations.
\table 80%
\row
diff --git a/src/gui/util/qundostack.cpp b/src/gui/util/qundostack.cpp
index 11f65e3..a6b9c23 100644
--- a/src/gui/util/qundostack.cpp
+++ b/src/gui/util/qundostack.cpp
@@ -715,7 +715,7 @@ int QUndoStack::index() const
}
/*!
- Repeatedly calls undo() or redo() until the the current command index reaches
+ Repeatedly calls undo() or redo() until the current command index reaches
\a idx. This function can be used to roll the state of the document forwards
of backwards. indexChanged() is emitted only once.
diff --git a/src/gui/widgets/qcalendarwidget.cpp b/src/gui/widgets/qcalendarwidget.cpp
index 92c12a5..4436c04 100644
--- a/src/gui/widgets/qcalendarwidget.cpp
+++ b/src/gui/widgets/qcalendarwidget.cpp
@@ -2791,7 +2791,7 @@ QTextCharFormat QCalendarWidget::dateTextFormat(const QDate &date) const
void QCalendarWidget::setDateTextFormat(const QDate &date, const QTextCharFormat &format)
{
Q_D(QCalendarWidget);
- if ( date.isNull() && !format.isValid() )
+ if (date.isNull())
d->m_model->m_dateFormats.clear();
else
d->m_model->m_dateFormats[date] = format;
diff --git a/src/gui/widgets/qcombobox.cpp b/src/gui/widgets/qcombobox.cpp
index e9884bb..16e2f39 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -948,7 +948,7 @@ QComboBoxPrivateContainer* QComboBoxPrivate::viewContainer()
container = new QComboBoxPrivateContainer(new QComboBoxListView(q), q);
container->itemView()->setModel(model);
container->itemView()->setTextElideMode(Qt::ElideMiddle);
- updateDelegate();
+ updateDelegate(true);
updateLayoutDirection();
QObject::connect(container, SIGNAL(itemSelected(QModelIndex)),
q, SLOT(_q_itemSelected(QModelIndex)));
@@ -1568,15 +1568,25 @@ bool QComboBox::isEditable() const
return d->lineEdit != 0;
}
-void QComboBoxPrivate::updateDelegate()
+/*! \internal
+ update the default delegate
+ depending on the style's SH_ComboBox_Popup hint, we use a different default delegate.
+
+ but we do not change the delegate is the combobox use a custom delegate,
+ unless \a force is set to true.
+ */
+void QComboBoxPrivate::updateDelegate(bool force)
{
Q_Q(QComboBox);
QStyleOptionComboBox opt;
q->initStyleOption(&opt);
- if (q->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, q))
- q->setItemDelegate(new QComboMenuDelegate(q->view(), q));
- else
- q->setItemDelegate(new QComboBoxDelegate(q->view(), q));
+ if (q->style()->styleHint(QStyle::SH_ComboBox_Popup, &opt, q)) {
+ if (force || qobject_cast<QComboBoxDelegate *>(q->itemDelegate()))
+ q->setItemDelegate(new QComboMenuDelegate(q->view(), q));
+ } else {
+ if (force || qobject_cast<QComboMenuDelegate *>(q->itemDelegate()))
+ q->setItemDelegate(new QComboBoxDelegate(q->view(), q));
+ }
}
QIcon QComboBoxPrivate::itemIcon(const QModelIndex &index) const
diff --git a/src/gui/widgets/qcombobox_p.h b/src/gui/widgets/qcombobox_p.h
index c39a231..a55b439 100644
--- a/src/gui/widgets/qcombobox_p.h
+++ b/src/gui/widgets/qcombobox_p.h
@@ -256,7 +256,7 @@ private:
};
class QComboMenuDelegate : public QAbstractItemDelegate
-{
+{ Q_OBJECT
public:
QComboMenuDelegate(QObject *parent, QComboBox *cmb) : QAbstractItemDelegate(parent), mCombo(cmb) {}
@@ -285,7 +285,7 @@ private:
// Vista does not use the new theme for combo boxes and there might
// be other side effects from using the new class
class QComboBoxDelegate : public QItemDelegate
-{
+{ Q_OBJECT
public:
QComboBoxDelegate(QObject *parent, QComboBox *cmb) : QItemDelegate(parent), mCombo(cmb) {}
@@ -367,7 +367,7 @@ public:
int itemRole() const;
void updateLayoutDirection();
void setCurrentIndex(const QModelIndex &index);
- void updateDelegate();
+ void updateDelegate(bool force = false);
void keyboardSearchString(const QString &text);
void modelChanged();
diff --git a/src/gui/widgets/qlcdnumber.cpp b/src/gui/widgets/qlcdnumber.cpp
index 0136f1a..af80963 100644
--- a/src/gui/widgets/qlcdnumber.cpp
+++ b/src/gui/widgets/qlcdnumber.cpp
@@ -1271,7 +1271,7 @@ bool QLCDNumber::event(QEvent *e)
/*!
\fn int QLCDNumber::margin() const
- Returns the with of the the margin around the contents of the widget.
+ Returns the width of the margin around the contents of the widget.
Use QWidget::getContentsMargins() instead.
\sa setMargin(), QWidget::getContentsMargins()
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 116d000..0d8e16f 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -3690,7 +3690,7 @@ void QLineEditPrivate::redo() {
/*!
\fn int QLineEdit::margin() const
- Returns the with of the the margin around the contents of the widget.
+ Returns the width of the margin around the contents of the widget.
Use QWidget::getContentsMargins() instead.
\sa setMargin(), QWidget::getContentsMargins()
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 502c1e9..558ba42 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -1408,10 +1408,10 @@ bool QMainWindow::event(QEvent *event)
This property is false by default and only has any effect on Mac OS X 10.4 or higher.
- If set to true, then the top toolbar area is replaced with a Carbon
- HIToolbar and all toolbars in the top toolbar area are moved to that. Any
- toolbars added afterwards will also be added to the Carbon HIToolbar. This
- means a couple of things.
+ If set to true, then the top toolbar area is replaced with a Carbon HIToolbar
+ or a Cocoa NSToolbar (depending on whether Qt was built with Carbon or Cocoa).
+ All toolbars in the top toolbar area and any toolbars added afterwards are
+ moved to that. This means a couple of things.
\list
\i QToolBars in this toolbar area are not movable and you cannot drag other
diff --git a/src/gui/widgets/qmdiarea.cpp b/src/gui/widgets/qmdiarea.cpp
index 598d3b5..6acd977 100644
--- a/src/gui/widgets/qmdiarea.cpp
+++ b/src/gui/widgets/qmdiarea.cpp
@@ -81,7 +81,7 @@
subwindows. This information could be used in a popup menu
containing a list of windows, for example.
- The subwindows are sorted by the the current
+ The subwindows are sorted by the current
\l{QMdiArea::}{WindowOrder}. This is used for the subWindowList()
and for activateNextSubWindow() and acivatePreviousSubWindow().
Also, it is used when cascading or tiling the windows with
diff --git a/src/gui/widgets/qmenu_p.h b/src/gui/widgets/qmenu_p.h
index d47749f..a45f12f 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -227,7 +227,7 @@ public:
QString searchBuffer;
QBasicTimer searchBufferTimer;
- //passing of mouse events up the parent heirarchy
+ //passing of mouse events up the parent hierarchy
QPointer<QMenu> activeMenu;
bool mouseEventTaken(QMouseEvent *);
diff --git a/src/gui/widgets/qmenu_wince.cpp b/src/gui/widgets/qmenu_wince.cpp
index 847a623..42a4e0b 100644
--- a/src/gui/widgets/qmenu_wince.cpp
+++ b/src/gui/widgets/qmenu_wince.cpp
@@ -214,10 +214,12 @@ static HWND qt_wce_create_menubar(HWND parentHandle, HINSTANCE resourceHandle, i
mbi.nToolBarId = toolbarID;
if (ptrCreateMenuBar(&mbi)) {
+#ifdef Q_OS_WINCE_WM
// Tell the menu bar that we want to override hot key behaviour.
LPARAM lparam = MAKELPARAM(SHMBOF_NODEFAULT | SHMBOF_NOTIFY,
SHMBOF_NODEFAULT | SHMBOF_NOTIFY);
SendMessage(mbi.hwndMB, SHCMBM_OVERRIDEKEY, VK_TBACK, lparam);
+#endif
return mbi.hwndMB;
}
}
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index d05323d..fb8a69b 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -2417,7 +2417,7 @@ int QMenuBar::findIdForAction(QAction *act) const
/*!
\fn int QMenuBar::margin() const
- Returns the with of the the margin around the contents of the widget.
+ Returns the width of the margin around the contents of the widget.
Use QWidget::getContentsMargins() instead.
\sa setMargin(), QWidget::getContentsMargins()
diff --git a/src/gui/widgets/qscrollarea.cpp b/src/gui/widgets/qscrollarea.cpp
index 6aca7d3..8b01453 100644
--- a/src/gui/widgets/qscrollarea.cpp
+++ b/src/gui/widgets/qscrollarea.cpp
@@ -127,7 +127,7 @@ QT_BEGIN_NAMESPACE
setting the layout's \l{QLayout::sizeConstraint}{size constraint}
property to one which provides constraints on the minimum and/or
maximum size of the layout (e.g., QLayout::SetMinAndMaxSize) will
- cause the size of the the scroll area to be updated whenever the
+ cause the size of the scroll area to be updated whenever the
contents of the layout changes.
For a complete example using the QScrollArea class, see the \l
diff --git a/src/gui/widgets/qsplitter.cpp b/src/gui/widgets/qsplitter.cpp
index bf8af35..45e838f 100644
--- a/src/gui/widgets/qsplitter.cpp
+++ b/src/gui/widgets/qsplitter.cpp
@@ -1517,7 +1517,7 @@ void QSplitter::setOpaqueResize(bool on)
/*!
\fn int QSplitter::margin() const
- Returns the with of the the margin around the contents of the widget.
+ Returns the width of the margin around the contents of the widget.
Use QWidget::getContentsMargins() instead.
\sa setMargin(), QWidget::getContentsMargins()
diff --git a/src/gui/widgets/qtabwidget.cpp b/src/gui/widgets/qtabwidget.cpp
index c16e000..43b2f54 100644
--- a/src/gui/widgets/qtabwidget.cpp
+++ b/src/gui/widgets/qtabwidget.cpp
@@ -504,7 +504,7 @@ QIcon QTabWidget::tabIcon(int index) const
}
/*!
- Returns true if the the page at position \a index is enabled; otherwise returns false.
+ Returns true if the page at position \a index is enabled; otherwise returns false.
\sa setTabEnabled(), QWidget::isEnabled()
*/
diff --git a/src/gui/widgets/qtoolbox.cpp b/src/gui/widgets/qtoolbox.cpp
index 81935a5..271130a 100644
--- a/src/gui/widgets/qtoolbox.cpp
+++ b/src/gui/widgets/qtoolbox.cpp
@@ -802,7 +802,7 @@ void QToolBox::itemRemoved(int index)
/*!
\fn int QToolBox::margin() const
- Returns the with of the the margin around the contents of the widget.
+ Returns the width of the margin around the contents of the widget.
Use QWidget::getContentsMargins() instead.
\sa setMargin(), QWidget::getContentsMargins()
diff --git a/src/network/access/qhttp.cpp b/src/network/access/qhttp.cpp
index 96ccc91..30befb3 100644
--- a/src/network/access/qhttp.cpp
+++ b/src/network/access/qhttp.cpp
@@ -64,10 +64,10 @@
# include "qtimer.h"
#endif
-QT_BEGIN_NAMESPACE
-
#ifndef QT_NO_HTTP
+QT_BEGIN_NAMESPACE
+
class QHttpNormalRequest;
class QHttpRequest
{
@@ -950,7 +950,7 @@ void QHttpHeader::setContentLength(int len)
}
/*!
- Returns true if the header has an entry for the the special HTTP
+ Returns true if the header has an entry for the special HTTP
header field \c content-type; otherwise returns false.
\sa contentType() setContentType()
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index 5940fba..ae518df 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -529,10 +529,20 @@ void QHttpNetworkConnectionPrivate::receiveReply(QAbstractSocket *socket, QHttpN
QHttpNetworkReplyPrivate::ReplyState state = reply ? reply->d_func()->state : QHttpNetworkReplyPrivate::AllDoneState;
switch (state) {
case QHttpNetworkReplyPrivate::NothingDoneState:
- case QHttpNetworkReplyPrivate::ReadingStatusState:
- bytes += reply->d_func()->readStatus(socket);
+ case QHttpNetworkReplyPrivate::ReadingStatusState: {
+ qint64 statusBytes = reply->d_func()->readStatus(socket);
+ if (statusBytes == -1) {
+ // error reading the status, close the socket and emit error
+ socket->close();
+ reply->d_func()->errorString = errorDetail(QNetworkReply::ProtocolFailure, socket);
+ emit reply->finishedWithError(QNetworkReply::ProtocolFailure, reply->d_func()->errorString);
+ QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
+ break;
+ }
+ bytes += statusBytes;
channels[i].lastStatus = reply->d_func()->statusCode;
break;
+ }
case QHttpNetworkReplyPrivate::ReadingHeaderState:
bytes += reply->d_func()->readHeader(socket);
if (reply->d_func()->state == QHttpNetworkReplyPrivate::ReadingDataState) {
@@ -633,10 +643,21 @@ void QHttpNetworkConnectionPrivate::handleStatus(QAbstractSocket *socket, QHttpN
switch (statusCode) {
case 401:
case 407:
- handleAuthenticateChallenge(socket, reply, (statusCode == 407), resend);
- if (resend) {
- eraseData(reply);
- sendRequest(socket);
+ if (handleAuthenticateChallenge(socket, reply, (statusCode == 407), resend)) {
+ if (resend) {
+ eraseData(reply);
+ sendRequest(socket);
+ }
+ } else {
+ int i = indexOf(socket);
+ emit channels[i].reply->headerChanged();
+ emit channels[i].reply->readyRead();
+ QNetworkReply::NetworkError errorCode = (statusCode == 407)
+ ? QNetworkReply::ProxyAuthenticationRequiredError
+ : QNetworkReply::AuthenticationRequiredError;
+ reply->d_func()->errorString = errorDetail(errorCode, socket);
+ emit q->error(errorCode, reply->d_func()->errorString);
+ emit channels[i].reply->finished();
}
break;
default:
@@ -739,7 +760,6 @@ bool QHttpNetworkConnectionPrivate::handleAuthenticateChallenge(QAbstractSocket
// authentication is cancelled, send the current contents to the user.
emit channels[i].reply->headerChanged();
emit channels[i].reply->readyRead();
- emit channels[i].reply->finished();
QNetworkReply::NetworkError errorCode =
isProxy
? QNetworkReply::ProxyAuthenticationRequiredError
diff --git a/src/network/access/qhttpnetworkreply.cpp b/src/network/access/qhttpnetworkreply.cpp
index fe3f6af..69e0a4c 100644
--- a/src/network/access/qhttpnetworkreply.cpp
+++ b/src/network/access/qhttpnetworkreply.cpp
@@ -409,39 +409,62 @@ qint64 QHttpNetworkReplyPrivate::readStatus(QAbstractSocket *socket)
if (fragment.endsWith('\r')) {
fragment.truncate(fragment.length()-1);
}
- parseStatus(fragment);
+ bool ok = parseStatus(fragment);
state = ReadingHeaderState;
fragment.clear(); // next fragment
+
+ if (!ok)
+ return -1;
break;
} else {
c = 0;
bytes += socket->read(&c, 1);
fragment.append(c);
}
+
+ // is this a valid reply?
+ if (fragment.length() >= 5 && !fragment.startsWith("HTTP/"))
+ return -1;
+
}
+
return bytes;
}
-void QHttpNetworkReplyPrivate::parseStatus(const QByteArray &status)
+bool QHttpNetworkReplyPrivate::parseStatus(const QByteArray &status)
{
- const QByteArrayMatcher sp(" ");
- int i = sp.indexIn(status);
- const QByteArray version = status.mid(0, i);
- int j = sp.indexIn(status, i + 1);
+ // from RFC 2616:
+ // Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
+ // HTTP-Version = "HTTP" "/" 1*DIGIT "." 1*DIGIT
+ // that makes: 'HTTP/n.n xxx Message'
+ // byte count: 0123456789012
+
+ static const int minLength = 11;
+ static const int dotPos = 6;
+ static const int spacePos = 8;
+ static const char httpMagic[] = "HTTP/";
+
+ if (status.length() < minLength
+ || !status.startsWith(httpMagic)
+ || status.at(dotPos) != '.'
+ || status.at(spacePos) != ' ') {
+ // I don't know how to parse this status line
+ return false;
+ }
+
+ // optimize for the valid case: defer checking until the end
+ majorVersion = status.at(dotPos - 1) - '0';
+ minorVersion = status.at(dotPos + 1) - '0';
+
+ int i = spacePos;
+ int j = status.indexOf(' ', i + 1); // j == -1 || at(j) == ' ' so j+1 == 0 && j+1 <= length()
const QByteArray code = status.mid(i + 1, j - i - 1);
- const QByteArray reason = status.mid(j + 1, status.count() - j);
- const QByteArrayMatcher slash("/");
- int k = slash.indexIn(version);
- const QByteArrayMatcher dot(".");
- int l = dot.indexIn(version, k);
- const QByteArray major = version.mid(k + 1, l - k - 1);
- const QByteArray minor = version.mid(l + 1, version.count() - l);
+ bool ok;
+ statusCode = code.toInt(&ok);
+ reasonPhrase = QString::fromLatin1(status.constData() + j + 1);
- majorVersion = QString::fromAscii(major.constData()).toInt();
- minorVersion = QString::fromAscii(minor.constData()).toInt();
- statusCode = QString::fromAscii(code.constData()).toInt();
- reasonPhrase = QString::fromAscii(reason.constData());
+ return ok && uint(majorVersion) <= 9 && uint(minorVersion) <= 9;
}
qint64 QHttpNetworkReplyPrivate::readHeader(QAbstractSocket *socket)
@@ -660,4 +683,4 @@ void QHttpNetworkReply::ignoreSslErrors()
QT_END_NAMESPACE
-#endif // QT_NO_HTTP \ No newline at end of file
+#endif // QT_NO_HTTP
diff --git a/src/network/access/qhttpnetworkreply_p.h b/src/network/access/qhttpnetworkreply_p.h
index c17c65c..cb4d34f 100644
--- a/src/network/access/qhttpnetworkreply_p.h
+++ b/src/network/access/qhttpnetworkreply_p.h
@@ -154,7 +154,7 @@ public:
QHttpNetworkReplyPrivate(const QUrl &newUrl = QUrl());
~QHttpNetworkReplyPrivate();
qint64 readStatus(QAbstractSocket *socket);
- void parseStatus(const QByteArray &status);
+ bool parseStatus(const QByteArray &status);
qint64 readHeader(QAbstractSocket *socket);
void parseHeader(const QByteArray &header);
qint64 readBody(QAbstractSocket *socket, QIODevice *out);
diff --git a/src/network/access/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index a52b5a0..f214699 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -1036,21 +1036,39 @@ QNetworkCacheMetaData QNetworkAccessHttpBackend::fetchCacheMetaData(const QNetwo
if (it != cacheHeaders.rawHeaders.constEnd())
metaData.setLastModified(QNetworkHeadersPrivate::fromHttpDate(it->second));
- bool canDiskCache = true; // Everything defaults to being cacheable on disk
-
- // 14.32
- // HTTP/1.1 caches SHOULD treat "Pragma: no-cache" as if the client
- // had sent "Cache-Control: no-cache".
- it = cacheHeaders.findRawHeader("pragma");
- if (it != cacheHeaders.rawHeaders.constEnd()
- && it->second == "no-cache")
- canDiskCache = false;
+ bool canDiskCache;
+ // only cache GET replies by default, all other replies (POST, PUT, DELETE)
+ // are not cacheable by default (according to RFC 2616 section 9)
+ if (httpReply->request().operation() == QHttpNetworkRequest::Get) {
+
+ canDiskCache = true;
+ // 14.32
+ // HTTP/1.1 caches SHOULD treat "Pragma: no-cache" as if the client
+ // had sent "Cache-Control: no-cache".
+ it = cacheHeaders.findRawHeader("pragma");
+ if (it != cacheHeaders.rawHeaders.constEnd()
+ && it->second == "no-cache")
+ canDiskCache = false;
+
+ // HTTP/1.1. Check the Cache-Control header
+ if (cacheControl.contains("no-cache"))
+ canDiskCache = false;
+ else if (cacheControl.contains("no-store"))
+ canDiskCache = false;
+
+ // responses to POST might be cacheable
+ } else if (httpReply->request().operation() == QHttpNetworkRequest::Post) {
- // HTTP/1.1. Check the Cache-Control header
- if (cacheControl.contains("no-cache"))
canDiskCache = false;
- else if (cacheControl.contains("no-store"))
+ // some pages contain "expires:" and "cache-control: no-cache" field,
+ // so we only might cache POST requests if we get "cache-control: max-age ..."
+ if (cacheControl.contains("max-age"))
+ canDiskCache = true;
+
+ // responses to PUT and DELETE are not cacheable
+ } else {
canDiskCache = false;
+ }
metaData.setSaveToDisk(canDiskCache);
int statusCode = httpReply->statusCode();
diff --git a/src/network/access/qnetworkdiskcache.cpp b/src/network/access/qnetworkdiskcache.cpp
index 892929e..44a8298 100644
--- a/src/network/access/qnetworkdiskcache.cpp
+++ b/src/network/access/qnetworkdiskcache.cpp
@@ -494,21 +494,21 @@ qint64 QNetworkDiskCache::expire()
QDir::Filters filters = QDir::AllDirs | QDir:: Files | QDir::NoDotAndDotDot;
QDirIterator it(cacheDirectory(), filters, QDirIterator::Subdirectories);
- QMap<QDateTime, QString> cacheItems;
+ QMultiMap<QDateTime, QString> cacheItems;
qint64 totalSize = 0;
while (it.hasNext()) {
QString path = it.next();
QFileInfo info = it.fileInfo();
QString fileName = info.fileName();
if (fileName.endsWith(CACHE_POSTFIX) && fileName.startsWith(CACHE_PREFIX)) {
- cacheItems[info.created()] = path;
+ cacheItems.insert(info.created(), path);
totalSize += info.size();
}
}
int removedFiles = 0;
qint64 goal = (maximumCacheSize() * 9) / 10;
- QMap<QDateTime, QString>::const_iterator i = cacheItems.constBegin();
+ QMultiMap<QDateTime, QString>::const_iterator i = cacheItems.constBegin();
while (i != cacheItems.constEnd()) {
if (totalSize < goal)
break;
diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp
index c9161f8..33795aa 100644
--- a/src/network/kernel/qauthenticator.cpp
+++ b/src/network/kernel/qauthenticator.cpp
@@ -73,6 +73,15 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas
authentication information to the socket when accessing services that
require authentication.
+ QAuthenticator supports the following authentication methods:
+ \list
+ \o Basic
+ \o NTLM version 1
+ \o Digest-MD5
+ \endlist
+
+ Note that, in particular, NTLM version 2 is not supported.
+
\sa QSslSocket
*/
diff --git a/src/network/kernel/qhostinfo_win.cpp b/src/network/kernel/qhostinfo_win.cpp
index 0a34e2b..472bc4b 100644
--- a/src/network/kernel/qhostinfo_win.cpp
+++ b/src/network/kernel/qhostinfo_win.cpp
@@ -72,21 +72,6 @@ struct qt_addrinfo
qt_addrinfo *ai_next;
};
-// sockaddr_in6 size changed between old and new SDK
-// Only the new version is the correct one, so always
-// use this structure.
-struct qt_in6_addr {
- uchar qt_s6_addr[16];
-};
-
-struct qt_sockaddr_in6 {
- short sin6_family; /* AF_INET6 */
- u_short sin6_port; /* Transport level port number */
- u_long sin6_flowinfo; /* IPv6 flow information */
- struct qt_in6_addr sin6_addr; /* IPv6 address */
- u_long sin6_scope_id; /* set of interfaces for a scope */
-};
-
//###
#define QT_SOCKLEN_T int
#ifndef NI_MAXHOST // already defined to 1025 in ws2tcpip.h?
diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp
index a339388..ff3624e 100644
--- a/src/network/kernel/qnetworkinterface.cpp
+++ b/src/network/kernel/qnetworkinterface.cpp
@@ -397,7 +397,7 @@ QNetworkInterface::~QNetworkInterface()
}
/*!
- Creates a copy of the the QNetworkInterface object contained in \a
+ Creates a copy of the QNetworkInterface object contained in \a
other.
*/
QNetworkInterface::QNetworkInterface(const QNetworkInterface &other)
diff --git a/src/network/kernel/qnetworkproxy.cpp b/src/network/kernel/qnetworkproxy.cpp
index 62bdfc7..fd3a85a 100644
--- a/src/network/kernel/qnetworkproxy.cpp
+++ b/src/network/kernel/qnetworkproxy.cpp
@@ -1258,6 +1258,6 @@ QList<QNetworkProxy> QNetworkProxyFactory::proxyForQuery(const QNetworkProxyQuer
return globalNetworkProxy()->proxyForQuery(query);
}
-#endif // QT_NO_NETWORKPROXY
-
QT_END_NAMESPACE
+
+#endif // QT_NO_NETWORKPROXY
diff --git a/src/network/kernel/qurlinfo.cpp b/src/network/kernel/qurlinfo.cpp
index 255c9ea..d90c480 100644
--- a/src/network/kernel/qurlinfo.cpp
+++ b/src/network/kernel/qurlinfo.cpp
@@ -726,6 +726,6 @@ bool QUrlInfo::isValid() const
return d != 0;
}
-#endif // QT_NO_URLINFO
-
QT_END_NAMESPACE
+
+#endif // QT_NO_URLINFO
diff --git a/src/network/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index 8ae247c..768cafb 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -991,7 +991,6 @@ void QAbstractSocketPrivate::_q_connectToNextAddress()
// Wait for a write notification that will eventually call
// _q_testConnection().
socketEngine->setWriteNotificationEnabled(true);
- socketEngine->setExceptionNotificationEnabled(true);
break;
} while (state != QAbstractSocket::ConnectedState);
}
@@ -1052,7 +1051,6 @@ void QAbstractSocketPrivate::_q_abortConnectionAttempt()
#endif
if (socketEngine) {
socketEngine->setWriteNotificationEnabled(false);
- socketEngine->setExceptionNotificationEnabled(false);
}
connectTimer->stop();
@@ -1130,7 +1128,7 @@ bool QAbstractSocketPrivate::readFromSocket()
/*! \internal
- Sets up the the internal state after the connection has succeeded.
+ Sets up the internal state after the connection has succeeded.
*/
void QAbstractSocketPrivate::fetchConnectionParameters()
{
diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp
index 540c443..5a2a746 100644
--- a/src/network/socket/qhttpsocketengine.cpp
+++ b/src/network/socket/qhttpsocketengine.cpp
@@ -768,6 +768,6 @@ QAbstractSocketEngine *QHttpSocketEngineHandler::createSocketEngine(int, QObject
return 0;
}
-#endif
-
QT_END_NAMESPACE
+
+#endif
diff --git a/src/network/socket/qlocalserver.cpp b/src/network/socket/qlocalserver.cpp
index d6b1507..35701a7 100644
--- a/src/network/socket/qlocalserver.cpp
+++ b/src/network/socket/qlocalserver.cpp
@@ -276,6 +276,10 @@ QLocalSocket *QLocalServer::nextPendingConnection()
if (d->pendingConnections.isEmpty())
return 0;
QLocalSocket *nextSocket = d->pendingConnections.dequeue();
+#ifdef Q_OS_SYMBIAN
+ if(!d->socketNotifier)
+ return nextSocket;
+#endif
#ifndef Q_OS_WIN
d->socketNotifier->setEnabled(d->pendingConnections.size()
<= d->maxPendingConnections);
diff --git a/src/network/socket/qlocalsocket_unix.cpp b/src/network/socket/qlocalsocket_unix.cpp
index 2471043..9e3cbde 100644
--- a/src/network/socket/qlocalsocket_unix.cpp
+++ b/src/network/socket/qlocalsocket_unix.cpp
@@ -237,7 +237,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
QLatin1String("QLocalSocket::connectToServer"));
return;
}
-
+#ifndef Q_OS_SYMBIAN
// set non blocking so we can try to connect and it wont wait
int flags = fcntl(d->connectingSocket, F_GETFL, 0);
if (-1 == flags
@@ -246,6 +246,7 @@ void QLocalSocket::connectToServer(const QString &name, OpenMode openMode)
QLatin1String("QLocalSocket::connectToServer"));
return;
}
+#endif
// _q_connectToSocket does the actual connecting
d->connectingName = name;
diff --git a/src/network/socket/qnativesocketengine_p.h b/src/network/socket/qnativesocketengine_p.h
index 515ad84..95ffba5 100644
--- a/src/network/socket/qnativesocketengine_p.h
+++ b/src/network/socket/qnativesocketengine_p.h
@@ -55,9 +55,9 @@
#include "QtNetwork/qhostaddress.h"
#include "private/qabstractsocketengine_p.h"
#ifndef Q_OS_WIN
-#include "qplatformdefs.h"
+# include "qplatformdefs.h"
#else
-#include <Winsock2.h> // sockaddr_storage, sockaddr_in
+# include <winsock2.h>
#endif
#ifdef Q_OS_SYMBIAN
@@ -227,6 +227,39 @@ static inline int qt_socket_socket(int domain, int type, int protocol)
#endif
+// Use our own defines and structs which we know are correct
+# define QT_SS_MAXSIZE 128
+# define QT_SS_ALIGNSIZE (sizeof(qint64))
+# define QT_SS_PAD1SIZE (QT_SS_ALIGNSIZE - sizeof (short))
+# define QT_SS_PAD2SIZE (QT_SS_MAXSIZE - (sizeof (short) + QT_SS_PAD1SIZE + QT_SS_ALIGNSIZE))
+struct qt_sockaddr_storage {
+ short ss_family;
+ char __ss_pad1[QT_SS_PAD1SIZE];
+ qint64 __ss_align;
+ char __ss_pad2[QT_SS_PAD2SIZE];
+};
+
+// sockaddr_in6 size changed between old and new SDK
+// Only the new version is the correct one, so always
+// use this structure.
+struct qt_in6_addr {
+ quint8 qt_s6_addr[16];
+};
+struct qt_sockaddr_in6 {
+ short sin6_family; /* AF_INET6 */
+ quint16 sin6_port; /* Transport level port number */
+ quint32 sin6_flowinfo; /* IPv6 flow information */
+ struct qt_in6_addr sin6_addr; /* IPv6 address */
+ quint32 sin6_scope_id; /* set of interfaces for a scope */
+};
+
+union qt_sockaddr {
+ sockaddr a;
+ sockaddr_in a4;
+ qt_sockaddr_in6 a6;
+ qt_sockaddr_storage storage;
+};
+
class QNativeSocketEnginePrivate;
class Q_AUTOTEST_EXPORT QNativeSocketEngine : public QAbstractSocketEngine
diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp
index a3f62db..5136978 100644
--- a/src/network/socket/qnativesocketengine_unix.cpp
+++ b/src/network/socket/qnativesocketengine_unix.cpp
@@ -122,36 +122,34 @@ static void qt_ignore_sigpipe()
Extracts the port and address from a sockaddr, and stores them in
\a port and \a addr if they are non-null.
*/
-static inline void qt_socket_getPortAndAddress(struct sockaddr *sa, quint16 *port, QHostAddress *addr)
+static inline void qt_socket_getPortAndAddress(const qt_sockaddr *s, quint16 *port, QHostAddress *addr)
{
#if !defined(QT_NO_IPV6)
- if (sa->sa_family == AF_INET6) {
- struct sockaddr_in6 *sa6 = (struct sockaddr_in6 *)sa;
+ if (s->a.sa_family == AF_INET6) {
Q_IPV6ADDR tmp;
- memcpy(&tmp, &sa6->sin6_addr.s6_addr, sizeof(tmp));
+ memcpy(&tmp, &s->a6.sin6_addr, sizeof(tmp));
if (addr) {
QHostAddress tmpAddress;
tmpAddress.setAddress(tmp);
*addr = tmpAddress;
#ifndef QT_NO_IPV6IFNAME
char scopeid[IFNAMSIZ];
- if (::if_indextoname(sa6->sin6_scope_id, scopeid)) {
+ if (::if_indextoname(s->a6.sin6_scope_id, scopeid)) {
addr->setScopeId(QLatin1String(scopeid));
} else
#endif
- addr->setScopeId(QString::number(sa6->sin6_scope_id));
+ addr->setScopeId(QString::number(s->a6.sin6_scope_id));
}
if (port)
- *port = ntohs(sa6->sin6_port);
+ *port = ntohs(s->a6.sin6_port);
return;
}
#endif
- struct sockaddr_in *sa4 = (struct sockaddr_in *)sa;
if (port)
- *port = ntohs(sa4->sin_port);
+ *port = ntohs(s->a4.sin_port);
if (addr) {
QHostAddress tmpAddress;
- tmpAddress.setAddress(ntohl(sa4->sin_addr.s_addr));
+ tmpAddress.setAddress(ntohl(s->a4.sin_addr.s_addr));
*addr = tmpAddress;
}
}
@@ -547,26 +545,16 @@ qint64 QNativeSocketEnginePrivate::nativeBytesAvailable() const
bool QNativeSocketEnginePrivate::nativeHasPendingDatagrams() const
{
// Create a sockaddr struct and reset its port number.
-#if !defined(QT_NO_IPV6)
- struct sockaddr_storage storage;
- sockaddr_in6 *storagePtrIPv6 = reinterpret_cast<sockaddr_in6 *>(&storage);
- storagePtrIPv6->sin6_port = 0;
-#else
- struct sockaddr storage;
-#endif
- sockaddr *storagePtr = reinterpret_cast<sockaddr *>(&storage);
- storagePtr->sa_family = 0;
-
- sockaddr_in *storagePtrIPv4 = reinterpret_cast<sockaddr_in *>(&storage);
- storagePtrIPv4->sin_port = 0;
+ qt_sockaddr storage;
QT_SOCKLEN_T storageSize = sizeof(storage);
+ memset(&storage, 0, storageSize);
// Peek 0 bytes into the next message. The size of the message may
// well be 0, so we can't check recvfrom's return value.
ssize_t readBytes;
do {
char c;
- readBytes = qt_socket_recvfrom(socketDescriptor, &c, 1, MSG_PEEK, storagePtr, &storageSize);
+ readBytes = qt_socket_recvfrom(socketDescriptor, &c, 1, MSG_PEEK, &storage.a, &storageSize);
} while (readBytes == -1 && errno == EINTR);
// If there's no error, or if our buffer was too small, there must be a
@@ -618,11 +606,7 @@ qint64 QNativeSocketEnginePrivate::nativePendingDatagramSize() const
qint64 QNativeSocketEnginePrivate::nativeReceiveDatagram(char *data, qint64 maxSize,
QHostAddress *address, quint16 *port)
{
-#if !defined(QT_NO_IPV6)
- struct sockaddr_storage aa;
-#else
- struct sockaddr_in aa;
-#endif
+ qt_sockaddr aa;
memset(&aa, 0, sizeof(aa));
QT_SOCKLEN_T sz;
sz = sizeof(aa);
@@ -631,13 +615,13 @@ qint64 QNativeSocketEnginePrivate::nativeReceiveDatagram(char *data, qint64 maxS
do {
char c;
recvFromResult = qt_socket_recvfrom(socketDescriptor, maxSize ? data : &c, maxSize ? maxSize : 1,
- 0, (struct sockaddr *)&aa, &sz);
+ 0, &aa.a, &sz);
} while (recvFromResult == -1 && errno == EINTR);
if (recvFromResult == -1) {
setError(QAbstractSocket::NetworkError, ReceiveDatagramErrorString);
} else if (port || address) {
- qt_socket_getPortAndAddress((struct sockaddr *) &aa, port, address);
+ qt_socket_getPortAndAddress(&aa, port, address);
}
#if defined (QNATIVESOCKETENGINE_DEBUG)
@@ -716,21 +700,16 @@ bool QNativeSocketEnginePrivate::fetchConnectionParameters()
if (socketDescriptor == -1)
return false;
-#if !defined(QT_NO_IPV6)
- struct sockaddr_storage sa;
-#else
- struct sockaddr_in sa;
-#endif
- struct sockaddr *sockAddrPtr = (struct sockaddr *) &sa;
+ qt_sockaddr sa;
QT_SOCKLEN_T sockAddrSize = sizeof(sa);
// Determine local address
memset(&sa, 0, sizeof(sa));
- if (qt_socket_getsockname(socketDescriptor, sockAddrPtr, &sockAddrSize) == 0) {
- qt_socket_getPortAndAddress(sockAddrPtr, &localPort, &localAddress);
+ if (qt_socket_getsockname(socketDescriptor, &sa.a, &sockAddrSize) == 0) {
+ qt_socket_getPortAndAddress(&sa, &localPort, &localAddress);
// Determine protocol family
- switch (sockAddrPtr->sa_family) {
+ switch (sa.a.sa_family) {
case AF_INET:
socketProtocol = QAbstractSocket::IPv4Protocol;
break;
@@ -750,8 +729,8 @@ bool QNativeSocketEnginePrivate::fetchConnectionParameters()
}
// Determine the remote address
- if (!qt_socket_getpeername(socketDescriptor, sockAddrPtr, &sockAddrSize))
- qt_socket_getPortAndAddress(sockAddrPtr, &peerPort, &peerAddress);
+ if (!qt_socket_getpeername(socketDescriptor, &sa.a, &sockAddrSize))
+ qt_socket_getPortAndAddress(&sa, &peerPort, &peerAddress);
// Determine the socket type (UDP/TCP)
int value = 0;
diff --git a/src/network/socket/qnativesocketengine_win.cpp b/src/network/socket/qnativesocketengine_win.cpp
index d140be2..b08d7b0 100644
--- a/src/network/socket/qnativesocketengine_win.cpp
+++ b/src/network/socket/qnativesocketengine_win.cpp
@@ -149,41 +149,6 @@ static QByteArray qt_prettyDebug(const char *data, int len, int maxLength)
#endif
-#if !defined (QT_NO_IPV6)
-
-// Use our own defines and structs which we know are correct
-# define QT_SS_MAXSIZE 128
-# define QT_SS_ALIGNSIZE (sizeof(__int64))
-# define QT_SS_PAD1SIZE (QT_SS_ALIGNSIZE - sizeof (short))
-# define QT_SS_PAD2SIZE (QT_SS_MAXSIZE - (sizeof (short) + QT_SS_PAD1SIZE + QT_SS_ALIGNSIZE))
-struct qt_sockaddr_storage {
- short ss_family;
- char __ss_pad1[QT_SS_PAD1SIZE];
- __int64 __ss_align;
- char __ss_pad2[QT_SS_PAD2SIZE];
-};
-
-// sockaddr_in6 size changed between old and new SDK
-// Only the new version is the correct one, so always
-// use this structure.
-struct qt_in6_addr {
- u_char qt_s6_addr[16];
-};
-typedef struct {
- short sin6_family; /* AF_INET6 */
- u_short sin6_port; /* Transport level port number */
- u_long sin6_flowinfo; /* IPv6 flow information */
- struct qt_in6_addr sin6_addr; /* IPv6 address */
- u_long sin6_scope_id; /* set of interfaces for a scope */
-} qt_sockaddr_in6;
-
-#else
-
-typedef void * qt_sockaddr_in6 ;
-
-
-#endif
-
#ifndef AF_INET6
#define AF_INET6 23 /* Internetwork Version 6 */
#endif
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index 04bc611..ca5c732 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2504,6 +2504,42 @@ const QGLContext* QGLContext::currentContext()
visual. On other platforms it may work differently.
*/
+/*! \fn int QGLContext::choosePixelFormat(void* dummyPfd, HDC pdc)
+
+ \bold{Win32 only:} This virtual function chooses a pixel format
+ that matches the OpenGL \link setFormat() format\endlink.
+ Reimplement this function in a subclass if you need a custom
+ context.
+
+ \warning The \a dummyPfd pointer and \a pdc are used as a \c
+ PIXELFORMATDESCRIPTOR*. We use \c void to avoid using
+ Windows-specific types in our header files.
+
+ \sa chooseContext()
+*/
+
+/*! \fn void *QGLContext::chooseVisual()
+
+ \bold{X11 only:} This virtual function tries to find a visual that
+ matches the format, reducing the demands if the original request
+ cannot be met.
+
+ The algorithm for reducing the demands of the format is quite
+ simple-minded, so override this method in your subclass if your
+ application has spcific requirements on visual selection.
+
+ \sa chooseContext()
+*/
+
+/*! \fn void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth)
+ \internal
+
+ \bold{X11 only:} This virtual function chooses a visual that matches
+ the OpenGL \link format() format\endlink. Reimplement this function
+ in a subclass if you need a custom visual.
+
+ \sa chooseContext()
+*/
/*!
\fn void QGLContext::reset()
@@ -2588,7 +2624,7 @@ const QGLContext* QGLContext::currentContext()
\i paintGL() - Renders the OpenGL scene. Gets called whenever the widget
needs to be updated.
\i resizeGL() - Sets up the OpenGL viewport, projection, etc. Gets
- called whenever the the widget has been resized (and also when it
+ called whenever the widget has been resized (and also when it
is shown for the first time because all newly created widgets get a
resize event automatically).
\i initializeGL() - Sets up the OpenGL rendering context, defines display
@@ -3020,11 +3056,10 @@ void QGLWidget::setFormat(const QGLFormat &format)
*/
/*
- \obsolete
-
\fn void QGLWidget::setContext(QGLContext *context,
- const QGLContext* shareContext,
- bool deleteOldContext)
+ const QGLContext* shareContext,
+ bool deleteOldContext)
+ \obsolete
Sets a new context for this widget. The QGLContext \a context must
be created using \e new. QGLWidget will delete \a context when
@@ -3174,9 +3209,10 @@ void QGLWidget::resizeOverlayGL(int, int)
{
}
-
+/*! \fn bool QGLWidget::event(QEvent *e)
+ \reimp
+*/
#if !defined(Q_OS_WINCE) && !defined(Q_WS_QWS)
-/*! \reimp */
bool QGLWidget::event(QEvent *e)
{
Q_D(QGLWidget);
diff --git a/src/opengl/qgl_win.cpp b/src/opengl/qgl_win.cpp
index bd8569a..217b0fc 100644
--- a/src/opengl/qgl_win.cpp
+++ b/src/opengl/qgl_win.cpp
@@ -884,19 +884,9 @@ static bool qLogEq(bool a, bool b)
return (((!a) && (!b)) || (a && b));
}
-/*!
- \bold{Win32 only:} This virtual function chooses a pixel
- format that matches the OpenGL \link setFormat() format\endlink.
- Reimplement this function in a subclass if you need a custom
- context.
-
- \warning The \a dummyPfd pointer and \a pdc are used as a \c
- PIXELFORMATDESCRIPTOR*. We use \c void to avoid using
- Windows-specific types in our header files.
-
- \sa chooseContext()
-*/
-
+/*
+ See qgl.cpp for qdoc comment.
+ */
int QGLContext::choosePixelFormat(void* dummyPfd, HDC pdc)
{
Q_D(QGLContext);
diff --git a/src/opengl/qgl_wince.cpp b/src/opengl/qgl_wince.cpp
index cb51598..7429071 100644
--- a/src/opengl/qgl_wince.cpp
+++ b/src/opengl/qgl_wince.cpp
@@ -552,9 +552,6 @@ void QGLWidgetPrivate::updateColormap()
ReleaseDC(q->winId(), hdc);
}
-/*!
- \reimp
-\*/
bool QGLWidget::event(QEvent *e)
{
Q_D(QGLWidget);
diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp
index 28c34de..7ed7a23 100644
--- a/src/opengl/qgl_x11.cpp
+++ b/src/opengl/qgl_x11.cpp
@@ -443,19 +443,9 @@ bool QGLContext::chooseContext(const QGLContext* shareContext)
return true;
}
-
-/*!
- \bold{X11 only:} This virtual function tries to find a
- visual that matches the format, reducing the demands if the original
- request cannot be met.
-
- The algorithm for reducing the demands of the format is quite
- simple-minded, so override this method in your subclass if your
- application has spcific requirements on visual selection.
-
- \sa chooseContext()
-*/
-
+/*
+ See qgl.cpp for qdoc comment.
+ */
void *QGLContext::chooseVisual()
{
Q_D(QGLContext);
@@ -519,17 +509,9 @@ void *QGLContext::chooseVisual()
return vis;
}
-
-/*!
- \internal
-
- \bold{X11 only:} This virtual function chooses a visual
- that matches the OpenGL \link format() format\endlink. Reimplement this
- function in a subclass if you need a custom visual.
-
- \sa chooseContext()
-*/
-
+/*
+ See qgl.cpp for qdoc comment.
+ */
void *QGLContext::tryVisual(const QGLFormat& f, int bufDepth)
{
Q_D(QGLContext);
diff --git a/src/plugins/accessible/widgets/rangecontrols.h b/src/plugins/accessible/widgets/rangecontrols.h
index aea91e1..57073ee 100644
--- a/src/plugins/accessible/widgets/rangecontrols.h
+++ b/src/plugins/accessible/widgets/rangecontrols.h
@@ -60,6 +60,7 @@ class QDial;
#ifndef QT_NO_SPINBOX
class QAccessibleAbstractSpinBox: public QAccessibleWidgetEx, public QAccessibleValueInterface
{
+ Q_ACCESSIBLE_OBJECT
public:
explicit QAccessibleAbstractSpinBox(QWidget *w);
@@ -132,6 +133,7 @@ protected:
class QAccessibleAbstractSlider: public QAccessibleWidgetEx, public QAccessibleValueInterface
{
+ Q_ACCESSIBLE_OBJECT
public:
explicit QAccessibleAbstractSlider(QWidget *w, Role r = Slider);
diff --git a/src/plugins/accessible/widgets/simplewidgets.h b/src/plugins/accessible/widgets/simplewidgets.h
index d4552e3..d1fd0da 100644
--- a/src/plugins/accessible/widgets/simplewidgets.h
+++ b/src/plugins/accessible/widgets/simplewidgets.h
@@ -115,6 +115,7 @@ public:
class QAccessibleLineEdit : public QAccessibleWidgetEx, public QAccessibleTextInterface,
public QAccessibleSimpleEditableTextInterface
{
+ Q_ACCESSIBLE_OBJECT
public:
explicit QAccessibleLineEdit(QWidget *o, const QString &name = QString());
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
index 91a60e7..a68bc8f 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp
@@ -275,7 +275,6 @@ private:
int lastLockedHeight;
IDirectFB *fb;
- DFBSurfaceDescription fbDescription;
int fbWidth;
int fbHeight;
@@ -384,7 +383,7 @@ void QDirectFBPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op)
{
Q_D(QDirectFBPaintEngine);
d->dirtyClip = true;
- const QPoint bottom = d->transform.map(QPoint(0, path.controlPointRect().y2));
+ const QPoint bottom = d->transform.map(QPoint(0, int(path.controlPointRect().y2)));
if (bottom.y() >= d->lastLockedHeight)
d->lock();
QRasterPaintEngine::clip(path, op);
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
index 7297a99..c9b676a 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp
@@ -271,7 +271,7 @@ void QDirectFBPixmapData::fill(const QColor &color)
forceRaster = false;
setSerialNumber(++global_ser_no);
if (!dfbSurface) {
- qWarning("QDirecttFBPixmapData::fill()");
+ qWarning("QDirectFBPixmapData::fill()");
invalidate();
return;
}
diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
index f571d1b..98e32ed 100644
--- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
+++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp
@@ -205,6 +205,7 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QSize &size,
SurfaceCreationOptions options)
{
DFBSurfaceDescription desc;
+ memset(&desc, 0, sizeof(DFBSurfaceDescription));
desc.flags = DFBSurfaceDescriptionFlags(DSDESC_WIDTH|DSDESC_HEIGHT);
if (!QDirectFBScreen::initSurfaceDescriptionPixelFormat(&desc, format))
return 0;
@@ -213,7 +214,6 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(const QSize &size,
return createDFBSurface(desc, options);
}
-
IDirectFBSurface *QDirectFBScreen::createDFBSurface(DFBSurfaceDescription desc, SurfaceCreationOptions options)
{
DFBResult result = DFB_OK;
@@ -247,6 +247,7 @@ IDirectFBSurface *QDirectFBScreen::createDFBSurface(DFBSurfaceDescription desc,
}
desc.caps = DFBSurfaceCapabilities(desc.caps & ~DSCAPS_VIDEOONLY);
}
+
if (d_ptr->directFBFlags & SystemOnly)
desc.caps = DFBSurfaceCapabilities(desc.caps | DSCAPS_SYSTEMONLY);
@@ -293,14 +294,14 @@ IDirectFBSurface *QDirectFBScreen::copyToDFBSurface(const QImage &img,
IDirectFBSurface *dfbSurface = createDFBSurface(image.size(), pixmapFormat, options);
if (!dfbSurface) {
- qWarning("QDirectFBPixmapData::fromImage() Couldn't create surface");
+ qWarning("QDirectFBScreen::copyToDFBSurface() Couldn't create surface");
return 0;
}
#ifndef QT_NO_DIRECTFB_PREALLOCATED
IDirectFBSurface *imgSurface = createDFBSurface(image, DontTrackSurface);
if (!imgSurface) {
- qWarning("QDirectFBPixmapData::fromImage()");
+ qWarning("QDirectFBScreen::copyToDFBSurface()");
QDirectFBScreen::releaseDFBSurface(dfbSurface);
return 0;
}
@@ -315,7 +316,7 @@ IDirectFBSurface *QDirectFBScreen::copyToDFBSurface(const QImage &img,
dfbSurface->SetBlittingFlags(dfbSurface, flags);
DFBResult result = dfbSurface->Blit(dfbSurface, imgSurface, 0, 0, 0);
if (result != DFB_OK)
- DirectFBError("QDirectFBPixmapData::fromImage()", result);
+ DirectFBError("QDirectFBScreen::copyToDFBSurface()", result);
dfbSurface->ReleaseSource(dfbSurface);
imgSurface->Release(imgSurface);
#else // QT_NO_DIRECTFB_PREALLOCATED
@@ -445,6 +446,7 @@ QImage::Format QDirectFBScreen::getImageFormat(IDirectFBSurface *surface)
DFBSurfaceDescription QDirectFBScreen::getSurfaceDescription(const QImage &image)
{
DFBSurfaceDescription description;
+ memset(&description, 0, sizeof(DFBSurfaceDescription));
const DFBSurfacePixelFormat format = getSurfacePixelFormat(image.format());
@@ -479,6 +481,7 @@ DFBSurfaceDescription QDirectFBScreen::getSurfaceDescription(const uint *buffer,
int length)
{
DFBSurfaceDescription description;
+ memset(&description, 0, sizeof(DFBSurfaceDescription));
description.flags = DFBSurfaceDescriptionFlags(DSDESC_CAPS
| DSDESC_WIDTH
@@ -917,6 +920,8 @@ bool QDirectFBScreen::connect(const QString &displaySpec)
d_ptr->dfb->SetCooperativeLevel(d_ptr->dfb, DFSCL_FULLSCREEN);
DFBSurfaceDescription description;
+ memset(&description, 0, sizeof(DFBSurfaceDescription));
+
description.flags = DFBSurfaceDescriptionFlags(DSDESC_CAPS);
if (::setIntOption(displayArgs, QLatin1String("width"), &description.width))
description.flags = DFBSurfaceDescriptionFlags(description.flags | DSDESC_WIDTH);
diff --git a/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp b/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
index c7249d3..3273513 100644
--- a/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
+++ b/src/plugins/iconengines/svgiconengine/qsvgiconengine.cpp
@@ -122,16 +122,10 @@ QSize QSvgIconEngine::actualSize(const QSize &size, QIcon::Mode mode,
return size;
}
- QSvgRenderer renderer;
- d->loadDataForModeAndState(&renderer, mode, state);
- if (renderer.isValid()) {
- QSize defaultSize = renderer.defaultSize();
- if (!defaultSize.isNull())
- defaultSize.scale(size, Qt::KeepAspectRatio);
- return defaultSize;
- } else {
+ QPixmap pm = pixmap(size, mode, state);
+ if (pm.isNull())
return QSize();
- }
+ return pm.size();
}
void QSvgIconEnginePrivate::loadDataForModeAndState(QSvgRenderer *renderer, QIcon::Mode mode, QIcon::State state)
diff --git a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
index bacf23b..0574341 100644
--- a/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
+++ b/src/plugins/sqldrivers/sqlite_symbian/sqlite_symbian.pro
@@ -2,7 +2,5 @@
TEMPLATE = subdirs
# We just want to extract the zip file containing sqlite binaries for Symbian
-!exists($${EPOCROOT}epoc32/release/armv5/urel/sqlite3.dll): {
- BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip"
-}
+BLD_INF_RULES.prj_exports += ":zip SQLite3_v9.2.zip"
diff --git a/src/qt3support/network/q3http.cpp b/src/qt3support/network/q3http.cpp
index f1590a6..591b381 100644
--- a/src/qt3support/network/q3http.cpp
+++ b/src/qt3support/network/q3http.cpp
@@ -626,7 +626,7 @@ void Q3HttpHeader::setContentLength( int len )
}
/*!
- Returns true if the header has an entry for the the special HTTP
+ Returns true if the header has an entry for the special HTTP
header field \c content-type; otherwise returns false.
\sa contentType() setContentType()
diff --git a/src/qt3support/network/q3urloperator.cpp b/src/qt3support/network/q3urloperator.cpp
index 3f334a8..b415e12 100644
--- a/src/qt3support/network/q3urloperator.cpp
+++ b/src/qt3support/network/q3urloperator.cpp
@@ -543,7 +543,7 @@ const Q3NetworkOperation *Q3UrlOperator::rename( const QString &oldname, const Q
in mind that the get() and put() operations emit this signal
through the Q3UrlOperator. The number of transferred bytes and the
total bytes that you receive as arguments in this signal do not
- relate to the the whole copy operation; they relate first to the
+ relate to the whole copy operation; they relate first to the
get() and then to the put() operation. Always check what type of
operation the signal comes from; this is given in the signal's
last argument.
diff --git a/src/qt3support/widgets/q3action.cpp b/src/qt3support/widgets/q3action.cpp
index 4e1a1bf..311212a 100644
--- a/src/qt3support/widgets/q3action.cpp
+++ b/src/qt3support/widgets/q3action.cpp
@@ -497,7 +497,7 @@ Q3Action::Q3Action(const QIcon& icon, const QString& menuText, QKeySequence acce
}
/*!
- This constructor results in an icon-less action with the the menu
+ This constructor results in an icon-less action with the menu
text \a menuText and keyboard accelerator \a accel. It is a child
of \a parent and called \a name.
diff --git a/src/qt3support/widgets/q3groupbox.cpp b/src/qt3support/widgets/q3groupbox.cpp
index 1fa7e7c..e0b609a 100644
--- a/src/qt3support/widgets/q3groupbox.cpp
+++ b/src/qt3support/widgets/q3groupbox.cpp
@@ -382,7 +382,7 @@ int Q3GroupBox::insideSpacing() const
}
/*!
- Sets the the width of the inside margin to \a m pixels.
+ Sets the width of the inside margin to \a m pixels.
\sa insideMargin()
*/
@@ -954,7 +954,7 @@ int Q3GroupBox::frameWidth() const
\fn int Q3GroupBox::margin() const
\since 4.2
- Returns the width of the the margin around the contents of the widget.
+ Returns the width of the margin around the contents of the widget.
This function uses QWidget::getContentsMargins() to get the margin.
diff --git a/src/qt3support/widgets/q3popupmenu.cpp b/src/qt3support/widgets/q3popupmenu.cpp
index 7f890b5..0b3a524 100644
--- a/src/qt3support/widgets/q3popupmenu.cpp
+++ b/src/qt3support/widgets/q3popupmenu.cpp
@@ -134,7 +134,7 @@ QT_BEGIN_NAMESPACE
\fn int Q3PopupMenu::margin() const
\since 4.2
- Returns the with of the the margin around the contents of the widget.
+ Returns the width of the margin around the contents of the widget.
This function uses QWidget::getContentsMargins() to get the margin.
\sa setMargin(), QWidget::getContentsMargins()
diff --git a/src/qt3support/widgets/q3progressbar.cpp b/src/qt3support/widgets/q3progressbar.cpp
index caae460..81f0dbf 100644
--- a/src/qt3support/widgets/q3progressbar.cpp
+++ b/src/qt3support/widgets/q3progressbar.cpp
@@ -455,7 +455,7 @@ void Q3ProgressBar::paintEvent(QPaintEvent *)
\fn int Q3ProgressBar::margin() const
\since 4.2
- Returns the with of the the margin around the contents of the widget.
+ Returns the width of the margin around the contents of the widget.
This function uses QWidget::getContentsMargins() to get the margin.
\sa setMargin(), QWidget::getContentsMargins()
diff --git a/src/qt3support/widgets/q3scrollview.cpp b/src/qt3support/widgets/q3scrollview.cpp
index 91a9203..5a91027 100644
--- a/src/qt3support/widgets/q3scrollview.cpp
+++ b/src/qt3support/widgets/q3scrollview.cpp
@@ -2038,7 +2038,7 @@ void Q3ScrollView::center(int x, int y)
\list
\i Margin 0.0 allows (x, y) to be on the edge of the visible area.
\i Margin 0.5 ensures that (x, y) is in middle 50% of the visible area.
- \i Margin 1.0 ensures that (x, y) is in the center of the the visible area.
+ \i Margin 1.0 ensures that (x, y) is in the center of the visible area.
\endlist
*/
void Q3ScrollView::center(int x, int y, float xmargin, float ymargin)
diff --git a/src/s60installs/qt_libs.pro b/src/s60installs/qt_libs.pro
index 99fde62..9aadfc0 100644
--- a/src/s60installs/qt_libs.pro
+++ b/src/s60installs/qt_libs.pro
@@ -66,7 +66,7 @@ symbian: {
}
contains(QT_CONFIG, phonon): {
- qtlibraries.sources += QtPhonon.dll
+ qtlibraries.sources += Phonon.dll
}
BLD_INF_RULES.prj_exports += "qt.iby $$CORE_MW_LAYER_IBY_EXPORT_PATH(qt.iby)"
diff --git a/src/script/qscriptvalueiterator.cpp b/src/script/qscriptvalueiterator.cpp
index fe5ef9f..1a60632 100644
--- a/src/script/qscriptvalueiterator.cpp
+++ b/src/script/qscriptvalueiterator.cpp
@@ -106,6 +106,7 @@ QScriptValueIteratorPrivate::QScriptValueIteratorPrivate()
*/
QScriptValueIteratorPrivate::~QScriptValueIteratorPrivate()
{
+ delete it;
}
/*!
@@ -130,7 +131,6 @@ QScriptValueIterator::QScriptValueIterator(const QScriptValue &object)
QScriptValueIterator::~QScriptValueIterator()
{
if (d_ptr) {
- delete d_ptr->it;
delete d_ptr;
d_ptr = 0;
}
@@ -312,7 +312,7 @@ void QScriptValueIterator::remove()
QScriptValueIterator& QScriptValueIterator::operator=(QScriptValue &object)
{
if (d_ptr) {
- delete d_ptr->it;
+ delete d_ptr;
d_ptr = 0;
}
QScriptValueImpl val = QScriptValuePrivate::valueOf(object);
diff --git a/src/scripttools/debugging/qscriptenginedebugger.cpp b/src/scripttools/debugging/qscriptenginedebugger.cpp
index e35bd1d..0f8b600 100644
--- a/src/scripttools/debugging/qscriptenginedebugger.cpp
+++ b/src/scripttools/debugging/qscriptenginedebugger.cpp
@@ -63,16 +63,23 @@
#include <QtGui/qtoolbar.h>
#include <QtGui/qboxlayout.h>
+// this has to be outside the namespace
+static void initScriptEngineDebuggerResources()
+{
+ Q_INIT_RESOURCE(scripttools_debugging);
+}
+
+QT_BEGIN_NAMESPACE
+
class QtScriptDebuggerResourceInitializer
{
public:
QtScriptDebuggerResourceInitializer() {
- Q_INIT_RESOURCE(scripttools_debugging);
+ // call outside-the-namespace function
+ initScriptEngineDebuggerResources();
}
};
-QT_BEGIN_NAMESPACE
-
/*!
\since 4.5
\class QScriptEngineDebugger
diff --git a/src/sql/drivers/ibase/qsql_ibase.cpp b/src/sql/drivers/ibase/qsql_ibase.cpp
index 6834d9a..1645555 100644
--- a/src/sql/drivers/ibase/qsql_ibase.cpp
+++ b/src/sql/drivers/ibase/qsql_ibase.cpp
@@ -55,6 +55,7 @@
#include <limits.h>
#include <math.h>
#include <qdebug.h>
+#include <QVarLengthArray>
QT_BEGIN_NAMESPACE
@@ -66,8 +67,11 @@ QT_BEGIN_NAMESPACE
enum { QIBaseChunkSize = SHRT_MAX / 2 };
-static bool getIBaseError(QString& msg, ISC_STATUS* status, ISC_LONG &sqlcode,
- QTextCodec *tc)
+#if defined(FB_API_VER) && FB_API_VER >= 20
+static bool getIBaseError(QString& msg, const ISC_STATUS* status, ISC_LONG &sqlcode, QTextCodec *tc)
+#else
+static bool getIBaseError(QString& msg, ISC_STATUS* status, ISC_LONG &sqlcode, QTextCodec *tc)
+#endif
{
if (status[0] != 1 || status[1] <= 0)
return false;
@@ -75,7 +79,11 @@ static bool getIBaseError(QString& msg, ISC_STATUS* status, ISC_LONG &sqlcode,
msg.clear();
sqlcode = isc_sqlcode(status);
char buf[512];
+#if defined(FB_API_VER) && FB_API_VER >= 20
+ while(fb_interpret(buf, 512, &status)) {
+#else
while(isc_interprete(buf, &status)) {
+#endif
if(!msg.isEmpty())
msg += QLatin1String(" - ");
if (tc)
@@ -576,7 +584,7 @@ QVariant QIBaseResultPrivate::fetchArray(int pos, ISC_QUAD *arr)
int arraySize = 1, subArraySize;
short dimensions = desc.array_desc_dimensions;
- short *numElements = new short[dimensions];
+ QVarLengthArray<short> numElements(dimensions);
for(int i = 0; i < dimensions; ++i) {
subArraySize = (desc.array_desc_bounds[i].array_bound_upper -
@@ -605,9 +613,7 @@ QVariant QIBaseResultPrivate::fetchArray(int pos, ISC_QUAD *arr)
QSqlError::StatementError))
return list;
- readArrayBuffer(list, ba.data(), 0, numElements, &desc, tc);
-
- delete[] numElements;
+ readArrayBuffer(list, ba.data(), 0, numElements.data(), &desc, tc);
return QVariant(list);
}
diff --git a/src/sql/drivers/mysql/qsql_mysql.cpp b/src/sql/drivers/mysql/qsql_mysql.cpp
index 1f54db7..53645c9 100644
--- a/src/sql/drivers/mysql/qsql_mysql.cpp
+++ b/src/sql/drivers/mysql/qsql_mysql.cpp
@@ -163,18 +163,21 @@ static inline QVariant qDateTimeFromString(QString &val)
#endif
}
-class QMYSQLResultPrivate
+class QMYSQLResultPrivate : public QObject
{
+ Q_OBJECT
public:
- QMYSQLResultPrivate(QMYSQLDriverPrivate* dp) : d(dp), result(0),
+ QMYSQLResultPrivate(const QMYSQLDriver* dp) : driver(dp), result(0),
rowsAffected(0), hasBlobs(false)
#if MYSQL_VERSION_ID >= 40108
, stmt(0), meta(0), inBinds(0), outBinds(0)
#endif
, precisionPolicy(QSql::HighPrecision)
- {}
+ {
+ connect(dp, SIGNAL(destroyed()), this, SLOT(driverDestroyed()));
+ }
- QMYSQLDriverPrivate* d;
+ const QMYSQLDriver* driver;
MYSQL_RES *result;
MYSQL_ROW row;
@@ -207,6 +210,8 @@ public:
MYSQL_BIND *outBinds;
#endif
QSql::NumericalPrecisionPolicy precisionPolicy;
+private Q_SLOTS:
+ void driverDestroyed() { driver = NULL; }
};
#ifndef QT_NO_TEXTCODEC
@@ -379,7 +384,7 @@ bool QMYSQLResultPrivate::bindInValues()
QMYSQLResult::QMYSQLResult(const QMYSQLDriver* db)
: QSqlResult(db)
{
- d = new QMYSQLResultPrivate(db->d);
+ d = new QMYSQLResultPrivate(db);
}
QMYSQLResult::~QMYSQLResult()
@@ -391,7 +396,7 @@ QMYSQLResult::~QMYSQLResult()
QVariant QMYSQLResult::handle() const
{
#if MYSQL_VERSION_ID >= 40108
- if(d->d->preparedQuerys)
+ if(d->driver && d->driver->d->preparedQuerys)
return d->meta ? qVariantFromValue(d->meta) : qVariantFromValue(d->stmt);
else
#endif
@@ -406,8 +411,8 @@ void QMYSQLResult::cleanup()
// must iterate trough leftover result sets from multi-selects or stored procedures
// if this isn't done subsequent queries will fail with "Commands out of sync"
#if MYSQL_VERSION_ID >= 40100
- while (d->d->mysql && mysql_next_result(d->d->mysql) == 0) {
- MYSQL_RES *res = mysql_store_result(d->d->mysql);
+ while (d->driver && d->driver->d->mysql && mysql_next_result(d->driver->d->mysql) == 0) {
+ MYSQL_RES *res = mysql_store_result(d->driver->d->mysql);
if (res)
mysql_free_result(res);
}
@@ -447,11 +452,14 @@ void QMYSQLResult::cleanup()
setAt(-1);
setActive(false);
- d->d->preparedQuerys = d->d->preparedQuerysEnabled;
+ if(d->driver)
+ d->driver->d->preparedQuerys = d->driver->d->preparedQuerysEnabled;
}
bool QMYSQLResult::fetch(int i)
{
+ if(!d->driver)
+ return false;
if (isForwardOnly()) { // fake a forward seek
if (at() < i) {
int x = i - at();
@@ -463,7 +471,7 @@ bool QMYSQLResult::fetch(int i)
}
if (at() == i)
return true;
- if (d->d->preparedQuerys) {
+ if (d->driver->d->preparedQuerys) {
#if MYSQL_VERSION_ID >= 40108
mysql_stmt_data_seek(d->stmt, i);
@@ -494,7 +502,9 @@ bool QMYSQLResult::fetch(int i)
bool QMYSQLResult::fetchNext()
{
- if (d->d->preparedQuerys) {
+ if(!d->driver)
+ return false;
+ if (d->driver->d->preparedQuerys) {
#if MYSQL_VERSION_ID >= 40108
if (mysql_stmt_fetch(d->stmt))
return false;
@@ -512,6 +522,8 @@ bool QMYSQLResult::fetchNext()
bool QMYSQLResult::fetchLast()
{
+ if(!d->driver)
+ return false;
if (isForwardOnly()) { // fake this since MySQL can't seek on forward only queries
bool success = fetchNext(); // did we move at all?
while (fetchNext()) {};
@@ -519,7 +531,7 @@ bool QMYSQLResult::fetchLast()
}
my_ulonglong numRows;
- if (d->d->preparedQuerys) {
+ if (d->driver->d->preparedQuerys) {
#if MYSQL_VERSION_ID >= 40108
numRows = mysql_stmt_num_rows(d->stmt);
#else
@@ -553,15 +565,18 @@ QVariant QMYSQLResult::data(int field)
return QVariant();
}
+ if (!d->driver)
+ return QVariant();
+
int fieldLength = 0;
const QMYSQLResultPrivate::QMyField &f = d->fields.at(field);
QString val;
- if (d->d->preparedQuerys) {
+ if (d->driver->d->preparedQuerys) {
if (f.nullIndicator)
return QVariant(f.type);
if (f.type != QVariant::ByteArray)
- val = toUnicode(d->d->tc, f.outField, f.bufLength);
+ val = toUnicode(d->driver->d->tc, f.outField, f.bufLength);
} else {
if (d->row[field] == NULL) {
// NULL value
@@ -569,7 +584,7 @@ QVariant QMYSQLResult::data(int field)
}
fieldLength = mysql_fetch_lengths(d->result)[field];
if (f.type != QVariant::ByteArray)
- val = toUnicode(d->d->tc, d->row[field], fieldLength);
+ val = toUnicode(d->driver->d->tc, d->row[field], fieldLength);
}
switch(f.type) {
@@ -614,7 +629,7 @@ QVariant QMYSQLResult::data(int field)
case QVariant::ByteArray: {
QByteArray ba;
- if (d->d->preparedQuerys) {
+ if (d->driver->d->preparedQuerys) {
ba = QByteArray(f.outField, f.bufLength);
} else {
ba = QByteArray(d->row[field], fieldLength);
@@ -631,7 +646,7 @@ QVariant QMYSQLResult::data(int field)
bool QMYSQLResult::isNull(int field)
{
- if (d->d->preparedQuerys)
+ if (d->driver->d->preparedQuerys)
return d->fields.at(field).nullIndicator;
else
return d->row[field] == NULL;
@@ -639,31 +654,31 @@ bool QMYSQLResult::isNull(int field)
bool QMYSQLResult::reset (const QString& query)
{
- if (!driver() || !driver()->isOpen() || driver()->isOpenError())
+ if (!driver() || !driver()->isOpen() || driver()->isOpenError() || !d->driver)
return false;
- if(d->d->preparedQuerysEnabled && prepare(query)) {
- d->d->preparedQuerys = true;
+ if(d->driver->d->preparedQuerysEnabled && prepare(query)) {
+ d->driver->d->preparedQuerys = true;
return exec();
}
- d->d->preparedQuerys = false;
+ d->driver->d->preparedQuerys = false;
- const QByteArray encQuery(fromUnicode(d->d->tc, query));
- if (mysql_real_query(d->d->mysql, encQuery.data(), encQuery.length())) {
+ const QByteArray encQuery(fromUnicode(d->driver->d->tc, query));
+ if (mysql_real_query(d->driver->d->mysql, encQuery.data(), encQuery.length())) {
setLastError(qMakeError(QCoreApplication::translate("QMYSQLResult", "Unable to execute query"),
- QSqlError::StatementError, d->d));
+ QSqlError::StatementError, d->driver->d));
return false;
}
- d->result = mysql_store_result(d->d->mysql);
- if (!d->result && mysql_field_count(d->d->mysql) > 0) {
+ d->result = mysql_store_result(d->driver->d->mysql);
+ if (!d->result && mysql_field_count(d->driver->d->mysql) > 0) {
setLastError(qMakeError(QCoreApplication::translate("QMYSQLResult", "Unable to store result"),
- QSqlError::StatementError, d->d));
+ QSqlError::StatementError, d->driver->d));
return false;
}
- int numFields = mysql_field_count(d->d->mysql);
+ int numFields = mysql_field_count(d->driver->d->mysql);
setSelect(numFields != 0);
d->fields.resize(numFields);
- d->rowsAffected = mysql_affected_rows(d->d->mysql);
+ d->rowsAffected = mysql_affected_rows(d->driver->d->mysql);
if (isSelect()) {
for(int i = 0; i < numFields; i++) {
MYSQL_FIELD* field = mysql_fetch_field_direct(d->result, i);
@@ -677,8 +692,8 @@ bool QMYSQLResult::reset (const QString& query)
int QMYSQLResult::size()
{
- if (isSelect())
- if (d->d->preparedQuerys)
+ if (d->driver && isSelect())
+ if (d->driver->d->preparedQuerys)
#if MYSQL_VERSION_ID >= 40108
return mysql_stmt_num_rows(d->stmt);
#else
@@ -697,17 +712,17 @@ int QMYSQLResult::numRowsAffected()
QVariant QMYSQLResult::lastInsertId() const
{
- if (!isActive())
+ if (!isActive() || !d->driver)
return QVariant();
- if (d->d->preparedQuerys) {
+ if (d->driver->d->preparedQuerys) {
#if MYSQL_VERSION_ID >= 40108
quint64 id = mysql_stmt_insert_id(d->stmt);
if (id)
return QVariant(id);
#endif
} else {
- quint64 id = mysql_insert_id(d->d->mysql);
+ quint64 id = mysql_insert_id(d->driver->d->mysql);
if (id)
return QVariant(id);
}
@@ -718,20 +733,20 @@ QSqlRecord QMYSQLResult::record() const
{
QSqlRecord info;
MYSQL_RES *res;
- if (!isActive() || !isSelect())
+ if (!isActive() || !isSelect() || !d->driver)
return info;
#if MYSQL_VERSION_ID >= 40108
- res = d->d->preparedQuerys ? d->meta : d->result;
+ res = d->driver->d->preparedQuerys ? d->meta : d->result;
#else
res = d->result;
#endif
- if (!mysql_errno(d->d->mysql)) {
+ if (!mysql_errno(d->driver->d->mysql)) {
mysql_field_seek(res, 0);
MYSQL_FIELD* field = mysql_fetch_field(res);
while(field) {
- info.append(qToField(field, d->d->tc));
+ info.append(qToField(field, d->driver->d->tc));
field = mysql_fetch_field(res);
}
}
@@ -741,6 +756,8 @@ QSqlRecord QMYSQLResult::record() const
bool QMYSQLResult::nextResult()
{
+ if(!d->driver)
+ return false;
#if MYSQL_VERSION_ID >= 40100
setAt(-1);
setActive(false);
@@ -754,26 +771,26 @@ bool QMYSQLResult::nextResult()
delete[] d->fields[i].outField;
d->fields.clear();
- int status = mysql_next_result(d->d->mysql);
+ int status = mysql_next_result(d->driver->d->mysql);
if (status > 0) {
setLastError(qMakeError(QCoreApplication::translate("QMYSQLResult", "Unable to execute next query"),
- QSqlError::StatementError, d->d));
+ QSqlError::StatementError, d->driver->d));
return false;
} else if (status == -1) {
return false; // No more result sets
}
- d->result = mysql_store_result(d->d->mysql);
- int numFields = mysql_field_count(d->d->mysql);
+ d->result = mysql_store_result(d->driver->d->mysql);
+ int numFields = mysql_field_count(d->driver->d->mysql);
if (!d->result && numFields > 0) {
setLastError(qMakeError(QCoreApplication::translate("QMYSQLResult", "Unable to store next result"),
- QSqlError::StatementError, d->d));
+ QSqlError::StatementError, d->driver->d));
return false;
}
setSelect(numFields > 0);
d->fields.resize(numFields);
- d->rowsAffected = mysql_affected_rows(d->d->mysql);
+ d->rowsAffected = mysql_affected_rows(d->driver->d->mysql);
if (isSelect()) {
for (int i = 0; i < numFields; i++) {
@@ -833,9 +850,11 @@ static MYSQL_TIME *toMySqlDate(QDate date, QTime time, QVariant::Type type)
bool QMYSQLResult::prepare(const QString& query)
{
+ if(!d->driver)
+ return false;
#if MYSQL_VERSION_ID >= 40108
cleanup();
- if (!d->d->preparedQuerys)
+ if (!d->driver->d->preparedQuerys)
return QSqlResult::prepare(query);
int r;
@@ -844,14 +863,14 @@ bool QMYSQLResult::prepare(const QString& query)
return false;
if (!d->stmt)
- d->stmt = mysql_stmt_init(d->d->mysql);
+ d->stmt = mysql_stmt_init(d->driver->d->mysql);
if (!d->stmt) {
setLastError(qMakeError(QCoreApplication::translate("QMYSQLResult", "Unable to prepare statement"),
- QSqlError::StatementError, d->d));
+ QSqlError::StatementError, d->driver->d));
return false;
}
- const QByteArray encQuery(fromUnicode(d->d->tc, query));
+ const QByteArray encQuery(fromUnicode(d->driver->d->tc, query));
r = mysql_stmt_prepare(d->stmt, encQuery.constData(), encQuery.length());
if (r != 0) {
setLastError(qMakeStmtError(QCoreApplication::translate("QMYSQLResult",
@@ -873,7 +892,9 @@ bool QMYSQLResult::prepare(const QString& query)
bool QMYSQLResult::exec()
{
- if (!d->d->preparedQuerys)
+ if (!d->driver)
+ return false;
+ if (!d->driver->d->preparedQuerys)
return QSqlResult::exec();
if (!d->stmt)
return false;
@@ -906,6 +927,7 @@ bool QMYSQLResult::exec()
nullVector[i] = static_cast<my_bool>(val.isNull());
currBind->is_null = &nullVector[i];
currBind->length = 0;
+ currBind->is_unsigned = 0;
switch (val.type()) {
case QVariant::ByteArray:
@@ -952,7 +974,6 @@ bool QMYSQLResult::exec()
currBind->buffer_type = MYSQL_TYPE_DOUBLE;
currBind->buffer = data;
currBind->buffer_length = sizeof(double);
- currBind->is_unsigned = 0;
break;
case QVariant::LongLong:
case QVariant::ULongLong:
@@ -963,12 +984,11 @@ bool QMYSQLResult::exec()
break;
case QVariant::String:
default: {
- QByteArray ba = fromUnicode(d->d->tc, val.toString());
+ QByteArray ba = fromUnicode(d->driver->d->tc, val.toString());
stringVector.append(ba);
currBind->buffer_type = MYSQL_TYPE_STRING;
currBind->buffer = const_cast<char *>(ba.constData());
currBind->buffer_length = ba.length();
- currBind->is_unsigned = 0;
break; }
}
}
@@ -1258,6 +1278,11 @@ bool QMYSQLDriver::open(const QString& db,
d->preparedQuerysEnabled = false;
#endif
+#ifndef QT_NO_THREAD
+ mysql_thread_init();
+#endif
+
+
setOpen(true);
setOpenError(false);
return true;
@@ -1266,6 +1291,9 @@ bool QMYSQLDriver::open(const QString& db,
void QMYSQLDriver::close()
{
if (isOpen()) {
+#ifndef QT_NO_THREAD
+ mysql_thread_end();
+#endif
mysql_close(d->mysql);
d->mysql = NULL;
setOpen(false);
@@ -1459,3 +1487,5 @@ bool QMYSQLDriver::isIdentifierEscapedImplementation(const QString &identifier,
}
QT_END_NAMESPACE
+
+#include "qsql_mysql.moc" \ No newline at end of file
diff --git a/src/sql/drivers/oci/qsql_oci.cpp b/src/sql/drivers/oci/qsql_oci.cpp
index d63c482..a7031b1 100644
--- a/src/sql/drivers/oci/qsql_oci.cpp
+++ b/src/sql/drivers/oci/qsql_oci.cpp
@@ -1789,7 +1789,7 @@ bool QOCIResult::prepare(const QString& query)
bool QOCIResult::exec()
{
int r = 0;
- ub2 stmtType;
+ ub2 stmtType=0;
ub4 iters;
ub4 mode;
QList<QByteArray> tmpStorage;
@@ -1803,6 +1803,16 @@ bool QOCIResult::exec()
OCI_ATTR_STMT_TYPE,
d->err);
+ if (r != OCI_SUCCESS && r != OCI_SUCCESS_WITH_INFO) {
+ qOraWarning("QOCIResult::exec: Unable to get statement type:", d->err);
+ setLastError(qMakeError(QCoreApplication::translate("QOCIResult",
+ "Unable to get statement type"), QSqlError::StatementError, d->err));
+#ifdef QOCI_DEBUG
+ qDebug() << "lastQuery()" << lastQuery();
+#endif
+ return false;
+ }
+
if (stmtType == OCI_STMT_SELECT) {
iters = 0;
mode = OCI_DEFAULT;
diff --git a/src/sql/kernel/qsqldatabase.cpp b/src/sql/kernel/qsqldatabase.cpp
index 6232452..a270c0e 100644
--- a/src/sql/kernel/qsqldatabase.cpp
+++ b/src/sql/kernel/qsqldatabase.cpp
@@ -378,7 +378,7 @@ void QSqlDatabasePrivate::disable()
the connection name argument, if you don't pass the connection
name argument, the default connection is assumed. The following
snippet shows how to create and open a default connection to a
- MySQL database:
+ PostgreSQL database:
\snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 0
diff --git a/src/sql/kernel/qsqlquery.cpp b/src/sql/kernel/qsqlquery.cpp
index e6729a5..2a07e28 100644
--- a/src/sql/kernel/qsqlquery.cpp
+++ b/src/sql/kernel/qsqlquery.cpp
@@ -1195,7 +1195,7 @@ void QSqlQuery::finish()
The query will be repositioned on an \e invalid record in the new
result set and must be navigated to a valid record before data
values can be retrieved. If a new result set isn't available the
- function returns false and the the query is set to inactive. In any
+ function returns false and the query is set to inactive. In any
case the old result set will be discarded.
When one of the statements is a non-select statement a count of
diff --git a/src/src.pro b/src/src.pro
index 667df9c..f131e4f 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -23,6 +23,9 @@ win32:{
!wince*: SRC_SUBDIRS += src_tools_idc
}
+# TODO the following line should be between opengl and webkit when the 'symbian' block is removed
+contains(QT_CONFIG, phonon): SRC_SUBDIRS += src_phonon
+
!symbian {
contains(QT_CONFIG, opengl)|contains(QT_CONFIG, opengles1)|contains(QT_CONFIG, opengles2): SRC_SUBDIRS += src_opengl
contains(QT_CONFIG, xmlpatterns): SRC_SUBDIRS += src_xmlpatterns
@@ -31,7 +34,6 @@ contains(QT_CONFIG, webkit) {
#exists($$QT_SOURCE_TREE/src/3rdparty/webkit/JavaScriptCore/JavaScriptCore.pro): SRC_SUBDIRS += src_javascriptcore
SRC_SUBDIRS += src_webkit
}
-contains(QT_CONFIG, phonon): SRC_SUBDIRS += src_phonon
contains(QT_CONFIG, scripttools): SRC_SUBDIRS += src_scripttools
SRC_SUBDIRS += src_plugins
}
diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index 433a3ad..6a897e8 100644
--- a/src/svg/qsvghandler.cpp
+++ b/src/svg/qsvghandler.cpp
@@ -1673,10 +1673,19 @@ static void parseCSStoXMLAttrs(const QVector<QCss::Declaration> &declarations,
const QCss::Declaration &decl = declarations.at(i);
if (decl.d->property.isEmpty())
continue;
- if (decl.d->values.count() != 1)
- continue;
QCss::Value val = decl.d->values.first();
- QString valueStr = val.toString();
+ QString valueStr;
+ if (decl.d->values.count() != 1) {
+ for (int i=0; i<decl.d->values.count(); ++i) {
+ const QString &value = decl.d->values[i].toString();
+ if (value.isEmpty())
+ valueStr += QLatin1Char(',');
+ else
+ valueStr += value;
+ }
+ } else {
+ valueStr = val.toString();
+ }
if (val.type == QCss::Value::Uri) {
valueStr.prepend(QLatin1String("url("));
valueStr.append(QLatin1Char(')'));
diff --git a/src/testlib/qtest_global.h b/src/testlib/qtest_global.h
index ebfdae1..ba7da2a 100644
--- a/src/testlib/qtest_global.h
+++ b/src/testlib/qtest_global.h
@@ -52,7 +52,7 @@ QT_MODULE(Test)
#ifdef QTEST_EMBED
# define Q_TESTLIB_EXPORT
-#elif !defined(QT_SHARED)
+#elif !defined(QT_SHARED) && !(defined(Q_OS_SYMBIAN) && defined(Q_CC_RVCT))
# define Q_TESTLIB_EXPORT
#else
# ifdef QTESTLIB_MAKEDLL
@@ -64,7 +64,7 @@ QT_MODULE(Test)
#if (defined (Q_CC_MSVC) && _MSC_VER < 1310) || defined (Q_CC_SUN) || defined (Q_CC_XLC) || (defined (Q_CC_GNU) && (__GNUC__ - 0 < 3)) || defined (Q_CC_NOKIAX86)
# define QTEST_NO_SPECIALIZATIONS
-#endif
+#endif
#if (defined Q_CC_HPACC) && (defined __ia64)
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index b94d3fa..ba68636 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -2109,7 +2109,7 @@ events are reported.
You can set the lexical handler with
QXmlReader::setLexicalHandler().
- This interface's design is based on the the SAX2 extension
+ This interface's design is based on the SAX2 extension
LexicalHandler.
The interface provides the startDTD(), endDTD(), startEntity(),
diff --git a/src/xmlpatterns/expr/qpath.cpp b/src/xmlpatterns/expr/qpath.cpp
index 33bfa0f..a60f622 100644
--- a/src/xmlpatterns/expr/qpath.cpp
+++ b/src/xmlpatterns/expr/qpath.cpp
@@ -170,7 +170,7 @@ Expression::Ptr Path::compress(const StaticContext::Ptr &context)
/* We do this as late as we can, such that we pick up the most recent type
* from the operand. */
- if(m_isLast && !m_kind == XSLTForEach && m_operand2->staticType()->itemType() == BuiltinTypes::item)
+ if(m_isLast && m_kind != XSLTForEach && m_operand2->staticType()->itemType() == BuiltinTypes::item)
m_checkXPTY0018 = true;
return me;
diff --git a/src/xmlpatterns/expr/qxsltsimplecontentconstructor.cpp b/src/xmlpatterns/expr/qxsltsimplecontentconstructor.cpp
index ef77c76..104c5cc 100644
--- a/src/xmlpatterns/expr/qxsltsimplecontentconstructor.cpp
+++ b/src/xmlpatterns/expr/qxsltsimplecontentconstructor.cpp
@@ -105,7 +105,7 @@ Item XSLTSimpleContentConstructor::evaluateSingleton(const DynamicContext::Ptr &
QString result;
bool previousIsText = false;
- bool discard;
+ bool discard = false;
if(next)
{
diff --git a/tests/auto/_networkselftest/_networkselftest.pro b/tests/auto/_networkselftest/_networkselftest.pro
new file mode 100644
index 0000000..9e2ad0e
--- /dev/null
+++ b/tests/auto/_networkselftest/_networkselftest.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+
+SOURCES += tst_networkselftest.cpp
+QT = core network
+DEFINES += SRCDIR=\\\"$$PWD\\\"
+
diff --git a/tests/auto/_networkselftest/tst_networkselftest.cpp b/tests/auto/_networkselftest/tst_networkselftest.cpp
new file mode 100644
index 0000000..dab4433
--- /dev/null
+++ b/tests/auto/_networkselftest/tst_networkselftest.cpp
@@ -0,0 +1,592 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QtTest/QtTest>
+#include <QtNetwork/QtNetwork>
+#include "../network-settings.h"
+
+class tst_NetworkSelfTest: public QObject
+{
+ Q_OBJECT
+private slots:
+ void hostTest();
+ void dnsResolution_data();
+ void dnsResolution();
+ void serverReachability();
+ void remotePortsOpen_data();
+ void remotePortsOpen();
+
+ // specific protocol tests
+ void ftpServer();
+ void imapServer();
+ void httpServer();
+ void httpsServer();
+ void httpProxy();
+ void httpProxyBasicAuth();
+ void httpProxyNtlmAuth();
+ void socks5Proxy();
+ void socks5ProxyAuth();
+};
+
+class Chat
+{
+public:
+ enum Type {
+ Reconnect,
+ Send,
+ Expect,
+ SkipBytes,
+ DiscardUntil,
+ DiscardUntilDisconnect,
+ Disconnect,
+ RemoteDisconnect,
+ StartEncryption
+ };
+ Chat(Type t, const QByteArray &d)
+ : data(d), type(t)
+ {
+ }
+ Chat(Type t, int val = 0)
+ : value(val), type(t)
+ {
+ }
+
+ static inline Chat send(const QByteArray &data)
+ { return Chat(Send, data); }
+ static inline Chat expect(const QByteArray &data)
+ { return Chat(Expect, data); }
+ static inline Chat discardUntil(const QByteArray &data)
+ { return Chat(DiscardUntil, data); }
+ static inline Chat skipBytes(int count)
+ { return Chat(SkipBytes, count); }
+
+ QByteArray data;
+ int value;
+ Type type;
+};
+
+static QString prettyByteArray(const QByteArray &array)
+{
+ // any control chars?
+ QString result;
+ result.reserve(array.length() + array.length() / 3);
+ for (int i = 0; i < array.length(); ++i) {
+ char c = array.at(i);
+ switch (c) {
+ case '\n':
+ result += "\\n";
+ continue;
+ case '\r':
+ result += "\\r";
+ continue;
+ case '\t':
+ result += "\\t";
+ continue;
+ case '"':
+ result += "\\\"";
+ continue;
+ default:
+ break;
+ }
+
+ if (c < 0x20 || uchar(c) >= 0x7f) {
+ result += '\\';
+ result += QString::number(uchar(c), 8);
+ } else {
+ result += c;
+ }
+ }
+ return result;
+}
+
+static bool doSocketRead(QTcpSocket *socket, int minBytesAvailable, int timeout = 2000)
+{
+ QTime timer;
+ timer.start();
+ forever {
+ if (socket->bytesAvailable() >= minBytesAvailable)
+ return true;
+ if (socket->state() == QAbstractSocket::UnconnectedState
+ || timer.elapsed() >= timeout)
+ return false;
+ if (!socket->waitForReadyRead(timeout - timer.elapsed()))
+ return false;
+ }
+}
+
+static bool doSocketFlush(QTcpSocket *socket, int timeout = 2000)
+{
+#ifndef QT_NO_OPENSSL
+ QSslSocket *sslSocket = qobject_cast<QSslSocket *>(socket);
+#endif
+ QTime timer;
+ timer.start();
+ forever {
+ if (socket->bytesToWrite() == 0
+#ifndef QT_NO_OPENSSL
+ && sslSocket->encryptedBytesToWrite() == 0
+#endif
+ )
+ return true;
+ if (socket->state() == QAbstractSocket::UnconnectedState
+ || timer.elapsed() >= timeout)
+ return false;
+ if (!socket->waitForBytesWritten(timeout - timer.elapsed()))
+ return false;
+ }
+}
+
+static void netChat(int port, const QList<Chat> &chat)
+{
+#ifndef QT_NO_OPENSSL
+ QSslSocket socket;
+#else
+ QTcpSocket socket;
+#endif
+
+ socket.connectToHost(QtNetworkSettings::serverName(), port);
+ qDebug() << 0 << "Connecting to server on port" << port;
+ QVERIFY2(socket.waitForConnected(10000),
+ QString("Failed to connect to server in step 0: %1").arg(socket.errorString()).toLocal8Bit());
+
+ // now start the chat
+ QList<Chat>::ConstIterator it = chat.constBegin();
+ for (int i = 1; it != chat.constEnd(); ++it, ++i) {
+ if (it->type != Chat::Reconnect
+ && socket.state() != QAbstractSocket::ConnectedState
+ && socket.state() != QAbstractSocket::ClosingState)
+ QFAIL(QString("Internal error: socket is in invalid state %1 in step %2")
+ .arg(socket.state()).arg(i).toLocal8Bit());
+
+ switch (it->type) {
+ case Chat::Expect: {
+ qDebug() << i << "Expecting" << prettyByteArray(it->data);
+ if (!doSocketRead(&socket, it->data.length()))
+ QFAIL(QString("Failed to receive data in step %1: timeout").arg(i).toLocal8Bit());
+
+ // pop that many bytes off the socket
+ QByteArray received = socket.read(it->data.length());
+
+ // is it what we expected?
+ QVERIFY2(received == it->data,
+ QString("Did not receive expected data in step %1: data received was:\n%2")
+ .arg(i).arg(prettyByteArray(received)).toLocal8Bit());
+
+ break;
+ }
+
+ case Chat::DiscardUntil:
+ qDebug() << i << "Discarding until" << prettyByteArray(it->data);
+ while (true) {
+ // scan the buffer until we have our string
+ if (!doSocketRead(&socket, it->data.length()))
+ QFAIL(QString("Failed to receive data in step %1: timeout").arg(i).toLocal8Bit());
+
+ QByteArray buffer;
+ buffer.resize(socket.bytesAvailable());
+ socket.peek(buffer.data(), socket.bytesAvailable());
+
+ int pos = buffer.indexOf(it->data);
+ if (pos == -1) {
+ // data not found, keep trying
+ continue;
+ }
+
+ buffer = socket.read(pos + it->data.length());
+ qDebug() << i << "Discarded" << prettyByteArray(buffer);
+ break;
+ }
+ break;
+
+ case Chat::SkipBytes: {
+ qDebug() << i << "Skipping" << it->value << "bytes";
+ if (!doSocketRead(&socket, it->value))
+ QFAIL(QString("Failed to receive data in step %1: timeout").arg(i).toLocal8Bit());
+
+ // now discard the bytes
+ QByteArray buffer = socket.read(it->value);
+ qDebug() << i << "Skipped" << prettyByteArray(buffer);
+ break;
+ }
+
+ case Chat::Send: {
+ qDebug() << i << "Sending" << prettyByteArray(it->data);
+ socket.write(it->data);
+ if (!doSocketFlush(&socket)) {
+ QVERIFY2(socket.state() == QAbstractSocket::ConnectedState,
+ QString("Socket disconnected while sending data in step %1").arg(i).toLocal8Bit());
+ QFAIL(QString("Failed to send data in step %1: timeout").arg(i).toLocal8Bit());
+ }
+ break;
+ }
+
+ case Chat::Disconnect:
+ qDebug() << i << "Disconnecting from host";
+ socket.disconnectFromHost();
+
+ // is this the last command?
+ if (it + 1 != chat.constEnd())
+ break;
+
+ // fall through:
+ case Chat::RemoteDisconnect:
+ case Chat::DiscardUntilDisconnect:
+ qDebug() << i << "Waiting for remote disconnect";
+ if (socket.state() != QAbstractSocket::UnconnectedState)
+ socket.waitForDisconnected(10000);
+ QVERIFY2(socket.state() == QAbstractSocket::UnconnectedState,
+ QString("Socket did not disconnect as expected in step %1").arg(i).toLocal8Bit());
+
+ // any data left?
+ if (it->type == Chat::DiscardUntilDisconnect) {
+ QByteArray buffer = socket.readAll();
+ qDebug() << i << "Discarded in the process:" << prettyByteArray(buffer);
+ }
+
+ if (socket.bytesAvailable() != 0)
+ QFAIL(QString("Unexpected bytes still on buffer when disconnecting in step %1:\n%2")
+ .arg(i).arg(prettyByteArray(socket.readAll())).toLocal8Bit());
+ break;
+
+ case Chat::Reconnect:
+ qDebug() << i << "Reconnecting to server on port" << port;
+ socket.connectToHost(QtNetworkSettings::serverName(), port);
+ QVERIFY2(socket.waitForConnected(10000),
+ QString("Failed to reconnect to server in step %1: %2").arg(i).arg(socket.errorString()).toLocal8Bit());
+ break;
+
+ case Chat::StartEncryption:
+#ifdef QT_NO_OPENSSL
+ QFAIL("Internal error: SSL required for this test");
+#else
+ qDebug() << i << "Starting client encryption";
+ socket.ignoreSslErrors();
+ socket.startClientEncryption();
+ QVERIFY2(socket.waitForEncrypted(5000),
+ QString("Failed to start client encryption in step %1: %2").arg(i)
+ .arg(socket.errorString()).toLocal8Bit());
+ break;
+#endif
+ }
+ }
+}
+
+void tst_NetworkSelfTest::hostTest()
+{
+ // this is a localhost self-test
+ QHostInfo localhost = QHostInfo::fromName("localhost");
+ QCOMPARE(localhost.error(), QHostInfo::NoError);
+ QVERIFY(!localhost.addresses().isEmpty());
+
+ QTcpServer server;
+ QVERIFY(server.listen());
+
+ QTcpSocket socket;
+ socket.connectToHost("127.0.0.1", server.serverPort());
+ QVERIFY(socket.waitForConnected(10000));
+}
+
+void tst_NetworkSelfTest::dnsResolution_data()
+{
+ QTest::addColumn<QString>("hostName");
+ QTest::newRow("local-name") << QtNetworkSettings::serverLocalName();
+ QTest::newRow("fqdn") << QtNetworkSettings::serverName();
+}
+
+void tst_NetworkSelfTest::dnsResolution()
+{
+ QFETCH(QString, hostName);
+ QHostInfo resolved = QHostInfo::fromName(hostName);
+ QVERIFY2(resolved.error() == QHostInfo::NoError,
+ QString("Failed to resolve hostname %1: %2").arg(hostName, resolved.errorString()).toLocal8Bit());
+}
+
+void tst_NetworkSelfTest::serverReachability()
+{
+ // check that we get a proper error connecting to port 1
+ QTcpSocket socket;
+ socket.connectToHost(QtNetworkSettings::serverName(), 1);
+ socket.waitForConnected(10000);
+ QVERIFY2(socket.state() == QAbstractSocket::UnconnectedState, "Socket connected unexpectedly!");
+ QVERIFY2(socket.error() == QAbstractSocket::ConnectionRefusedError,
+ QString("Could not reach server: %1").arg(socket.errorString()).toLocal8Bit());
+}
+
+void tst_NetworkSelfTest::remotePortsOpen_data()
+{
+ QTest::addColumn<int>("portNumber");
+ QTest::newRow("ftp") << 21;
+ QTest::newRow("ssh") << 22;
+ QTest::newRow("imap") << 143;
+ QTest::newRow("http") << 80;
+ QTest::newRow("https") << 443;
+ QTest::newRow("http-proxy") << 3128;
+ QTest::newRow("http-proxy-auth-basic") << 3129;
+ QTest::newRow("http-proxy-auth-ntlm") << 3130;
+ QTest::newRow("socks5-proxy") << 1080;
+ QTest::newRow("socks5-proxy-auth") << 1081;
+}
+
+void tst_NetworkSelfTest::remotePortsOpen()
+{
+ QFETCH(int, portNumber);
+ QTcpSocket socket;
+ socket.connectToHost(QtNetworkSettings::serverName(), portNumber);
+
+ if (!socket.waitForConnected(10000)) {
+ if (socket.error() == QAbstractSocket::SocketTimeoutError)
+ QFAIL(QString("Network timeout connecting to the server on port %1").arg(portNumber).toLocal8Bit());
+ else
+ QFAIL(QString("Error connecting to server on port %1: %2").arg(portNumber).arg(socket.errorString()).toLocal8Bit());
+ }
+ QVERIFY(socket.state() == QAbstractSocket::ConnectedState);
+}
+
+static QList<Chat> ftpChat()
+{
+ return QList<Chat>() << Chat::expect("220")
+ << Chat::discardUntil("\r\n")
+ << Chat::send("USER anonymous\r\n")
+ << Chat::expect("331")
+ << Chat::discardUntil("\r\n")
+ << Chat::send("PASS user@hostname\r\n")
+ << Chat::expect("230")
+ << Chat::discardUntil("\r\n")
+ << Chat::send("QUIT\r\n")
+ << Chat::expect("221")
+ << Chat::discardUntil("\r\n")
+ << Chat::RemoteDisconnect;
+}
+
+void tst_NetworkSelfTest::ftpServer()
+{
+ netChat(21, ftpChat());
+}
+
+void tst_NetworkSelfTest::imapServer()
+{
+ netChat(143, QList<Chat>()
+ << Chat::expect("* OK ")
+ << Chat::discardUntil("\r\n")
+ << Chat::send("1 CAPABILITY\r\n")
+ << Chat::expect("* CAPABILITY ")
+ << Chat::discardUntil("1 OK")
+ << Chat::discardUntil("\r\n")
+ << Chat::send("2 LOGOUT\r\n")
+ << Chat::discardUntil("2 OK")
+ << Chat::discardUntil("\r\n")
+ << Chat::RemoteDisconnect);
+}
+
+void tst_NetworkSelfTest::httpServer()
+{
+ netChat(80, QList<Chat>()
+ // HTTP/0.9 chat:
+ << Chat::send("GET /\r\n")
+ << Chat::DiscardUntilDisconnect
+
+ // HTTP/1.0 chat:
+ << Chat::Reconnect
+ << Chat::send("GET / HTTP/1.0\r\n"
+ "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n"
+ "Connection: close\r\n"
+ "\r\n")
+ << Chat::expect("HTTP/1.")
+ << Chat::discardUntil(" ")
+ << Chat::expect("200 ")
+ << Chat::DiscardUntilDisconnect
+
+ // HTTP/1.0 POST:
+ << Chat::Reconnect
+ << Chat::send("POST / HTTP/1.0\r\n"
+ "Content-Length: 5\r\n"
+ "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n"
+ "Connection: close\r\n"
+ "\r\n"
+ "Hello")
+ << Chat::expect("HTTP/1.")
+ << Chat::discardUntil(" ")
+ << Chat::expect("200 ")
+ << Chat::DiscardUntilDisconnect
+ );
+}
+
+void tst_NetworkSelfTest::httpsServer()
+{
+#ifndef QT_NO_OPENSSL
+ netChat(443, QList<Chat>()
+ << Chat::StartEncryption
+ << Chat::send("GET / HTTP/1.0\r\n"
+ "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n"
+ "Connection: close\r\n"
+ "\r\n")
+ << Chat::expect("HTTP/1.")
+ << Chat::discardUntil(" ")
+ << Chat::expect("200 ")
+ << Chat::DiscardUntilDisconnect);
+#else
+ QSKIP("SSL not enabled, cannot test");
+#endif
+}
+
+void tst_NetworkSelfTest::httpProxy()
+{
+ netChat(3128, QList<Chat>()
+ // proxy GET
+ << Chat::send("GET http://" + QtNetworkSettings::serverName().toLatin1() + "/ HTTP/1.0\r\n"
+ "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n"
+ "Proxy-connection: close\r\n"
+ "\r\n")
+ << Chat::expect("HTTP/1.")
+ << Chat::discardUntil(" ")
+ << Chat::expect("200 ")
+ << Chat::DiscardUntilDisconnect
+
+ // proxy CONNECT
+ << Chat::Reconnect
+ << Chat::send("CONNECT " + QtNetworkSettings::serverName().toLatin1() + ":21 HTTP/1.0\r\n"
+ "\r\n")
+ << Chat::expect("HTTP/1.")
+ << Chat::discardUntil(" ")
+ << Chat::expect("200 ")
+ << Chat::discardUntil("\r\n\r\n")
+ << ftpChat());
+}
+
+void tst_NetworkSelfTest::httpProxyBasicAuth()
+{
+ netChat(3129, QList<Chat>()
+ // test auth required response
+ << Chat::send("GET http://" + QtNetworkSettings::serverName().toLatin1() + "/ HTTP/1.0\r\n"
+ "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n"
+ "Proxy-connection: close\r\n"
+ "\r\n")
+ << Chat::expect("HTTP/1.")
+ << Chat::discardUntil(" ")
+ << Chat::expect("407 ")
+ << Chat::discardUntil("\r\nProxy-Authenticate: Basic realm=\"")
+ << Chat::DiscardUntilDisconnect
+
+ // now try sending our credentials
+ << Chat::Reconnect
+ << Chat::send("GET http://" + QtNetworkSettings::serverName().toLatin1() + "/ HTTP/1.0\r\n"
+ "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n"
+ "Proxy-connection: close\r\n"
+ "Proxy-Authorization: Basic cXNvY2tzdGVzdDpwYXNzd29yZA==\r\n"
+ "\r\n")
+ << Chat::expect("HTTP/1.")
+ << Chat::discardUntil(" ")
+ << Chat::expect("200 ")
+ << Chat::DiscardUntilDisconnect);
+}
+
+void tst_NetworkSelfTest::httpProxyNtlmAuth()
+{
+ netChat(3130, QList<Chat>()
+ // test auth required response
+ << Chat::send("GET http://" + QtNetworkSettings::serverName().toLatin1() + "/ HTTP/1.0\r\n"
+ "Host: " + QtNetworkSettings::serverName().toLatin1() + "\r\n"
+ "Proxy-connection: keep-alive\r\n" // NTLM auth will disconnect
+ "\r\n")
+ << Chat::expect("HTTP/1.")
+ << Chat::discardUntil(" ")
+ << Chat::expect("407 ")
+ << Chat::discardUntil("\r\nProxy-Authenticate: NTLM\r\n")
+ << Chat::DiscardUntilDisconnect
+ );
+}
+
+// SOCKSv5 is a binary protocol
+static const char handshakeNoAuth[] = "\5\1\0";
+static const char handshakeOkNoAuth[] = "\5\0";
+static const char handshakeAuthPassword[] = "\5\1\2\1\12qsockstest\10password";
+static const char handshakeOkPasswdAuth[] = "\5\2\1\0";
+static const char handshakeAuthNotOk[] = "\5\377";
+static const char connect1[] = "\5\1\0\1\177\0\0\1\0\25"; // Connect IPv4 127.0.0.1 port 21
+static const char connect2[] = "\5\1\0\3\11localhost\0\25"; // Connect hostname localhost 21
+static const char connected[] = "\5\0\0";
+
+void tst_NetworkSelfTest::socks5Proxy()
+{
+ netChat(1080, QList<Chat>()
+ // IP address connection
+ << Chat::send(QByteArray(handshakeNoAuth, -1 + sizeof handshakeNoAuth))
+ << Chat::expect(QByteArray(handshakeOkNoAuth, -1 + sizeof handshakeOkNoAuth))
+ << Chat::send(QByteArray(connect1, -1 + sizeof connect1))
+ << Chat::expect(QByteArray(connected, -1 + sizeof connected))
+ << Chat::expect("\1") // IPv4 address following
+ << Chat::skipBytes(6) // the server's local address and port
+ << ftpChat()
+
+ // hostname connection
+ << Chat::Reconnect
+ << Chat::send(QByteArray(handshakeNoAuth, -1 + sizeof handshakeNoAuth))
+ << Chat::expect(QByteArray(handshakeOkNoAuth, -1 + sizeof handshakeOkNoAuth))
+ << Chat::send(QByteArray(connect2, -1 + sizeof connect2))
+ << Chat::expect(QByteArray(connected, -1 + sizeof connected))
+ << Chat::expect("\1") // IPv4 address following
+ << Chat::skipBytes(6) // the server's local address and port
+ << ftpChat()
+ );
+}
+
+void tst_NetworkSelfTest::socks5ProxyAuth()
+{
+ netChat(1081, QList<Chat>()
+ // unauthenticated connect -- will get error
+ << Chat::send(QByteArray(handshakeNoAuth, -1 + sizeof handshakeNoAuth))
+ << Chat::expect(QByteArray(handshakeAuthNotOk, -1 + sizeof handshakeAuthNotOk))
+ << Chat::RemoteDisconnect
+
+ // now try to connect with authentication
+ << Chat::Reconnect
+ << Chat::send(QByteArray(handshakeAuthPassword, -1 + sizeof handshakeAuthPassword))
+ << Chat::expect(QByteArray(handshakeOkPasswdAuth, -1 + sizeof handshakeOkPasswdAuth))
+ << Chat::send(QByteArray(connect1, -1 + sizeof connect1))
+ << Chat::expect(QByteArray(connected, -1 + sizeof connected))
+ << Chat::expect("\1") // IPv4 address following
+ << Chat::skipBytes(6) // the server's local address and port
+ << ftpChat()
+ );
+}
+
+QTEST_MAIN(tst_NetworkSelfTest)
+#include "tst_networkselftest.moc"
diff --git a/tests/auto/auto.pro b/tests/auto/auto.pro
index aa7c116..0092d49 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -5,7 +5,8 @@ TEMPLATE = subdirs
!wince*:SUBDIRS += \
headers
-SUBDIRS += bic \
+SUBDIRS += _networkselftest \
+ bic \
collections \
compile \
compilerwarnings \
diff --git a/tests/auto/macgui/tst_gui.cpp b/tests/auto/macgui/tst_gui.cpp
index b302f8b..641e596 100644
--- a/tests/auto/macgui/tst_gui.cpp
+++ b/tests/auto/macgui/tst_gui.cpp
@@ -69,8 +69,7 @@ private slots:
QPixmap grabWindowContents(QWidget * widget)
{
- const int titleBarHeight = widget->frameGeometry().height() - widget->height();
- return QPixmap::grabWindow(widget->winId(), 0, titleBarHeight, -1, widget->height());
+ return QPixmap::grabWindow(widget->winId());
}
/*
@@ -79,10 +78,6 @@ QPixmap grabWindowContents(QWidget * widget)
*/
void tst_gui::scrollbarPainting()
{
-#if defined (Q_WS_MAC) && defined (__i386__)
- QSKIP("This test fails on scruffy when run by the autotest system (but not when you run it manually).", SkipAll);
-#endif
-
ColorWidget colorWidget;
colorWidget.resize(400, 400);
diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h
index 5b671bf..22d8886 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -1,6 +1,4 @@
/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
** Contact: Qt Software Information (qt-info@nokia.com)
**
** This file is part of the test suite of the Qt Toolkit.
@@ -40,6 +38,12 @@
****************************************************************************/
#include <QString>
+/*
+#ifdef QT_NETWORK_LIB
+#include <QtNetwork/QHostInfo>
+#endif
+*/
+
#ifdef Q_OS_SYMBIAN
#include <sys/socket.h>
#include <net/if.h>
@@ -49,10 +53,10 @@
#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
// In emulator we use WINSOCK connectivity by default. Unfortunately winsock
// does not work very well with UDP sockets. This defines skips some test
-// cases which have known problems.
+// cases which have known problems.
// NOTE: Prefer to use WINPCAP based connectivity in S60 emulator when running
-// network tests. WINPCAP connectivity uses Symbian OS IP stack,
+// network tests. WINPCAP connectivity uses Symbian OS IP stack,
// correspondingly as HW does. When using WINPCAP disable this define
//#define SYMBIAN_WINSOCK_CONNECTIVITY
#endif
@@ -139,7 +143,7 @@ public:
#endif
return "10.10.14.172";
}
-
+
static QByteArray expectedReplyIMAP()
{
#ifdef Q_OS_SYMBIAN
@@ -161,7 +165,7 @@ public:
QByteArray expected( "* OK [CAPABILITY IMAP4 IMAP4REV1] " );
expected = expected.append(QtNetworkSettings::serverLocalName().toAscii());
expected = expected.append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
-
+
return expected;
}
@@ -183,12 +187,12 @@ public:
return expected;
}
}
-
+
static QByteArray expectedReplyFtp()
{
QByteArray expected( "220 (vsFTPd 2.0.5)\r\n221 Goodbye.\r\n" );
return expected;
- }
+ }
#ifdef Q_OS_SYMBIAN
static void setDefaultIap()
@@ -251,7 +255,7 @@ private:
position += QString("=").length();
//create record
- QtNetworkSettingsRecord *entry =
+ QtNetworkSettingsRecord *entry =
new QtNetworkSettingsRecord( QString("iap.default"), line.mid(position).trimmed() );
entries.insert(entry->recordName(), entry);
break;
@@ -307,6 +311,15 @@ private:
}
#endif
+/*
+#ifdef QT_NETWORK_LIB
+ static QHostAddress serverIP()
+ {
+ return QHostInfo::fromName(serverName()).addresses().first();
+ }
+#endif
+*/
+
};
#ifdef Q_OS_SYMBIAN
QHash<QString, QtNetworkSettingsRecord* > QtNetworkSettings::entries = QHash<QString, QtNetworkSettingsRecord* > ();
diff --git a/tests/auto/q3socketdevice/tst_q3socketdevice.cpp b/tests/auto/q3socketdevice/tst_q3socketdevice.cpp
index 2b0c606..6255aee 100644
--- a/tests/auto/q3socketdevice/tst_q3socketdevice.cpp
+++ b/tests/auto/q3socketdevice/tst_q3socketdevice.cpp
@@ -45,6 +45,8 @@
#include <q3socketdevice.h>
+#include "../network-settings.h"
+
//TESTED_CLASS=
//TESTED_FILES=
@@ -97,8 +99,7 @@ void tst_Q3SocketDevice::readNull()
int attempts = 10;
while (attempts--) {
- // connect to imap.troll.no
- if (device.connect(QHostAddress("62.70.27.18"), 143))
+ if (device.connect(QtNetworkSettings::serverIP(), 143))
break;
}
@@ -117,7 +118,7 @@ void tst_Q3SocketDevice::readNull()
#endif
QCOMPARE(device.peerPort(), quint16(143));
QCOMPARE(device.peerAddress().toString(),
- QHostAddress("62.70.27.18").toString());
+ QtNetworkSettings::serverIP().toString());
QCOMPARE(device.error(), Q3SocketDevice::NoError);
// write a logout notice
diff --git a/tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp b/tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp
index 30ac638..0c7a1c9 100644
--- a/tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp
+++ b/tests/auto/qcalendarwidget/tst_qcalendarwidget.cpp
@@ -47,6 +47,8 @@
#include <qspinbox.h>
#include <qmenu.h>
#include <qdebug.h>
+#include <qdatetime.h>
+#include <qtextformat.h>
//TESTED_CLASS=
@@ -68,6 +70,11 @@ public slots:
private slots:
void getSetCheck();
void buttonClickCheck();
+
+ void setTextFormat();
+ void resetTextFormat();
+
+ void setWeekdayFormat();
};
// Testing get/set functions
@@ -215,6 +222,52 @@ void tst_QCalendarWidget::buttonClickCheck()
}
+void tst_QCalendarWidget::setTextFormat()
+{
+ QCalendarWidget calendar;
+ QTextCharFormat format;
+ format.setFontItalic(true);
+ format.setForeground(Qt::green);
+
+ const QDate date(1984, 10, 20);
+ calendar.setDateTextFormat(date, format);
+ QCOMPARE(calendar.dateTextFormat(date), format);
+}
+
+void tst_QCalendarWidget::resetTextFormat()
+{
+ QCalendarWidget calendar;
+ QTextCharFormat format;
+ format.setFontItalic(true);
+ format.setForeground(Qt::green);
+
+ const QDate date(1984, 10, 20);
+ calendar.setDateTextFormat(date, format);
+
+ calendar.setDateTextFormat(QDate(), QTextCharFormat());
+ QCOMPARE(calendar.dateTextFormat(date), QTextCharFormat());
+}
+
+void tst_QCalendarWidget::setWeekdayFormat()
+{
+ QCalendarWidget calendar;
+
+ QTextCharFormat format;
+ format.setFontItalic(true);
+ format.setForeground(Qt::green);
+
+ calendar.setWeekdayTextFormat(Qt::Wednesday, format);
+
+ // check the format of the a given month
+ for (int i = 1; i <= 31; ++i) {
+ const QDate date(1984, 10, i);
+ const Qt::DayOfWeek dayOfWeek = static_cast<Qt::DayOfWeek>(date.dayOfWeek());
+ if (dayOfWeek == Qt::Wednesday)
+ QCOMPARE(calendar.weekdayTextFormat(dayOfWeek), format);
+ else
+ QVERIFY(calendar.weekdayTextFormat(dayOfWeek) != format);
+ }
+}
tst_QCalendarWidget::tst_QCalendarWidget()
{
diff --git a/tests/auto/qcolor/tst_qcolor.cpp b/tests/auto/qcolor/tst_qcolor.cpp
index 7608a15..684d5b5 100644
--- a/tests/auto/qcolor/tst_qcolor.cpp
+++ b/tests/auto/qcolor/tst_qcolor.cpp
@@ -111,12 +111,15 @@ private slots:
void toRgb_data();
void toRgb();
+ void toRgbNonDestructive();
void toHsv_data();
void toHsv();
+ void toHsvNonDestructive();
void toCmyk_data();
void toCmyk();
+ void toCmykNonDestructive();
void convertTo();
@@ -1124,6 +1127,12 @@ void tst_QColor::toHsv_data()
<< QColor::fromCmykF(0., 1., 1., 0.);
}
+void tst_QColor::toRgbNonDestructive()
+{
+ QColor aColor = QColor::fromRgbF(0.11, 0.22, 0.33, 0.44);
+ QCOMPARE(aColor, aColor.toRgb());
+}
+
void tst_QColor::toHsv()
{
// invalid should remain invalid
@@ -1136,6 +1145,12 @@ void tst_QColor::toHsv()
QCOMPARE(cmykColor.toHsv(), expectedColor);
}
+void tst_QColor::toHsvNonDestructive()
+{
+ QColor aColor = QColor::fromHsvF(0.11, 0.22, 0.33, 0.44);
+ QCOMPARE(aColor, aColor.toHsv());
+}
+
void tst_QColor::toCmyk_data()
{
QTest::addColumn<QColor>("expectedColor");
@@ -1165,6 +1180,12 @@ void tst_QColor::toCmyk()
QCOMPARE(hsvColor.toCmyk(), expectedColor);
}
+void tst_QColor::toCmykNonDestructive()
+{
+ QColor aColor = QColor::fromCmykF(0.11, 0.22, 0.33, 0.44);
+ QCOMPARE(aColor, aColor.toCmyk());
+}
+
void tst_QColor::convertTo()
{
QColor color(Qt::black);
diff --git a/tests/auto/qcombobox/tst_qcombobox.cpp b/tests/auto/qcombobox/tst_qcombobox.cpp
index e881496..620cd07 100644
--- a/tests/auto/qcombobox/tst_qcombobox.cpp
+++ b/tests/auto/qcombobox/tst_qcombobox.cpp
@@ -76,6 +76,7 @@
#endif
#include <qabstractitemview.h>
#include "../../shared/util.h"
+#include <qstyleditemdelegate.h>
//TESTED_CLASS=
//TESTED_FILES=
@@ -141,6 +142,8 @@ private slots:
void setModelColumn();
void noScrollbar_data();
void noScrollbar();
+ void setItemDelegate();
+ void task253944_itemDelegateIsReset();
protected slots:
void onEditTextChanged( const QString &newString );
@@ -2209,5 +2212,26 @@ void tst_QComboBox::noScrollbar()
}
}
+void tst_QComboBox::setItemDelegate()
+{
+ QComboBox comboBox;
+ QStyledItemDelegate *itemDelegate = new QStyledItemDelegate;
+ comboBox.setItemDelegate(itemDelegate);
+ QCOMPARE(comboBox.itemDelegate(), itemDelegate);
+}
+
+void tst_QComboBox::task253944_itemDelegateIsReset()
+{
+ QComboBox comboBox;
+ QStyledItemDelegate *itemDelegate = new QStyledItemDelegate;
+ comboBox.setItemDelegate(itemDelegate);
+
+ comboBox.setEditable(true);
+ QCOMPARE(comboBox.itemDelegate(), itemDelegate);
+
+ comboBox.setStyleSheet("QComboBox { border: 1px solid gray; }");
+ QCOMPARE(comboBox.itemDelegate(), itemDelegate);
+}
+
QTEST_MAIN(tst_QComboBox)
#include "tst_qcombobox.moc"
diff --git a/tests/auto/qcssparser/tst_cssparser.cpp b/tests/auto/qcssparser/tst_cssparser.cpp
index c3397ea..28ba85e 100644
--- a/tests/auto/qcssparser/tst_cssparser.cpp
+++ b/tests/auto/qcssparser/tst_cssparser.cpp
@@ -123,7 +123,7 @@ static void debug(const QVector<QCss::Symbol> &symbols, int index = -1)
qDebug() << "failure at index" << index;
}
-static void debug(const QCss::Parser &p) { debug(p.symbols); }
+//static void debug(const QCss::Parser &p) { debug(p.symbols); }
void tst_CssParser::scanner()
{
@@ -1473,7 +1473,12 @@ void tst_CssParser::extractFontFamily_data()
QTest::newRow("quoted-family-name") << "font-family: 'Times New Roman'" << QString("Times New Roman");
QTest::newRow("unquoted-family-name") << "font-family: Times New Roman" << QString("Times New Roman");
QTest::newRow("unquoted-family-name2") << "font-family: Times New Roman" << QString("Times New Roman");
- QTest::newRow("multiple") << "font-family: Times New Roman , foobar, 'baz'" << QString("Times New Roman");
+ QTest::newRow("multiple") << "font-family: Times New Roman , foobar, 'baz'" << QString("Times New Roman");
+ QTest::newRow("multiple2") << "font-family: invalid, Times New Roman " << QString("Times New Roman");
+ QTest::newRow("invalid") << "font-family: invalid" << QFont().family();
+ QTest::newRow("shorthand") << "font: 12pt Times New Roman" << QString("Times New Roman");
+ QTest::newRow("shorthand multiple quote") << "font: 12pt invalid, \"Times New Roman\" " << QString("Times New Roman");
+ QTest::newRow("shorthand multiple") << "font: 12pt invalid, Times New Roman " << QString("Times New Roman");
}
void tst_CssParser::extractFontFamily()
@@ -1497,8 +1502,8 @@ void tst_CssParser::extractFontFamily()
int adjustment = 0;
QFont fnt;
extractor.extractFont(&fnt, &adjustment);
-
- QTEST(fnt.family(), "expectedFamily");
+ QFontInfo info(fnt);
+ QTEST(info.family(), "expectedFamily");
}
void tst_CssParser::extractBorder_data()
diff --git a/tests/auto/qfile/copy-fallback.qrc b/tests/auto/qfile/copy-fallback.qrc
new file mode 100644
index 0000000..864491f
--- /dev/null
+++ b/tests/auto/qfile/copy-fallback.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>copy-fallback.qrc</file>
+</qresource>
+</RCC>
diff --git a/tests/auto/qfile/test/test.pro b/tests/auto/qfile/test/test.pro
index b51eff6..80102f0 100644
--- a/tests/auto/qfile/test/test.pro
+++ b/tests/auto/qfile/test/test.pro
@@ -23,7 +23,7 @@ wince*:{
DEFINES += SRCDIR=\\\"$$PWD/../\\\"
}
-RESOURCES += ../qfile.qrc ../rename-fallback.qrc
+RESOURCES += ../qfile.qrc ../rename-fallback.qrc ../copy-fallback.qrc
TARGET = ../tst_qfile
diff --git a/tests/auto/qfile/tst_qfile.cpp b/tests/auto/qfile/tst_qfile.cpp
index 483e978..597343f 100644
--- a/tests/auto/qfile/tst_qfile.cpp
+++ b/tests/auto/qfile/tst_qfile.cpp
@@ -128,6 +128,7 @@ private slots:
void copy();
void copyRemovesTemporaryFile() const;
void copyShouldntOverwrite();
+ void copyFallback();
void link();
void linkToDir();
void absolutePathLinkToRelativePath();
@@ -216,6 +217,13 @@ void tst_QFile::cleanup()
// TODO: Add cleanup code here.
// This will be executed immediately after each test is run.
+ // for copyFallback()
+ if (QFile::exists("file-copy-destination.txt")) {
+ QFile::setPermissions("file-copy-destination.txt",
+ QFile::ReadOwner | QFile::WriteOwner);
+ QFile::remove("file-copy-destination.txt");
+ }
+
// for renameFallback()
QFile::remove("file-rename-destination.txt");
@@ -921,6 +929,34 @@ void tst_QFile::copyShouldntOverwrite()
QFile::remove("tst_qfile.cpy");
}
+void tst_QFile::copyFallback()
+{
+ // Using a resource file to trigger QFile::copy's fallback handling
+ QFile file(":/copy-fallback.qrc");
+ QFile::remove("file-copy-destination.txt");
+
+ QVERIFY2(file.exists(), "test precondition");
+ QVERIFY2(!QFile::exists("file-copy-destination.txt"), "test precondition");
+
+ // Fallback copy of closed file.
+ QVERIFY(file.copy("file-copy-destination.txt"));
+ QVERIFY(QFile::exists("file-copy-destination.txt"));
+ QVERIFY(!file.isOpen());
+
+ // Need to reset permissions on Windows to be able to delete
+ QVERIFY(QFile::setPermissions("file-copy-destination.txt",
+ QFile::ReadOwner | QFile::WriteOwner));
+ QVERIFY(QFile::remove("file-copy-destination.txt"));
+
+ // Fallback copy of open file.
+ QVERIFY(file.open(QIODevice::ReadOnly));
+ QVERIFY(file.copy("file-copy-destination.txt"));
+ QVERIFY(QFile::exists("file-copy-destination.txt"));
+ QVERIFY(!file.isOpen());
+
+ QFile::remove("file-copy-destination.txt");
+}
+
#ifdef Q_OS_WIN
#include <objbase.h>
#include <shlobj.h>
@@ -2109,6 +2145,7 @@ void tst_QFile::renameFallback()
QVERIFY(!file.rename("file-rename-destination.txt"));
QVERIFY(!QFile::exists("file-rename-destination.txt"));
+ QVERIFY(!file.isOpen());
}
void tst_QFile::renameMultiple()
diff --git a/tests/auto/qftp/tst_qftp.cpp b/tests/auto/qftp/tst_qftp.cpp
index 3f1c511..0f6702c 100644
--- a/tests/auto/qftp/tst_qftp.cpp
+++ b/tests/auto/qftp/tst_qftp.cpp
@@ -1556,14 +1556,16 @@ void tst_QFtp::binaryAscii()
ResMapIt it2 = resultMap.find(QFtp::Get);
QVERIFY(it2 != resultMap.end());
QVERIFY(it2.value().success);
+/*
#ifdef Q_OS_SYMBIAN
QVERIFY(getData.size() == putData.size());
#else
+*/
// most modern ftp servers leave the file as it is by default
// (and do not remove the windows line ending), the -1 below could be
// deleted in the future
QVERIFY(getData.size() == putData.size()-1);
-#endif
+//#endi
//////////////////////////////////////////////////////////////////
// cleanup (i.e. remove the file) -- this also tests the remove command
init();
diff --git a/tests/auto/qfuture/tst_qfuture.cpp b/tests/auto/qfuture/tst_qfuture.cpp
index 43fd614..383ecba 100644
--- a/tests/auto/qfuture/tst_qfuture.cpp
+++ b/tests/auto/qfuture/tst_qfuture.cpp
@@ -45,7 +45,7 @@
#include <QtTest/QtTest>
#include <qfuture.h>
-#include <versioncheck.h>
+#include "versioncheck.h"
#include <qfuturewatcher.h>
#include <qtconcurrentresultstore.h>
#include <qtconcurrentexception.h>
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
index 6d150cb..58a17ea 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -215,6 +215,8 @@ private slots:
void tabChangesFocus_data();
void cacheMode();
void updateCachedItemAfterMove();
+ void deviceTransform_data();
+ void deviceTransform();
// task specific tests below me
void task141694_textItemEnsureVisible();
@@ -6200,5 +6202,113 @@ void tst_QGraphicsItem::updateCachedItemAfterMove()
QCOMPARE(tester->repaints, 1);
}
+class Track : public QGraphicsRectItem
+{
+public:
+ Track(const QRectF &rect)
+ : QGraphicsRectItem(rect)
+ {
+ setAcceptHoverEvents(true);
+ }
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget = 0)
+ {
+ QGraphicsRectItem::paint(painter, option, widget);
+ painter->drawText(boundingRect(), Qt::AlignCenter, QString("%1x%2\n%3x%4").arg(p.x()).arg(p.y()).arg(sp.x()).arg(sp.y()));
+ }
+
+protected:
+ void hoverMoveEvent(QGraphicsSceneHoverEvent *event)
+ {
+ p = event->pos();
+ sp = event->widget()->mapFromGlobal(event->screenPos());
+ update();
+ }
+private:
+ QPointF p;
+ QPoint sp;
+};
+
+void tst_QGraphicsItem::deviceTransform_data()
+{
+ QTest::addColumn<bool>("untransformable1");
+ QTest::addColumn<bool>("untransformable2");
+ QTest::addColumn<bool>("untransformable3");
+ QTest::addColumn<qreal>("rotation1");
+ QTest::addColumn<qreal>("rotation2");
+ QTest::addColumn<qreal>("rotation3");
+ QTest::addColumn<QTransform>("deviceX");
+ QTest::addColumn<QPointF>("mapResult1");
+ QTest::addColumn<QPointF>("mapResult2");
+ QTest::addColumn<QPointF>("mapResult3");
+
+ QTest::newRow("nil") << false << false << false
+ << qreal(0.0) << qreal(0.0) << qreal(0.0)
+ << QTransform()
+ << QPointF(150, 150) << QPointF(250, 250) << QPointF(350, 350);
+ QTest::newRow("deviceX rot 90") << false << false << false
+ << qreal(0.0) << qreal(0.0) << qreal(0.0)
+ << QTransform().rotate(90)
+ << QPointF(-150, 150) << QPointF(-250, 250) << QPointF(-350, 350);
+ QTest::newRow("deviceX rot 90 100") << true << false << false
+ << qreal(0.0) << qreal(0.0) << qreal(0.0)
+ << QTransform().rotate(90)
+ << QPointF(-50, 150) << QPointF(50, 250) << QPointF(150, 350);
+ QTest::newRow("deviceX rot 90 010") << false << true << false
+ << qreal(0.0) << qreal(0.0) << qreal(0.0)
+ << QTransform().rotate(90)
+ << QPointF(-150, 150) << QPointF(-150, 250) << QPointF(-50, 350);
+ QTest::newRow("deviceX rot 90 001") << false << false << true
+ << qreal(0.0) << qreal(0.0) << qreal(0.0)
+ << QTransform().rotate(90)
+ << QPointF(-150, 150) << QPointF(-250, 250) << QPointF(-250, 350);
+ QTest::newRow("deviceX rot 90 111") << true << true << true
+ << qreal(0.0) << qreal(0.0) << qreal(0.0)
+ << QTransform().rotate(90)
+ << QPointF(-50, 150) << QPointF(50, 250) << QPointF(150, 350);
+ QTest::newRow("deviceX rot 90 101") << true << false << true
+ << qreal(0.0) << qreal(0.0) << qreal(0.0)
+ << QTransform().rotate(90)
+ << QPointF(-50, 150) << QPointF(50, 250) << QPointF(150, 350);
+}
+
+void tst_QGraphicsItem::deviceTransform()
+{
+ QFETCH(bool, untransformable1);
+ QFETCH(bool, untransformable2);
+ QFETCH(bool, untransformable3);
+ QFETCH(qreal, rotation1);
+ QFETCH(qreal, rotation2);
+ QFETCH(qreal, rotation3);
+ QFETCH(QTransform, deviceX);
+ QFETCH(QPointF, mapResult1);
+ QFETCH(QPointF, mapResult2);
+ QFETCH(QPointF, mapResult3);
+
+ QGraphicsScene scene;
+ Track *rect1 = new Track(QRectF(0, 0, 100, 100));
+ Track *rect2 = new Track(QRectF(0, 0, 100, 100));
+ Track *rect3 = new Track(QRectF(0, 0, 100, 100));
+ rect2->setParentItem(rect1);
+ rect3->setParentItem(rect2);
+ rect1->setPos(100, 100);
+ rect2->setPos(100, 100);
+ rect3->setPos(100, 100);
+ rect1->rotate(rotation1);
+ rect2->rotate(rotation2);
+ rect3->rotate(rotation3);
+ rect1->setFlag(QGraphicsItem::ItemIgnoresTransformations, untransformable1);
+ rect2->setFlag(QGraphicsItem::ItemIgnoresTransformations, untransformable2);
+ rect3->setFlag(QGraphicsItem::ItemIgnoresTransformations, untransformable3);
+ rect1->setBrush(Qt::red);
+ rect2->setBrush(Qt::green);
+ rect3->setBrush(Qt::blue);
+ scene.addItem(rect1);
+
+ QCOMPARE(rect1->deviceTransform(deviceX).map(QPointF(50, 50)), mapResult1);
+ QCOMPARE(rect2->deviceTransform(deviceX).map(QPointF(50, 50)), mapResult2);
+ QCOMPARE(rect3->deviceTransform(deviceX).map(QPointF(50, 50)), mapResult3);
+}
+
QTEST_MAIN(tst_QGraphicsItem)
#include "tst_qgraphicsitem.moc"
diff --git a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
index b741da6..d020c10 100644
--- a/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
+++ b/tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp
@@ -47,6 +47,7 @@
#include <QtGui>
#include <math.h>
+#include "../../shared/util.h"
#if defined(Q_OS_WIN) && !defined(Q_OS_WINCE)
#include <windows.h>
@@ -3547,8 +3548,7 @@ void tst_QGraphicsScene::changedSignal()
scene.addItem(rect);
QCOMPARE(cl.changes.size(), 0);
- qApp->processEvents();
- QCOMPARE(cl.changes.size(), 1);
+ QTRY_COMPARE(cl.changes.size(), 1);
QCOMPARE(cl.changes.at(0).size(), 1);
QCOMPARE(cl.changes.at(0).first(), QRectF(0, 0, 10, 10));
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index 7934781..ddc2074 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -200,6 +200,7 @@ private slots:
void task239729_noViewUpdate();
void task239047_fitInViewSmallViewport();
void task245469_itemsAtPointWithClip();
+ void task253415_reconnectUpdateSceneOnSceneChanged();
};
void tst_QGraphicsView::initTestCase()
@@ -3048,5 +3049,28 @@ void tst_QGraphicsView::centerOnDirtyItem()
QCOMPARE(before, after);
}
+void tst_QGraphicsView::task253415_reconnectUpdateSceneOnSceneChanged()
+{
+ QGraphicsView view;
+ QGraphicsView dummyView;
+ view.setWindowFlags(view.windowFlags() | Qt::WindowStaysOnTopHint);
+ view.resize(200, 200);
+
+ QGraphicsScene scene1;
+ QObject::connect(&scene1, SIGNAL(changed(QList<QRectF>)), &dummyView, SLOT(updateScene(QList<QRectF>)));
+ view.setScene(&scene1);
+
+ QTest::qWait(125);
+
+ QGraphicsScene scene2;
+ QObject::connect(&scene2, SIGNAL(changed(QList<QRectF>)), &dummyView, SLOT(updateScene(QList<QRectF>)));
+ view.setScene(&scene2);
+
+ QTest::qWait(125);
+
+ bool wasConnected2 = QObject::disconnect(&scene2, SIGNAL(changed(QList<QRectF>)), &view, 0);
+ QVERIFY(wasConnected2);
+}
+
QTEST_MAIN(tst_QGraphicsView)
#include "tst_qgraphicsview.moc"
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
index f25a079..b85abd3 100644
--- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -50,6 +50,7 @@
#include <qcleanlooksstyle.h>
#include <qlineedit.h>
#include <qboxlayout.h>
+#include <qaction.h>
#include "../../shared/util.h"
@@ -150,6 +151,7 @@ private slots:
// Task fixes
void task236127_bspTreeIndexFails();
void task243004_setStyleCrash();
+ void task250119_shortcutContext();
};
@@ -1827,6 +1829,89 @@ void tst_QGraphicsWidget::task243004_setStyleCrash()
delete item2;
}
+class GraphicsWidget_task250119 : public QGraphicsWidget
+{
+public:
+ GraphicsWidget_task250119()
+ : shortcutEvents(0)
+ {
+ setFocusPolicy(Qt::StrongFocus);
+ resize(100, 100);
+ }
+
+ int shortcutEvents;
+
+private:
+ bool event(QEvent *event)
+ {
+ if (event->type() == QEvent::Shortcut)
+ shortcutEvents++;
+ return QGraphicsWidget::event(event);
+ }
+
+ void paint(QPainter *painter, const QStyleOptionGraphicsItem *, QWidget *)
+ {
+ if (hasFocus()) {
+ painter->setPen(QPen(Qt::black, 0, Qt::DashLine));
+ painter->drawRect(rect());
+ }
+ painter->setPen(QPen(Qt::black, 0, Qt::SolidLine));
+ painter->fillRect(rect().adjusted(2, 2, -2, -2), Qt::yellow);
+ painter->drawRect(rect().adjusted(2, 2, -2, -2));
+ }
+};
+
+void tst_QGraphicsWidget::task250119_shortcutContext()
+{
+ QGraphicsScene scene;
+ QGraphicsView view;
+ view.setScene(&scene);
+ view.show();
+ QTest::qWait(100);
+
+
+ // *** Event: ***
+
+ GraphicsWidget_task250119 w_event;
+ scene.addItem(&w_event);
+
+ const int id = w_event.grabShortcut(Qt::Key_A, Qt::WidgetWithChildrenShortcut);
+ w_event.setShortcutEnabled(id, true);
+
+ w_event.setFocus();
+ QTest::keyPress(&view, Qt::Key_A);
+ QCOMPARE(w_event.shortcutEvents, 1);
+
+ w_event.clearFocus();
+ QTest::keyPress(&view, Qt::Key_A);
+ QCOMPARE(w_event.shortcutEvents, 1);
+
+ scene.removeItem(&w_event);
+
+
+ // *** Signal: ***
+
+ GraphicsWidget_task250119 w_signal;
+ scene.addItem(&w_signal);
+
+ QAction action(0);
+ action.setShortcut(Qt::Key_B);
+ action.setShortcutContext(Qt::WidgetWithChildrenShortcut);
+ QSignalSpy spy(&action, SIGNAL(triggered()));
+
+ w_signal.addAction(&action);
+
+ w_signal.setFocus();
+ QTest::keyPress(&view, Qt::Key_B);
+ QCOMPARE(spy.count(), 1);
+
+ w_signal.clearFocus();
+ QTest::keyPress(&view, Qt::Key_B);
+ QCOMPARE(spy.count(), 1);
+
+ scene.removeItem(&w_signal);
+}
+
QTEST_MAIN(tst_QGraphicsWidget)
#include "tst_qgraphicswidget.moc"
diff --git a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
index 469904f..3161873 100644
--- a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
+++ b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
@@ -306,7 +306,6 @@ void tst_QHttpSocketEngine::simpleConnectToIMAP()
socketDevice.setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3128));
- // Connect to imap.trolltech.com's IP
QVERIFY(!socketDevice.connectToHost(QHostAddress(QtNetworkSettings::serverIP()), 143));
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
QVERIFY(socketDevice.waitForWrite());
@@ -368,7 +367,6 @@ void tst_QHttpSocketEngine::simpleErrorsAndStates()
QVERIFY(!socketDevice.connectToHost(QHostAddress(QtNetworkSettings::serverName()), 8088));
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
if (socketDevice.waitForWrite(15000)) {
- qDebug() << socketDevice.state();
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState ||
socketDevice.state() == QAbstractSocket::UnconnectedState);
} else {
@@ -697,7 +695,6 @@ void tst_QHttpSocketEngine::passwordAuth()
socketDevice.setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3128, "qsockstest", "password"));
- // Connect to imap.trolltech.com's IP
QVERIFY(!socketDevice.connectToHost(QHostAddress(QtNetworkSettings::serverIP()), 143));
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
QVERIFY(socketDevice.waitForWrite());
diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp
index 3b04d56..b6be5e6 100644
--- a/tests/auto/qimage/tst_qimage.cpp
+++ b/tests/auto/qimage/tst_qimage.cpp
@@ -1460,9 +1460,9 @@ void tst_QImage::smoothScale3()
QRgb cb = b.pixel(x, y);
// tolerate a little bit of rounding errors
- QVERIFY(compare(qRed(ca), qRed(cb), 2));
- QVERIFY(compare(qGreen(ca), qGreen(cb), 2));
- QVERIFY(compare(qBlue(ca), qBlue(cb), 2));
+ QVERIFY(compare(qRed(ca), qRed(cb), 3));
+ QVERIFY(compare(qGreen(ca), qGreen(cb), 3));
+ QVERIFY(compare(qBlue(ca), qBlue(cb), 3));
}
}
}
diff --git a/tests/auto/qiodevice/tst_qiodevice.cpp b/tests/auto/qiodevice/tst_qiodevice.cpp
index 38eac55..dee37dc 100644
--- a/tests/auto/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/qiodevice/tst_qiodevice.cpp
@@ -138,7 +138,7 @@ void tst_QIODevice::constructing_QTcpSocket()
QCOMPARE(socket.pos(), qlonglong(0));
socket.close();
- socket.connectToHost("imap.troll.no", 143);
+ socket.connectToHost(QtNetworkSettings::serverName(), 143);
QVERIFY(socket.waitForConnected(5000));
QVERIFY(device->isOpen());
diff --git a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
index 27741e0..615ac01 100644
--- a/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
+++ b/tests/auto/qitemdelegate/tst_qitemdelegate.cpp
@@ -59,6 +59,8 @@
#include <QItemDelegate>
#include <QAbstractItemDelegate>
+#include <QTextEdit>
+#include <QPlainTextEdit>
Q_DECLARE_METATYPE(QAbstractItemDelegate::EndEditHint)
@@ -226,6 +228,8 @@ private slots:
void decoration();
void editorEvent_data();
void editorEvent();
+ void enterKey_data();
+ void enterKey();
};
@@ -1048,6 +1052,80 @@ void tst_QItemDelegate::editorEvent()
QCOMPARE(index.data(Qt::CheckStateRole).toInt(), expectedCheckState);
}
+void tst_QItemDelegate::enterKey_data()
+{
+ QTest::addColumn<int>("widget");
+ QTest::addColumn<int>("key");
+ QTest::addColumn<bool>("expectedFocus");
+
+ QTest::newRow("lineedit enter") << 1 << int(Qt::Key_Enter) << false;
+ QTest::newRow("textedit enter") << 2 << int(Qt::Key_Enter) << true;
+ QTest::newRow("plaintextedit enter") << 3 << int(Qt::Key_Enter) << true;
+ QTest::newRow("plaintextedit return") << 3 << int(Qt::Key_Return) << true;
+ QTest::newRow("plaintextedit tab") << 3 << int(Qt::Key_Tab) << false;
+ QTest::newRow("lineedit tab") << 1 << int(Qt::Key_Tab) << false;
+}
+
+void tst_QItemDelegate::enterKey()
+{
+ QFETCH(int, widget);
+ QFETCH(int, key);
+ QFETCH(bool, expectedFocus);
+
+ QStandardItemModel model;
+ model.appendRow(new QStandardItem());
+
+ QListView view;
+ view.setModel(&model);
+ view.show();
+ QApplication::setActiveWindow(&view);
+ view.setFocus();
+ QTest::qWait(30);
+
+ struct TestDelegate : public QItemDelegate
+ {
+ int widgetType;
+ virtual QWidget* createEditor(QWidget* parent, const QStyleOptionViewItem& /*option*/, const QModelIndex& /*index*/) const
+ {
+ QWidget *editor = 0;
+ switch(widgetType) {
+ case 1:
+ editor = new QLineEdit(parent);
+ break;
+ case 2:
+ editor = new QTextEdit(parent);
+ break;
+ case 3:
+ editor = new QPlainTextEdit(parent);
+ break;
+ }
+ editor->setObjectName(QString::fromLatin1("TheEditor"));
+ return editor;
+ }
+ } delegate;
+
+ delegate.widgetType = widget;
+
+ view.setItemDelegate(&delegate);
+ QModelIndex index = model.index(0, 0);
+ view.setCurrentIndex(index); // the editor will only selectAll on the current index
+ view.edit(index);
+ QTest::qWait(30);
+
+ QList<QWidget*> lineEditors = qFindChildren<QWidget *>(view.viewport(), QString::fromLatin1("TheEditor"));
+ QCOMPARE(lineEditors.count(), 1);
+
+ QWidget *editor = lineEditors.at(0);
+ QCOMPARE(editor->hasFocus(), true);
+
+ QTest::keyClick(editor, Qt::Key(key));
+ QApplication::processEvents();
+
+ QCOMPARE(editor->hasFocus(), expectedFocus);
+}
+
+
+
// ### _not_ covered:
// editing with a custom editor factory
diff --git a/tests/auto/qitemmodel/tst_qitemmodel.cpp b/tests/auto/qitemmodel/tst_qitemmodel.cpp
index ea1972e..d29a3e3 100644
--- a/tests/auto/qitemmodel/tst_qitemmodel.cpp
+++ b/tests/auto/qitemmodel/tst_qitemmodel.cpp
@@ -54,7 +54,7 @@
#include <QtTest/QtTest>
#include <QtCore>
#include <qdebug.h>
-#include <modelstotest.cpp>
+#include "modelstotest.cpp"
#include <QMetaType>
Q_DECLARE_METATYPE(QModelIndex)
diff --git a/tests/auto/qitemview/tst_qitemview.cpp b/tests/auto/qitemview/tst_qitemview.cpp
index 1b02873..907cabb 100644
--- a/tests/auto/qitemview/tst_qitemview.cpp
+++ b/tests/auto/qitemview/tst_qitemview.cpp
@@ -42,7 +42,7 @@
#include <QtTest/QtTest>
#include <QtCore/QtCore>
-#include <viewstotest.cpp>
+#include "viewstotest.cpp"
#include <stdlib.h>
#if defined(Q_OS_WIN)
diff --git a/tests/auto/qlibrary/lib2/lib2.pro b/tests/auto/qlibrary/lib2/lib2.pro
index 724077a..436d7ba 100644
--- a/tests/auto/qlibrary/lib2/lib2.pro
+++ b/tests/auto/qlibrary/lib2/lib2.pro
@@ -27,10 +27,11 @@ unix:!symbian: {
symbian-abld: {
TARGET.CAPABILITY=ALL -TCB
+ FIXEDROOT = $$replace(EPOCROOT,/,\\)
QMAKE_POST_LINK = \
- copy /Y $${EPOCROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\mylib.dll $${EPOCROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\mylib.dl2 && \
- copy /Y $${EPOCROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\mylib.dll $${EPOCROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\system.trolltech.test.mylib.dll && \
- IF NOT "$(PLATFORM)==WINSCW" copy /Y $${EPOCROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\mylib.dll ..\tst\mylib.dl2
+ copy /Y $${FIXEDROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\mylib.dll $${FIXEDROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\mylib.dl2 && \
+ copy /Y $${FIXEDROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\mylib.dll $${FIXEDROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\system.trolltech.test.mylib.dll && \
+ IF NOT "$(PLATFORM)==WINSCW" copy /Y $${FIXEDROOT}epoc32\release\\$(PLATFORM)\\$(CFG)\mylib.dll ..\tst\mylib.dl2
}
symbian-sbsv2: {
diff --git a/tests/auto/qlibrary/qlibrary.pro b/tests/auto/qlibrary/qlibrary.pro
index 9ba49ee..fd5790b 100644
--- a/tests/auto/qlibrary/qlibrary.pro
+++ b/tests/auto/qlibrary/qlibrary.pro
@@ -1,9 +1,16 @@
QT -= gui
TEMPLATE = subdirs
CONFIG += ordered
-SUBDIRS = lib \
- lib2 \
- tst
+
+symbian: {
+# Can't build two versions of lib with same name in symbian, so just build one
+SUBDIRS = lib2 \
+ tst
+} else {
+SUBDIRS = lib \
+ lib2 \
+ tst
+}
TARGET = tst_qlibrary
# no special install rule for subdir
diff --git a/tests/auto/qlocalsocket/lackey/lackey.pro b/tests/auto/qlocalsocket/lackey/lackey.pro
index 7460d8c..f073e7a 100644
--- a/tests/auto/qlocalsocket/lackey/lackey.pro
+++ b/tests/auto/qlocalsocket/lackey/lackey.pro
@@ -15,4 +15,4 @@ DEFINES += QLOCALSOCKET_DEBUG
SOURCES += main.cpp
TARGET = lackey
-
+symbian:TARGET.CAPABILITY = ALL -TCB \ No newline at end of file
diff --git a/tests/auto/qlocalsocket/test/test.pro b/tests/auto/qlocalsocket/test/test.pro
index c58bfee..b3f0a69 100644
--- a/tests/auto/qlocalsocket/test/test.pro
+++ b/tests/auto/qlocalsocket/test/test.pro
@@ -3,7 +3,7 @@ load(qttest_p4)
DEFINES += QLOCALSERVER_DEBUG
DEFINES += QLOCALSOCKET_DEBUG
-symbian* {
+symbian {
# nothing
} else:wince* {
DEFINES += QT_LOCALSOCKET_TCP
@@ -34,5 +34,6 @@ wince* | symbian* {
scriptFiles.path = lackey/scripts
DEPLOYMENT = additionalFiles scriptFiles
QT += script # for easy deployment of QtScript
+ DEFINES += SYMBIAN_SRCDIR_UID=$$lower($$replace(TARGET.UID3,"0x",""))
}
diff --git a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
index 5d73c98..97058d3 100644
--- a/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
+++ b/tests/auto/qlocalsocket/tst_qlocalsocket.cpp
@@ -53,7 +53,9 @@
//TESTED_CLASS=QLocalServer, QLocalSocket
//TESTED_FILES=network/socket/qlocalserver.cpp network/socket/qlocalsocket.cpp
#ifdef Q_OS_SYMBIAN
- #define SRCDIR ""
+ #define STRINGIFY(x) #x
+ #define TOSTRING(x) STRINGIFY(x)
+ #define SRCDIR "C:/Private/" TOSTRING(SYMBIAN_SRCDIR_UID) "/"
#endif
Q_DECLARE_METATYPE(QLocalSocket::LocalSocketError)
Q_DECLARE_METATYPE(QLocalSocket::LocalSocketState)
@@ -492,11 +494,11 @@ void tst_QLocalSocket::sendData()
// test creating a connection
socket.connectToServer(name);
bool timedOut = true;
+
QCOMPARE(server.waitForNewConnection(3000, &timedOut), canListen);
-#if defined(QT_LOCALSOCKET_TCP)
+
+#if defined(QT_LOCALSOCKET_TCP) || defined(Q_OS_SYMBIAN)
QTest::qWait(250);
-#elif defined(Q_OS_SYMBIAN)
- QTest::qWait(10000);
#endif
QVERIFY(!timedOut);
QCOMPARE(spyConnected.count(), canListen ? 1 : 0);
@@ -530,7 +532,9 @@ void tst_QLocalSocket::sendData()
QCOMPARE(spyReadyRead.count(), 1);
QVERIFY(testLine.startsWith(in.readLine()));
+
QVERIFY(wrote || serverSocket->waitForBytesWritten(1000));
+
QCOMPARE(serverSocket->errorString(), QString("Unknown error"));
QCOMPARE(socket.errorString(), QString("Unknown error"));
}
diff --git a/tests/auto/qmake/testcompiler.cpp b/tests/auto/qmake/testcompiler.cpp
index 122a2b8..7255d93 100644
--- a/tests/auto/qmake/testcompiler.cpp
+++ b/tests/auto/qmake/testcompiler.cpp
@@ -56,10 +56,8 @@ static QString targetName( BuildType buildMode, const QString& target, const QSt
targetName.append(".exe");
break;
case Dll: // dll
- if (version != "") {
- QStringList ver = QStringList::split(".", version);
- targetName.append(ver.first());
- }
+ if (!version.empty())
+ targetName.append(version.section(".", 0, 0));
targetName.append(".dll");
break;
case Lib: // lib
diff --git a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
index 146bc7b..e3f6c94 100644
--- a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
+++ b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
@@ -153,9 +153,8 @@ void tst_QNativeSocketEngine::simpleConnectToIMAP()
QVERIFY(socketDevice.initialize(QAbstractSocket::TcpSocket, QAbstractSocket::IPv4Protocol));
QVERIFY(socketDevice.state() == QAbstractSocket::UnconnectedState);
- // Connect to imap.trolltech.com's IP
- bool connected = socketDevice.connectToHost(QHostAddress(QtNetworkSettings::serverIP()), 143);
- if (!connected) {
+ const bool isConnected = socketDevice.connectToHost(QHostAddress(QtNetworkSettings::serverIP()), 143);
+ if (!isConnected) {
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
QVERIFY(socketDevice.waitForWrite());
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState);
@@ -593,9 +592,8 @@ void tst_QNativeSocketEngine::networkError()
QVERIFY(client.initialize(QAbstractSocket::TcpSocket, QAbstractSocket::IPv4Protocol));
- // Connect to imap.trolltech.com's IP
- bool connected = client.connectToHost(QHostAddress(QtNetworkSettings::serverIP()), 143);
- if (!connected) {
+ const bool isConnected = client.connectToHost(QHostAddress(QtNetworkSettings::serverIP()), 143);
+ if (!isConnected) {
QVERIFY(client.state() == QAbstractSocket::ConnectingState);
QVERIFY(client.waitForWrite());
QVERIFY(client.state() == QAbstractSocket::ConnectedState);
diff --git a/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
index fc15437..2383767 100644
--- a/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
+++ b/tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
@@ -389,7 +389,8 @@ void tst_QNetworkDiskCache::expire()
qint64 max = cache.maximumCacheSize();
QCOMPARE(max, limit);
for (int i = 0; i < 10; ++i) {
- QTest::qWait(2000);
+ if (i % 3 == 0)
+ QTest::qWait(2000);
QNetworkCacheMetaData m;
m.setUrl(QUrl("http://www.foo.com/" + QString::number(i)));
QIODevice *d = cache.prepare(m);
diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
index d7faa73..b4e596f 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -181,6 +181,8 @@ private Q_SLOTS:
void ioGetFromHttpsWithIgnoreSslErrors();
void ioGetFromHttpsWithSslHandshakeError();
#endif
+ void ioGetFromHttpBrokenServer_data();
+ void ioGetFromHttpBrokenServer();
void ioGetWithManyProxies_data();
void ioGetWithManyProxies();
@@ -224,6 +226,8 @@ private Q_SLOTS:
void httpProxyCommands_data();
void httpProxyCommands();
void proxyChange();
+ void authorizationError_data();
+ void authorizationError();
};
QT_BEGIN_NAMESPACE
@@ -420,11 +424,19 @@ public:
QTcpSocket *active = new QTcpSocket(this);
active->connectToHost("127.0.0.1", server.serverPort());
+#ifndef Q_OS_SYMBIAN
if (!active->waitForConnected(10))
return false;
if (!server.waitForNewConnection(10))
return false;
+#else
+ if (!active->waitForConnected(5000))
+ return false;
+
+ if (!server.waitForNewConnection(5000))
+ return false;
+#endif
QTcpSocket *passive = server.nextPendingConnection();
passive->setParent(this);
@@ -1914,6 +1926,53 @@ void tst_QNetworkReply::ioGetFromHttpsWithSslHandshakeError()
}
#endif
+void tst_QNetworkReply::ioGetFromHttpBrokenServer_data()
+{
+ QTest::addColumn<QByteArray>("dataToSend");
+ QTest::addColumn<bool>("doDisconnect");
+
+ QTest::newRow("no-newline") << QByteArray("Hello World") << false;
+ QTest::newRow("just-newline") << QByteArray("\r\n") << false;
+ QTest::newRow("just-2newline") << QByteArray("\r\n\r\n") << false;
+ QTest::newRow("with-newlines") << QByteArray("Long first line\r\nLong second line") << false;
+ QTest::newRow("with-newlines2") << QByteArray("\r\nSecond line") << false;
+ QTest::newRow("with-newlines3") << QByteArray("ICY\r\nSecond line") << false;
+ QTest::newRow("invalid-version") << QByteArray("HTTP/123 200 \r\n") << false;
+ QTest::newRow("invalid-version2") << QByteArray("HTTP/a.\033 200 \r\n") << false;
+ QTest::newRow("invalid-reply-code") << QByteArray("HTTP/1.0 fuu \r\n") << false;
+
+ QTest::newRow("empty+disconnect") << QByteArray() << true;
+
+ QTest::newRow("no-newline+disconnect") << QByteArray("Hello World") << true;
+ QTest::newRow("just-newline+disconnect") << QByteArray("\r\n") << true;
+ QTest::newRow("just-2newline+disconnect") << QByteArray("\r\n\r\n") << true;
+ QTest::newRow("with-newlines+disconnect") << QByteArray("Long first line\r\nLong second line") << true;
+ QTest::newRow("with-newlines2+disconnect") << QByteArray("\r\nSecond line") << true;
+ QTest::newRow("with-newlines3+disconnect") << QByteArray("ICY\r\nSecond line") << true;
+
+ QTest::newRow("invalid-version+disconnect") << QByteArray("HTTP/123 200 ") << true;
+ QTest::newRow("invalid-version2+disconnect") << QByteArray("HTTP/a.\033 200 ") << true;
+ QTest::newRow("invalid-reply-code+disconnect") << QByteArray("HTTP/1.0 fuu ") << true;
+}
+
+void tst_QNetworkReply::ioGetFromHttpBrokenServer()
+{
+ QFETCH(QByteArray, dataToSend);
+ QFETCH(bool, doDisconnect);
+ MiniHttpServer server(dataToSend);
+ server.doClose = doDisconnect;
+
+ QNetworkRequest request(QUrl("http://localhost:" + QString::number(server.serverPort())));
+ QNetworkReplyPtr reply = manager.get(request);
+
+ connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ QCOMPARE(reply->url(), request.url());
+ QVERIFY(reply->error() != QNetworkReply::NoError);
+}
+
void tst_QNetworkReply::ioGetWithManyProxies_data()
{
QTest::addColumn<QList<QNetworkProxy> >("proxyList");
@@ -2146,7 +2205,7 @@ void tst_QNetworkReply::ioGetWithManyProxies()
#ifndef Q_OS_SYMBIAN
QTestEventLoop::instance().enterLoop(10);
#else
- QTestEventLoop::instance().enterLoop(30);
+ QTestEventLoop::instance().enterLoop(60);
#endif
QVERIFY(!QTestEventLoop::instance().timeout());
@@ -2276,8 +2335,13 @@ void tst_QNetworkReply::ioPutToFileFromLocalSocket()
}
QLocalSocket active;
active.connectToServer(socketname);
+#ifndef Q_OS_SYMBIAN
QVERIFY2(server.waitForNewConnection(10), server.errorString().toLatin1().constData());
QVERIFY2(active.waitForConnected(10), active.errorString().toLatin1().constData());
+#else
+ QVERIFY2(server.waitForNewConnection(5000), server.errorString().toLatin1().constData());
+ QVERIFY2(active.waitForConnected(5000), active.errorString().toLatin1().constData());
+#endif
QVERIFY2(server.hasPendingConnections(), server.errorString().toLatin1().constData());
QLocalSocket *passive = server.nextPendingConnection();
@@ -2292,7 +2356,11 @@ void tst_QNetworkReply::ioPutToFileFromLocalSocket()
passive->setParent(reply);
connect(reply, SIGNAL(finished()), &QTestEventLoop::instance(), SLOT(exitLoop()));
+#ifndef Q_OS_SYMBIAN
QTestEventLoop::instance().enterLoop(10);
+#else
+ QTestEventLoop::instance().enterLoop(30);
+#endif
QVERIFY(!QTestEventLoop::instance().timeout());
QCOMPARE(reply->url(), url);
@@ -2601,7 +2669,11 @@ void tst_QNetworkReply::downloadProgress_data()
QTest::newRow("empty") << 0;
QTest::newRow("small") << 4;
+#ifndef Q_OS_SYMBIAN
QTest::newRow("big") << 4096;
+#else
+ QTest::newRow("big") << 1024;
+#endif
}
void tst_QNetworkReply::downloadProgress()
@@ -2617,7 +2689,8 @@ void tst_QNetworkReply::downloadProgress()
QVERIFY(spy.isValid());
QCoreApplication::instance()->processEvents();
- server.waitForNewConnection(0); // ignore result, since processEvents may have got it
+ if (!server.hasPendingConnections())
+ server.waitForNewConnection(1000);
QVERIFY(server.hasPendingConnections());
QCOMPARE(spy.count(), 0);
@@ -2626,6 +2699,11 @@ void tst_QNetworkReply::downloadProgress()
QFETCH(int, loopCount);
for (int i = 1; i <= loopCount; ++i) {
+#ifdef Q_OS_SYMBIAN
+ if(i % 500 == 0) {
+ qWarning("iteration %d", i);
+ }
+#endif
sender->write(data);
QVERIFY2(sender->waitForBytesWritten(2000), "Network timeout");
@@ -2679,7 +2757,8 @@ void tst_QNetworkReply::uploadProgress()
QVERIFY(finished.isValid());
QCoreApplication::instance()->processEvents();
- server.waitForNewConnection(0); // ignore result, since processEvents may have got it
+ if (!server.hasPendingConnections())
+ server.waitForNewConnection(1000);
QVERIFY(server.hasPendingConnections());
QTcpSocket *receiver = server.nextPendingConnection();
@@ -3008,5 +3087,55 @@ void tst_QNetworkReply::proxyChange()
QVERIFY(int(reply3->error()) > 0);
}
+void tst_QNetworkReply::authorizationError_data()
+{
+
+ QTest::addColumn<QString>("url");
+ QTest::addColumn<int>("errorSignalCount");
+ QTest::addColumn<int>("finishedSignalCount");
+ QTest::addColumn<int>("error");
+ QTest::addColumn<int>("httpStatusCode");
+ QTest::addColumn<QString>("httpBody");
+
+ QTest::newRow("unknown-authorization-method") << "http://" + QtNetworkSettings::serverName() +
+ "/cgi-bin/http-unknown-authentication-method.cgi?401-authorization-required" << 1 << 1
+ << int(QNetworkReply::AuthenticationRequiredError) << 401 << "authorization required";
+ QTest::newRow("unknown-proxy-authorization-method") << "http://" + QtNetworkSettings::serverName() +
+ "/cgi-bin/http-unknown-authentication-method.cgi?407-proxy-authorization-required" << 1 << 1
+ << int(QNetworkReply::ProxyAuthenticationRequiredError) << 407
+ << "authorization required";
+}
+
+void tst_QNetworkReply::authorizationError()
+{
+ QFETCH(QString, url);
+ QNetworkRequest request(url);
+ QNetworkReplyPtr reply = manager.get(request);
+
+ QCOMPARE(reply->error(), QNetworkReply::NoError);
+
+ qRegisterMetaType<QNetworkReply::NetworkError>("QNetworkReply::NetworkError");
+ QSignalSpy errorSpy(reply, SIGNAL(error(QNetworkReply::NetworkError)));
+ QSignalSpy finishedSpy(reply, SIGNAL(finished()));
+ // now run the request:
+ connect(reply, SIGNAL(finished()),
+ &QTestEventLoop::instance(), SLOT(exitLoop()));
+ QTestEventLoop::instance().enterLoop(10);
+ QVERIFY(!QTestEventLoop::instance().timeout());
+
+ QFETCH(int, errorSignalCount);
+ QCOMPARE(errorSpy.count(), errorSignalCount);
+ QFETCH(int, finishedSignalCount);
+ QCOMPARE(finishedSpy.count(), finishedSignalCount);
+ QFETCH(int, error);
+ QCOMPARE(reply->error(), QNetworkReply::NetworkError(error));
+
+ QFETCH(int, httpStatusCode);
+ QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), httpStatusCode);
+
+ QFETCH(QString, httpBody);
+ QCOMPARE(QString(reply->readAll()), httpBody);
+}
+
QTEST_MAIN(tst_QNetworkReply)
#include "tst_qnetworkreply.moc"
diff --git a/tests/auto/qobjectrace/tst_qobjectrace.cpp b/tests/auto/qobjectrace/tst_qobjectrace.cpp
index 0c88f29..fcfd528 100644
--- a/tests/auto/qobjectrace/tst_qobjectrace.cpp
+++ b/tests/auto/qobjectrace/tst_qobjectrace.cpp
@@ -50,6 +50,7 @@ class tst_QObjectRace: public QObject
Q_OBJECT
private slots:
void moveToThreadRace();
+ void destroyRace();
};
class RaceObject : public QObject
@@ -147,5 +148,93 @@ void tst_QObjectRace::moveToThreadRace()
delete object;
}
+
+class MyObject : public QObject
+{ Q_OBJECT
+ public slots:
+ void slot1() { emit signal1(); }
+ void slot2() { emit signal2(); }
+ void slot3() { emit signal3(); }
+ void slot4() { emit signal4(); }
+ void slot5() { emit signal5(); }
+ void slot6() { emit signal6(); }
+ void slot7() { emit signal7(); }
+ signals:
+ void signal1();
+ void signal2();
+ void signal3();
+ void signal4();
+ void signal5();
+ void signal6();
+ void signal7();
+};
+
+
+
+class DestroyThread : public QThread
+{
+ Q_OBJECT
+ QObject **objects;
+ int number;
+
+public:
+ void setObjects(QObject **o, int n)
+ {
+ objects = o;
+ number = n;
+ for(int i = 0; i < number; i++)
+ objects[i]->moveToThread(this);
+ }
+
+ void run() {
+ for(int i = 0; i < number; i++)
+ delete objects[i];
+ }
+};
+
+void tst_QObjectRace::destroyRace()
+{
+ enum { ThreadCount = 10, ObjectCountPerThread = 733,
+ ObjectCount = ThreadCount * ObjectCountPerThread };
+
+ const char *_slots[] = { SLOT(slot1()) , SLOT(slot2()) , SLOT(slot3()),
+ SLOT(slot4()) , SLOT(slot5()) , SLOT(slot6()),
+ SLOT(slot7()) };
+
+ const char *_signals[] = { SIGNAL(signal1()), SIGNAL(signal2()), SIGNAL(signal3()),
+ SIGNAL(signal4()), SIGNAL(signal5()), SIGNAL(signal6()),
+ SIGNAL(signal7()) };
+
+ QObject *objects[ObjectCount];
+ for (int i = 0; i < ObjectCount; ++i)
+ objects[i] = new MyObject;
+
+
+ for (int i = 0; i < ObjectCount * 11; ++i) {
+ connect(objects[(i*13) % ObjectCount], _signals[(2*i)%7],
+ objects[((i+2)*17) % ObjectCount], _slots[(3*i+2)%7] );
+ connect(objects[((i+6)*23) % ObjectCount], _signals[(5*i+4)%7],
+ objects[((i+8)*41) % ObjectCount], _slots[(i+6)%7] );
+ }
+
+ DestroyThread *threads[ThreadCount];
+ for (int i = 0; i < ThreadCount; ++i) {
+ threads[i] = new DestroyThread;
+ threads[i]->setObjects(objects + i*ObjectCountPerThread, ObjectCountPerThread);
+ }
+
+ for (int i = 0; i < ThreadCount; ++i)
+ threads[i]->start();
+
+ QVERIFY(threads[0]->wait(TwoMinutes));
+ // the other threads should finish pretty quickly now
+ for (int i = 1; i < ThreadCount; ++i)
+ QVERIFY(threads[i]->wait(3000));
+
+ for (int i = 0; i < ThreadCount; ++i)
+ delete threads[i];
+}
+
+
QTEST_MAIN(tst_QObjectRace)
#include "tst_qobjectrace.moc"
diff --git a/tests/auto/qprinter/tst_qprinter.cpp b/tests/auto/qprinter/tst_qprinter.cpp
index cde4ae5..221e3b0 100644
--- a/tests/auto/qprinter/tst_qprinter.cpp
+++ b/tests/auto/qprinter/tst_qprinter.cpp
@@ -953,8 +953,9 @@ void tst_QPrinter::printDialogCompleter()
QTest::qWait(100);
- QTest::keyClick(0, Qt::Key_Tab);
- QTest::keyClick(0, 'P');
+ QTest::keyClick(&dialog, Qt::Key_Tab);
+ QTest::keyClick(&dialog, 'P');
+ // The test passes if it doesn't crash.
#endif
}
diff --git a/tests/auto/qprocess/tst_qprocess.cpp b/tests/auto/qprocess/tst_qprocess.cpp
index 2610af9..8101708 100644
--- a/tests/auto/qprocess/tst_qprocess.cpp
+++ b/tests/auto/qprocess/tst_qprocess.cpp
@@ -1623,12 +1623,10 @@ void tst_QProcess::spaceArgsTest()
//-----------------------------------------------------------------------------
void tst_QProcess::exitCodeTest()
{
-#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
- // WINSCW builds in Symbian panic somewhere deep inside Symbian codes
- // when eventdispather is deleted if too many test iterations are used.
- // Reason for this is unclear.
- // TODO: Remove special case when eventdispatcher is fixed.
- for (int i = 0; i < 25; ++i) {
+#if defined(Q_OS_SYMBIAN)
+ // Kernel will run out of process handles on some hw, as there is some
+ // delay before they are recycled, so limit the amount of processes.
+ for (int i = 0; i < 50; ++i) {
#else
for (int i = 0; i < 255; ++i) {
#endif
diff --git a/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp b/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp
index 1413b0d..257ec0b 100644
--- a/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp
+++ b/tests/auto/qscriptvalueiterator/tst_qscriptvalueiterator.cpp
@@ -68,6 +68,7 @@ private slots:
void iterateString();
void iterateGetterSetter();
void iterateArgumentsObject();
+ void assignObjectToIterator();
void undefinedBehavior();
};
@@ -562,5 +563,37 @@ void tst_QScriptValueIterator::undefinedBehavior()
QVERIFY(it.value().isNumber());
}
+void tst_QScriptValueIterator::assignObjectToIterator()
+{
+ QScriptEngine eng;
+ QScriptValue obj1 = eng.newObject();
+ obj1.setProperty("foo", 123);
+ QScriptValue obj2 = eng.newObject();
+ obj2.setProperty("bar", 456);
+
+ QScriptValueIterator it(obj1);
+ QVERIFY(it.hasNext());
+ it.next();
+ it = obj2;
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("bar"));
+
+ it = obj1;
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("foo"));
+
+ it = obj2;
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("bar"));
+
+ it = obj2;
+ QVERIFY(it.hasNext());
+ it.next();
+ QCOMPARE(it.name(), QString::fromLatin1("bar"));
+}
+
QTEST_MAIN(tst_QScriptValueIterator)
#include "tst_qscriptvalueiterator.moc"
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
index becbf52..3ae849d 100644
--- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
@@ -61,8 +61,11 @@ private slots:
void downCast();
void upCast();
void differentPointers();
+ void virtualBaseDifferentPointers();
#ifndef QTEST_NO_RTTI
void dynamicCast();
+ void dynamicCastDifferentPointers();
+ void dynamicCastVirtualBase();
void dynamicCastFailure();
#endif
void customDeleter();
@@ -325,6 +328,10 @@ class DiffPtrDerivedData: public Stuffing, public Data
{
};
+class VirtualDerived: virtual public Data
+{
+};
+
void tst_QSharedPointer::downCast()
{
{
@@ -443,7 +450,7 @@ void tst_QSharedPointer::differentPointers()
DiffPtrDerivedData *aData = new DiffPtrDerivedData;
Data *aBase = aData;
Q_ASSERT(aData == aBase);
- Q_ASSERT(quintptr(&aData) != quintptr(&aBase));
+ Q_ASSERT(*reinterpret_cast<quintptr *>(&aData) != *reinterpret_cast<quintptr *>(&aBase));
QSharedPointer<Data> baseptr = QSharedPointer<Data>(aData);
QSharedPointer<DiffPtrDerivedData> ptr = qSharedPointerCast<DiffPtrDerivedData>(baseptr);
@@ -457,7 +464,7 @@ void tst_QSharedPointer::differentPointers()
DiffPtrDerivedData *aData = new DiffPtrDerivedData;
Data *aBase = aData;
Q_ASSERT(aData == aBase);
- Q_ASSERT(quintptr(&aData) != quintptr(&aBase));
+ Q_ASSERT(*reinterpret_cast<quintptr *>(&aData) != *reinterpret_cast<quintptr *>(&aBase));
QSharedPointer<DiffPtrDerivedData> ptr = QSharedPointer<DiffPtrDerivedData>(aData);
QSharedPointer<Data> baseptr = ptr;
@@ -468,23 +475,53 @@ void tst_QSharedPointer::differentPointers()
QVERIFY(baseptr == aData);
QVERIFY(baseptr == aBase);
}
+}
+
+void tst_QSharedPointer::virtualBaseDifferentPointers()
+{
+ {
+ VirtualDerived *aData = new VirtualDerived;
+ Data *aBase = aData;
+ Q_ASSERT(aData == aBase);
+ Q_ASSERT(*reinterpret_cast<quintptr *>(&aData) != *reinterpret_cast<quintptr *>(&aBase));
+
+ QSharedPointer<VirtualDerived> ptr = QSharedPointer<VirtualDerived>(aData);
+ QSharedPointer<Data> baseptr = qSharedPointerCast<Data>(ptr);
+ QVERIFY(ptr == baseptr);
+ QVERIFY(ptr.data() == baseptr.data());
+ QVERIFY(ptr == aBase);
+ QVERIFY(ptr == aData);
+ QVERIFY(baseptr == aData);
+ QVERIFY(baseptr == aBase);
+ }
+
+ {
+ VirtualDerived *aData = new VirtualDerived;
+ Data *aBase = aData;
+ Q_ASSERT(aData == aBase);
+ Q_ASSERT(*reinterpret_cast<quintptr *>(&aData) != *reinterpret_cast<quintptr *>(&aBase));
- // there is no possibility for different pointers in
- // internal reference counting right now
- //
- // to do that, it's necessary to first implement the ability to
- // call (virtual) functions, so that the two differing bases have
- // the same reference counter
+ QSharedPointer<VirtualDerived> ptr = QSharedPointer<VirtualDerived>(aData);
+ QSharedPointer<Data> baseptr = ptr;
+ QVERIFY(ptr == baseptr);
+ QVERIFY(ptr.data() == baseptr.data());
+ QVERIFY(ptr == aBase);
+ QVERIFY(ptr == aData);
+ QVERIFY(baseptr == aData);
+ QVERIFY(baseptr == aBase);
+ }
}
#ifndef QTEST_NO_RTTI
void tst_QSharedPointer::dynamicCast()
{
- QSharedPointer<Data> baseptr = QSharedPointer<Data>(new DerivedData);
+ DerivedData *aData = new DerivedData;
+ QSharedPointer<Data> baseptr = QSharedPointer<Data>(aData);
{
QSharedPointer<DerivedData> derivedptr = qSharedPointerDynamicCast<DerivedData>(baseptr);
QVERIFY(baseptr == derivedptr);
+ QCOMPARE(derivedptr.data(), aData);
QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data());
}
QCOMPARE(int(baseptr.d->weakref), 1);
@@ -494,6 +531,7 @@ void tst_QSharedPointer::dynamicCast()
QWeakPointer<Data> weakptr = baseptr;
QSharedPointer<DerivedData> derivedptr = qSharedPointerDynamicCast<DerivedData>(weakptr);
QVERIFY(baseptr == derivedptr);
+ QCOMPARE(derivedptr.data(), aData);
QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data());
}
QCOMPARE(int(baseptr.d->weakref), 1);
@@ -502,6 +540,87 @@ void tst_QSharedPointer::dynamicCast()
{
QSharedPointer<DerivedData> derivedptr = baseptr.dynamicCast<DerivedData>();
QVERIFY(baseptr == derivedptr);
+ QCOMPARE(derivedptr.data(), aData);
+ QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data());
+ }
+ QCOMPARE(int(baseptr.d->weakref), 1);
+ QCOMPARE(int(baseptr.d->strongref), 1);
+}
+
+void tst_QSharedPointer::dynamicCastDifferentPointers()
+{
+ // DiffPtrDerivedData derives from both Data and Stuffing
+ DiffPtrDerivedData *aData = new DiffPtrDerivedData;
+ QSharedPointer<Data> baseptr = QSharedPointer<Data>(aData);
+
+ {
+ QSharedPointer<DiffPtrDerivedData> derivedptr = qSharedPointerDynamicCast<DiffPtrDerivedData>(baseptr);
+ QVERIFY(baseptr == derivedptr);
+ QCOMPARE(derivedptr.data(), aData);
+ QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data());
+ }
+ QCOMPARE(int(baseptr.d->weakref), 1);
+ QCOMPARE(int(baseptr.d->strongref), 1);
+
+ {
+ QWeakPointer<Data> weakptr = baseptr;
+ QSharedPointer<DiffPtrDerivedData> derivedptr = qSharedPointerDynamicCast<DiffPtrDerivedData>(weakptr);
+ QVERIFY(baseptr == derivedptr);
+ QCOMPARE(derivedptr.data(), aData);
+ QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data());
+ }
+ QCOMPARE(int(baseptr.d->weakref), 1);
+ QCOMPARE(int(baseptr.d->strongref), 1);
+
+ {
+ QSharedPointer<DiffPtrDerivedData> derivedptr = baseptr.dynamicCast<DiffPtrDerivedData>();
+ QVERIFY(baseptr == derivedptr);
+ QCOMPARE(derivedptr.data(), aData);
+ QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data());
+ }
+ QCOMPARE(int(baseptr.d->weakref), 1);
+ QCOMPARE(int(baseptr.d->strongref), 1);
+
+ {
+ Stuffing *nakedptr = dynamic_cast<Stuffing *>(baseptr.data());
+ QVERIFY(nakedptr);
+
+ QSharedPointer<Stuffing> otherbaseptr = qSharedPointerDynamicCast<Stuffing>(baseptr);
+ QVERIFY(!otherbaseptr.isNull());
+ QVERIFY(otherbaseptr == nakedptr);
+ QCOMPARE(otherbaseptr.data(), nakedptr);
+ QCOMPARE(static_cast<DiffPtrDerivedData*>(otherbaseptr.data()), aData);
+ }
+}
+
+void tst_QSharedPointer::dynamicCastVirtualBase()
+{
+ VirtualDerived *aData = new VirtualDerived;
+ QSharedPointer<Data> baseptr = QSharedPointer<Data>(aData);
+
+ {
+ QSharedPointer<VirtualDerived> derivedptr = qSharedPointerDynamicCast<VirtualDerived>(baseptr);
+ QVERIFY(baseptr == derivedptr);
+ QCOMPARE(derivedptr.data(), aData);
+ QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data());
+ }
+ QCOMPARE(int(baseptr.d->weakref), 1);
+ QCOMPARE(int(baseptr.d->strongref), 1);
+
+ {
+ QWeakPointer<Data> weakptr = baseptr;
+ QSharedPointer<VirtualDerived> derivedptr = qSharedPointerDynamicCast<VirtualDerived>(weakptr);
+ QVERIFY(baseptr == derivedptr);
+ QCOMPARE(derivedptr.data(), aData);
+ QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data());
+ }
+ QCOMPARE(int(baseptr.d->weakref), 1);
+ QCOMPARE(int(baseptr.d->strongref), 1);
+
+ {
+ QSharedPointer<VirtualDerived> derivedptr = baseptr.dynamicCast<VirtualDerived>();
+ QVERIFY(baseptr == derivedptr);
+ QCOMPARE(derivedptr.data(), aData);
QCOMPARE(static_cast<Data *>(derivedptr.data()), baseptr.data());
}
QCOMPARE(int(baseptr.d->weakref), 1);
diff --git a/tests/auto/qsidebar/tst_qsidebar.cpp b/tests/auto/qsidebar/tst_qsidebar.cpp
index 705e222..1384391 100644
--- a/tests/auto/qsidebar/tst_qsidebar.cpp
+++ b/tests/auto/qsidebar/tst_qsidebar.cpp
@@ -185,6 +185,13 @@ void tst_QSidebar::addUrls()
qsidebar.addUrls(doubleUrls, 1);
QCOMPARE(qsidebar.urls().size(), 1);
+ // Two paths that are effectively pointing to the same location
+ doubleUrls << QUrl::fromLocalFile(QDir::home().absolutePath());
+ doubleUrls << QUrl::fromLocalFile(QDir::home().absolutePath() + "/.");
+ qsidebar.setUrls(emptyUrls);
+ qsidebar.addUrls(doubleUrls, 1);
+ QCOMPARE(qsidebar.urls().size(), 1);
+
#if defined(Q_OS_WIN)
//Windows is case insensitive so no duplicate entries in that case
doubleUrls << QUrl::fromLocalFile(QDir::home().absolutePath());
@@ -200,8 +207,6 @@ void tst_QSidebar::addUrls()
qsidebar.addUrls(doubleUrls, 1);
QCOMPARE(qsidebar.urls().size(), 2);
#endif
-
-
}
void tst_QSidebar::goToUrl()
diff --git a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
index 74f09d0..a27ea00 100644
--- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
+++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
@@ -319,7 +319,6 @@ void tst_QSocks5SocketEngine::simpleConnectToIMAP()
socketDevice.setProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080));
- // Connect to imap.trolltech.com's IP
QVERIFY(!socketDevice.connectToHost(QHostAddress(QtNetworkSettings::serverIP()), 143));
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
QVERIFY(socketDevice.waitForWrite());
@@ -799,14 +798,14 @@ void tst_QSocks5SocketEngine::downloadBigFile()
if (QTestEventLoop::instance().timeout())
QFAIL("Network operation timed out");
- QCOMPARE(bytesAvailable, qint64(10000309));
+ QCOMPARE(bytesAvailable, qint64(10000000));
QVERIFY(tmpSocket->state() == QAbstractSocket::ConnectedState);
- qDebug("\t\t%.1fMB/%.1fs: %.1fMB/s",
+ /*qDebug("\t\t%.1fMB/%.1fs: %.1fMB/s",
bytesAvailable / (1024.0 * 1024.0),
stopWatch.elapsed() / 1024.0,
- (bytesAvailable / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024));
+ (bytesAvailable / (stopWatch.elapsed() / 1000.0)) / (1024 * 1024));*/
delete tmpSocket;
tmpSocket = 0;
@@ -820,7 +819,10 @@ void tst_QSocks5SocketEngine::exitLoopSlot()
void tst_QSocks5SocketEngine::downloadBigFileSlot()
{
- bytesAvailable += tmpSocket->readAll().size();
+ QByteArray tmp=tmpSocket->readAll();
+ int correction=tmp.indexOf((char)0,0); //skip header
+ if (correction==-1) correction=0;
+ bytesAvailable += (tmp.size()-correction);
if (bytesAvailable >= 10000000)
QTestEventLoop::instance().exitLoop();
}
@@ -902,7 +904,6 @@ void tst_QSocks5SocketEngine::passwordAuth2()
socketDevice.setProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1081));
socketDevice.setReceiver(this);
- // Connect to imap.trolltech.com's IP
QVERIFY(!socketDevice.connectToHost(QHostAddress(QtNetworkSettings::serverIP()), 143));
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
while (socketDevice.state() == QAbstractSocket::ConnectingState) {
diff --git a/tests/auto/qsplitter/tst_qsplitter.cpp b/tests/auto/qsplitter/tst_qsplitter.cpp
index b463f7f..51bd99f 100644
--- a/tests/auto/qsplitter/tst_qsplitter.cpp
+++ b/tests/auto/qsplitter/tst_qsplitter.cpp
@@ -55,6 +55,7 @@
#include <qtreeview.h>
#include <qlabel.h>
#include <qdebug.h> // for file error messages
+#include "../../shared/util.h"
//TESTED_CLASS=
//TESTED_FILES=
@@ -1341,9 +1342,7 @@ void tst_QSplitter::task187373_addAbstractScrollAreas()
if (addOutsideConstructor)
splitter->addWidget(w);
- qApp->processEvents();
-
- QVERIFY(w->isVisible());
+ QTRY_VERIFY(w->isVisible());
QVERIFY(!w->isHidden());
QVERIFY(w->viewport()->isVisible());
QVERIFY(!w->viewport()->isHidden());
diff --git a/tests/auto/qsqlquery/tst_qsqlquery.cpp b/tests/auto/qsqlquery/tst_qsqlquery.cpp
index 074f16f..7f97972 100644
--- a/tests/auto/qsqlquery/tst_qsqlquery.cpp
+++ b/tests/auto/qsqlquery/tst_qsqlquery.cpp
@@ -178,9 +178,11 @@ private slots:
void task_217003_data() { generic_data(); }
void task_217003();
#endif
-
void task_250026_data() { generic_data("QODBC"); }
void task_250026();
+ void task_205701_data() { generic_data("QMYSQL"); }
+ void task_205701();
+
private:
@@ -297,7 +299,7 @@ void tst_QSqlQuery::dropTestTables( QSqlDatabase db )
#ifdef NOT_READY_YET
tablenames << qTableName( "Planet" );
#endif
- tablenames << qTableName( "task_250026" );
+ tablenames << qTableName( "task_250026" );
tst_Databases::safeDropTables( db, tablenames );
}
@@ -2711,5 +2713,21 @@ void tst_QSqlQuery::task_250026()
QCOMPARE( q.value( 0 ).toString().length(), data1026.length() );
}
+void tst_QSqlQuery::task_205701()
+{
+ QSqlDatabase qsdb = QSqlDatabase::addDatabase("QMYSQL", "atest");
+ qsdb.setHostName("test");
+ qsdb.setDatabaseName("test");
+ qsdb.setUserName("test");
+ qsdb.setPassword("test");
+ qsdb.open();
+
+// {
+ QSqlQuery query(qsdb);
+// }
+ QSqlDatabase::removeDatabase("atest");
+}
+
+
QTEST_MAIN( tst_QSqlQuery )
#include "tst_qsqlquery.moc"
diff --git a/tests/auto/qsslsocket/qsslsocket.pro b/tests/auto/qsslsocket/qsslsocket.pro
index 3886687..8f61318 100644
--- a/tests/auto/qsslsocket/qsslsocket.pro
+++ b/tests/auto/qsslsocket/qsslsocket.pro
@@ -15,14 +15,20 @@ win32 {
}
}
-
-symbian:{
+wince* {
+ DEFINES += SRCDIR=\\\"./\\\"
+
+ certFiles.sources = certs ssl.tar.gz
+ certFiles.path = .
+ DEPLOYMENT += certFiles
+} else:symbian {
DEFINES += QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
TARGET.EPOCHEAPSIZE="0x100 0x1000000"
TARGET.CAPABILITY="ALL -TCB"
-}
-wince*|symbian: {
- certFiles.sources = certs ssl.tar.gz
- certFiles.path = .
- DEPLOYMENT += certFiles
+
+ certFiles.sources = certs ssl.tar.gz
+ certFiles.path = .
+ DEPLOYMENT += certFiles
+} else {
+ DEFINES += SRCDIR=\\\"$$PWD/\\\"
}
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index c9f9cbd..9f7b537 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -76,6 +76,10 @@ Q_DECLARE_METATYPE(QSslError)
#define QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
#endif
+#ifdef Q_OS_SYMBIAN
+#define SRCDIR ""
+#endif
+
#ifndef QT_NO_OPENSSL
class QSslSocketPtr: public QSharedPointer<QSslSocket>
{
@@ -493,11 +497,6 @@ void tst_QSslSocket::simpleConnectWithIgnore()
if (!socket.canReadLine())
enterLoop(10);
-/*
- QByteArray data(socket.readAll());
- QBYTEARRAY_DEBUG(data, 4096);
-*/
-
QCOMPARE(socket.readAll(), QtNetworkSettings::expectedReplySSL());
socket.disconnectFromHost();
}
@@ -506,40 +505,41 @@ void tst_QSslSocket::sslErrors_data()
{
QTest::addColumn<QString>("host");
QTest::addColumn<int>("port");
- QTest::addColumn<SslErrorList>("errors");
-
- QTest::newRow(QtNetworkSettings::serverName().toAscii() + " port443") << QtNetworkSettings::serverName() << 443
- << (SslErrorList()
- << QSslError::UnableToGetLocalIssuerCertificate
- << QSslError::CertificateUntrusted
- << QSslError::UnableToVerifyFirstCertificate
- );
- QTest::newRow(QtNetworkSettings::serverName().toAscii() + " port993") << QtNetworkSettings::serverName() << 993
- << (SslErrorList()
- << QSslError::HostNameMismatch
- << QSslError::SelfSignedCertificate
- );
- // TODO: Should we have QtNetworkSettings::serverName alias
- // in order that we could test with different host name
+ QTest::addColumn<SslErrorList>("expected");
+
+ QTest::newRow(qPrintable(QtNetworkSettings::serverLocalName()))
+ << QtNetworkSettings::serverLocalName()
+ << 993
+ << (SslErrorList() << QSslError::HostNameMismatch
+ << QSslError::SelfSignedCertificate);
+
+ QTest::newRow("imap.trolltech.com")
+ << "imap.trolltech.com"
+ << 993
+ << (SslErrorList() << QSslError::SelfSignedCertificateInChain);
}
void tst_QSslSocket::sslErrors()
{
QFETCH(QString, host);
QFETCH(int, port);
- QFETCH(SslErrorList, errors);
+ QFETCH(SslErrorList, expected);
QSslSocketPtr socket = newSocket();
socket->connectToHostEncrypted(host, port);
socket->waitForEncrypted(5000);
- SslErrorList list;
+ SslErrorList output;
foreach (QSslError error, socket->sslErrors()) {
//printf("error = %s\n", error.errorString().toAscii().data());
- list << error.error();
+ output << error.error();
}
- QCOMPARE(list, errors);
+#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
+ if (output.last() == QSslError::CertificateUntrusted)
+ output.takeLast();
+#endif
+ QCOMPARE(output, expected);
}
void tst_QSslSocket::addCaCertificate()
@@ -585,7 +585,7 @@ void tst_QSslSocket::connectToHostEncrypted()
QSslSocketPtr socket = newSocket();
this->socket = socket;
- socket->addCaCertificates(QLatin1String("certs/qt-test-server-cacert.pem"));
+ QVERIFY(socket->addCaCertificates(QLatin1String("certs/qt-test-server-cacert.pem")));
#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
connect(socket, SIGNAL(sslErrors(QList<QSslError>)),
this, SLOT(untrustedWorkaroundSlot(QList<QSslError>)));
@@ -657,7 +657,7 @@ void tst_QSslSocket::peerCertificateChain()
QSslSocketPtr socket = newSocket();
this->socket = socket;
- QList<QSslCertificate> caCertificates = QSslCertificate::fromPath(QLatin1String("certs/qt-test-server-cacert.pem"));
+ QList<QSslCertificate> caCertificates = QSslCertificate::fromPath(QLatin1String(SRCDIR "certs/qt-test-server-cacert.pem"));
QVERIFY(caCertificates.count() == 1);
socket->addCaCertificates(caCertificates);
#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
@@ -717,7 +717,7 @@ void tst_QSslSocket::protocol()
QSslSocketPtr socket = newSocket();
this->socket = socket;
- QList<QSslCertificate> certs = QSslCertificate::fromPath("certs/qt-test-server-cacert.pem");
+ QList<QSslCertificate> certs = QSslCertificate::fromPath(SRCDIR "certs/qt-test-server-cacert.pem");
// qDebug() << "certs:" << certs.at(0).issuerInfo(QSslCertificate::CommonName);
socket->setCaCertificates(certs);
@@ -800,7 +800,7 @@ void tst_QSslSocket::setCaCertificates()
QSslSocket socket;
QCOMPARE(socket.caCertificates(), QSslSocket::defaultCaCertificates());
- socket.setCaCertificates(QSslCertificate::fromPath("certs/qt-test-server-cacert.pem"));
+ socket.setCaCertificates(QSslCertificate::fromPath(SRCDIR "certs/qt-test-server-cacert.pem"));
QCOMPARE(socket.caCertificates().size(), 1);
socket.setCaCertificates(socket.defaultCaCertificates());
QCOMPARE(socket.caCertificates(), QSslSocket::defaultCaCertificates());
@@ -831,13 +831,13 @@ protected:
socket = new QSslSocket(this);
connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
- QFile file("certs/fluke.key");
+ QFile file(SRCDIR "certs/fluke.key");
QVERIFY(file.open(QIODevice::ReadOnly));
QSslKey key(file.readAll(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey);
QVERIFY(!key.isNull());
socket->setPrivateKey(key);
- QList<QSslCertificate> localCert = QSslCertificate::fromPath("certs/fluke.cert");
+ QList<QSslCertificate> localCert = QSslCertificate::fromPath(SRCDIR "certs/fluke.cert");
QVERIFY(!localCert.isEmpty());
QVERIFY(localCert.first().handle());
socket->setLocalCertificate(localCert.first());
@@ -951,7 +951,7 @@ void tst_QSslSocket::addDefaultCaCertificate()
// Reset the global CA chain
QSslSocket::setDefaultCaCertificates(QSslSocket::systemCaCertificates());
- QList<QSslCertificate> flukeCerts = QSslCertificate::fromPath("certs/qt-test-server-cacert.pem");
+ QList<QSslCertificate> flukeCerts = QSslCertificate::fromPath(SRCDIR "certs/qt-test-server-cacert.pem");
QCOMPARE(flukeCerts.size(), 1);
QList<QSslCertificate> globalCerts = QSslSocket::defaultCaCertificates();
QVERIFY(!globalCerts.contains(flukeCerts.first()));
@@ -1061,7 +1061,7 @@ protected:
socket->ignoreSslErrors();
// Only set the certificate
- QList<QSslCertificate> localCert = QSslCertificate::fromPath("certs/fluke.cert");
+ QList<QSslCertificate> localCert = QSslCertificate::fromPath(SRCDIR "certs/fluke.cert");
QVERIFY(!localCert.isEmpty());
QVERIFY(localCert.first().handle());
socket->setLocalCertificate(localCert.first());
@@ -1220,13 +1220,13 @@ protected:
socket = new QSslSocket(this);
connect(socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(ignoreErrorSlot()));
- QFile file("certs/fluke.key");
+ QFile file(SRCDIR "certs/fluke.key");
QVERIFY(file.open(QIODevice::ReadOnly));
QSslKey key(file.readAll(), QSsl::Rsa, QSsl::Pem, QSsl::PrivateKey);
QVERIFY(!key.isNull());
socket->setPrivateKey(key);
- QList<QSslCertificate> localCert = QSslCertificate::fromPath("certs/fluke.cert");
+ QList<QSslCertificate> localCert = QSslCertificate::fromPath(SRCDIR "certs/fluke.cert");
QVERIFY(!localCert.isEmpty());
QVERIFY(localCert.first().handle());
socket->setLocalCertificate(localCert.first());
@@ -1388,8 +1388,8 @@ protected:
{
socket = new QSslSocket(this);
- socket->setPrivateKey("certs/fluke.key");
- socket->setLocalCertificate("certs/fluke.cert");
+ socket->setPrivateKey(SRCDIR "certs/fluke.key");
+ socket->setLocalCertificate(SRCDIR "certs/fluke.cert");
socket->setSocketDescriptor(socketDescriptor);
socket->startServerEncryption();
}
@@ -1531,7 +1531,7 @@ void tst_QSslSocket::resetProxy()
// make sure the connection works, and then set a nonsense proxy, and then
// make sure it does not work anymore
QSslSocket socket;
- socket.addCaCertificates(QLatin1String("certs/qt-test-server-cacert.pem"));
+ socket.addCaCertificates(QLatin1String(SRCDIR "certs/qt-test-server-cacert.pem"));
socket.setProxy(goodProxy);
socket.connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
QVERIFY2(socket.waitForConnected(10000), qPrintable(socket.errorString()));
@@ -1550,7 +1550,7 @@ void tst_QSslSocket::resetProxy()
// set the nonsense proxy and make sure the connection does not work,
// and then set the right proxy and make sure it works
QSslSocket socket2;
- socket2.addCaCertificates(QLatin1String("certs/qt-test-server-cacert.pem"));
+ socket2.addCaCertificates(QLatin1String(SRCDIR "certs/qt-test-server-cacert.pem"));
socket2.setProxy(badProxy);
socket2.connectToHostEncrypted(QtNetworkSettings::serverName(), 443);
QVERIFY(! socket2.waitForConnected(10000));
diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
index da3f19a..f2ea2d9 100644
--- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
+++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp
@@ -961,7 +961,11 @@ protected:
{
bool timedOut = false;
while (!quit) {
+#ifndef Q_OS_SYMBIAN
if (server->waitForNewConnection(500, &timedOut))
+#else
+ if (server->waitForNewConnection(5000, &timedOut))
+#endif
break;
if (!timedOut)
return;
@@ -972,7 +976,7 @@ protected:
#ifndef Q_OS_SYMBIAN
if (socket->waitForDisconnected(500))
#else
- if (socket->waitForDisconnected(1000))
+ if (socket->waitForDisconnected(5000))
#endif
break;
if (socket->error() != QAbstractSocket::SocketTimeoutError)
@@ -1024,7 +1028,7 @@ void tst_QTcpSocket::disconnectWhileConnectingNoEventLoop()
#ifndef Q_OS_SYMBIAN
QVERIFY2(socket->waitForDisconnected(10000), "Network timeout");
#else
- QVERIFY2(socket->waitForDisconnected(20000), "Network timeout");
+ QVERIFY2(socket->waitForDisconnected(30000), "Network timeout");
#endif
QVERIFY(socket->state() == QAbstractSocket::UnconnectedState);
if (!closeDirectly) {
@@ -1035,7 +1039,7 @@ void tst_QTcpSocket::disconnectWhileConnectingNoEventLoop()
delete socket;
// check if the other side received everything ok
- QVERIFY(thread.wait(10000));
+ QVERIFY(thread.wait(30000));
QVERIFY(thread.ok);
QCOMPARE(thread.receivedData, data);
}
@@ -1074,7 +1078,7 @@ void tst_QTcpSocket::disconnectWhileLookingUp()
#ifndef Q_OS_SYMBIAN
QTimer::singleShot(50, &loop, SLOT(quit()));
#else
- QTimer::singleShot(500, &loop, SLOT(quit()));
+ QTimer::singleShot(5000, &loop, SLOT(quit()));
#endif
loop.exec();
@@ -1321,11 +1325,19 @@ void tst_QTcpSocket::dontCloseOnTimeout()
QTcpSocket *socket = newSocket();
socket->connectToHost(serverAddress, server.serverPort());
+#ifndef Q_OS_SYMBIAN
QVERIFY(!socket->waitForReadyRead(100));
+#else
+ QVERIFY(!socket->waitForReadyRead(5000));
+#endif
QCOMPARE(socket->error(), QTcpSocket::SocketTimeoutError);
QVERIFY(socket->isOpen());
+#ifndef Q_OS_SYMBIAN
QVERIFY(!socket->waitForDisconnected(100));
+#else
+ QVERIFY(!socket->waitForDisconnected(5000));
+#endif
QCOMPARE(socket->error(), QTcpSocket::SocketTimeoutError);
QVERIFY(socket->isOpen());
diff --git a/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp b/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp
index 8cae64e..543a116 100644
--- a/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp
+++ b/tests/auto/qtemporaryfile/tst_qtemporaryfile.cpp
@@ -77,6 +77,7 @@ private slots:
void fileTemplate_data();
void getSetCheck();
void fileName();
+ void fileNameIsEmpty();
void autoRemove();
void write();
void openCloseOpenClose();
@@ -86,6 +87,8 @@ private slots:
void stressTest();
void rename();
void renameFdLeak();
+ void reOpenThroughQFile();
+
public:
};
@@ -189,6 +192,27 @@ void tst_QTemporaryFile::fileName()
QCOMPARE(absoluteFilePath, absoluteTempPath);
}
+void tst_QTemporaryFile::fileNameIsEmpty()
+{
+ QString filename;
+ {
+ QTemporaryFile file;
+ QVERIFY(file.fileName().isEmpty());
+
+ QVERIFY(file.open());
+ QVERIFY(!file.fileName().isEmpty());
+
+ filename = file.fileName();
+ QVERIFY(QFile::exists(filename));
+
+ file.close();
+ QVERIFY(!file.isOpen());
+ QVERIFY(QFile::exists(filename));
+ QVERIFY(!file.fileName().isEmpty());
+ }
+ QVERIFY(!QFile::exists(filename));
+}
+
void tst_QTemporaryFile::autoRemove()
{
// Test auto remove
@@ -358,6 +382,7 @@ void tst_QTemporaryFile::rename()
QVERIFY(file.rename("temporary-file.txt"));
QVERIFY(!dir.exists(tempname));
QVERIFY(dir.exists("temporary-file.txt"));
+ QCOMPARE(file.fileName(), QString("temporary-file.txt"));
}
QVERIFY(!dir.exists(tempname));
@@ -401,5 +426,18 @@ void tst_QTemporaryFile::renameFdLeak()
#endif
}
+void tst_QTemporaryFile::reOpenThroughQFile()
+{
+ QByteArray data("abcdefghij");
+
+ QTemporaryFile file;
+ QVERIFY(((QFile &)file).open(QIODevice::WriteOnly));
+ QCOMPARE(file.write(data), (qint64)data.size());
+
+ file.close();
+ QVERIFY(file.open());
+ QCOMPARE(file.readAll(), data);
+}
+
QTEST_MAIN(tst_QTemporaryFile)
#include "tst_qtemporaryfile.moc"
diff --git a/tests/auto/qtessellator/testtessellator.cpp b/tests/auto/qtessellator/testtessellator.cpp
index bd2795c..423c1e8 100644
--- a/tests/auto/qtessellator/testtessellator.cpp
+++ b/tests/auto/qtessellator/testtessellator.cpp
@@ -38,7 +38,7 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <testtessellator.h>
+#include "testtessellator.h"
#include <private/qtessellator_p.h>
#include "math.h"
diff --git a/tests/auto/qtessellator/tst_tessellator.cpp b/tests/auto/qtessellator/tst_tessellator.cpp
index 8958ac3..8899285 100644
--- a/tests/auto/qtessellator/tst_tessellator.cpp
+++ b/tests/auto/qtessellator/tst_tessellator.cpp
@@ -218,8 +218,8 @@ void tst_QTessellator::testArc()
const int stop = 1000;
#endif
for (int i = 0; i < stop; ++i) {
- mat.rotate(.01);
- mat.scale(.99, .99);
+ mat.rotate(qreal(.01));
+ mat.scale(qreal(.99), qreal(.99));
QPolygonF poly = arc.at(0);
QPolygonF vec = poly * mat;
QVERIFY(test_arc(vec, true));
@@ -361,11 +361,11 @@ void tst_QTessellator::testRects()
QVector<QPointF> v(5);
for (int i = 0; i < 5; ++i)
v[i] = vec[5 * rect + i];
- if (!test(v.data(), v.size(), false, test_tessellate_polygon_rect, 0.05)) {
+ if (!test(v.data(), v.size(), false, test_tessellate_polygon_rect, qreal(0.05))) {
simplifyTestFailure(v, false);
++failures;
}
- if (!test(v.data(), v.size(), true, test_tessellate_polygon_rect, 0.05)) {
+ if (!test(v.data(), v.size(), true, test_tessellate_polygon_rect, qreal(0.05))) {
simplifyTestFailure(v, true);
++failures;
}
diff --git a/tests/auto/qtessellator/utils.cpp b/tests/auto/qtessellator/utils.cpp
index 8a9dc1e..d408193 100644
--- a/tests/auto/qtessellator/utils.cpp
+++ b/tests/auto/qtessellator/utils.cpp
@@ -43,7 +43,7 @@
#include <assert.h>
#include <qglobal.h>
-#include <qnum.h>
+#include "qnum.h"
#define FloatToXFixed(i) (int)((i) * 65536)
#define IntToXFixed(i) ((i) << 16)
diff --git a/tests/auto/qthreadonce/tst_qthreadonce.cpp b/tests/auto/qthreadonce/tst_qthreadonce.cpp
index 7e67dc3..f20788a 100644
--- a/tests/auto/qthreadonce/tst_qthreadonce.cpp
+++ b/tests/auto/qthreadonce/tst_qthreadonce.cpp
@@ -46,7 +46,7 @@
#include <qmutex.h>
#include <qthread.h>
#include <qwaitcondition.h>
-#include <qthreadonce.h>
+#include "qthreadonce.h"
//TESTED_CLASS=
//TESTED_FILES=corelib/thread/qthreadonce.h corelib/thread/qthreadonce.cpp
diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp
index cde2765..694ea33 100644
--- a/tests/auto/qtimer/tst_qtimer.cpp
+++ b/tests/auto/qtimer/tst_qtimer.cpp
@@ -84,6 +84,8 @@ private slots:
void deleteLaterOnQTimer(); // long name, don't want to shadow QObject::deleteLater()
void moveToThread();
void restartedTimerFiresTooSoon();
+ void timerFiresOnlyOncePerProcessEvents_data();
+ void timerFiresOnlyOncePerProcessEvents();
};
class TimerHelper : public QObject
@@ -144,6 +146,13 @@ void tst_QTimer::singleShotTimeout()
QCOMPARE(helper.count, 1);
}
+#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
+// Increase wait as emulator startup can cause unexpected delays
+#define TIMEOUT_TIMEOUT 2000
+#else
+#define TIMEOUT_TIMEOUT 200
+#endif
+
void tst_QTimer::timeout()
{
TimerHelper helper;
@@ -154,11 +163,11 @@ void tst_QTimer::timeout()
QCOMPARE(helper.count, 0);
- QTest::qWait(200);
+ QTest::qWait(TIMEOUT_TIMEOUT);
QVERIFY(helper.count > 0);
int oldCount = helper.count;
- QTest::qWait(200);
+ QTest::qWait(TIMEOUT_TIMEOUT);
QVERIFY(helper.count > oldCount);
}
@@ -389,29 +398,38 @@ void tst_QTimer::deleteLaterOnQTimer()
QVERIFY(pointer.isNull());
}
+#if defined(Q_OS_SYMBIAN) && defined(Q_CC_NOKIAX86)
+// Increase wait as emulator startup can cause unexpected delays
+#define MOVETOTHREAD_TIMEOUT 200
+#define MOVETOTHREAD_WAIT 5000
+#else
+#define MOVETOTHREAD_TIMEOUT 200
+#define MOVETOTHREAD_WAIT 300
+#endif
+
void tst_QTimer::moveToThread()
{
QTimer ti1;
QTimer ti2;
- ti1.start(200);
- ti2.start(200);
+ ti1.start(MOVETOTHREAD_TIMEOUT);
+ ti2.start(MOVETOTHREAD_TIMEOUT);
QVERIFY((ti1.timerId() & 0xffffff) != (ti2.timerId() & 0xffffff));
QThread tr;
ti1.moveToThread(&tr);
connect(&ti1,SIGNAL(timeout()), &tr, SLOT(quit()));
tr.start();
QTimer ti3;
- ti3.start(200);
+ ti3.start(MOVETOTHREAD_TIMEOUT);
QVERIFY((ti3.timerId() & 0xffffff) != (ti2.timerId() & 0xffffff));
QVERIFY((ti3.timerId() & 0xffffff) != (ti1.timerId() & 0xffffff));
- QTest::qWait(300);
+ QTest::qWait(MOVETOTHREAD_WAIT);
QVERIFY(tr.wait());
ti2.stop();
QTimer ti4;
- ti4.start(200);
+ ti4.start(MOVETOTHREAD_TIMEOUT);
ti3.stop();
- ti2.start(200);
- ti3.start(200);
+ ti2.start(MOVETOTHREAD_TIMEOUT);
+ ti3.start(MOVETOTHREAD_TIMEOUT);
QVERIFY((ti4.timerId() & 0xffffff) != (ti2.timerId() & 0xffffff));
QVERIFY((ti3.timerId() & 0xffffff) != (ti2.timerId() & 0xffffff));
QVERIFY((ti3.timerId() & 0xffffff) != (ti1.timerId() & 0xffffff));
@@ -480,6 +498,55 @@ void tst_QTimer::restartedTimerFiresTooSoon()
QVERIFY(object.eventLoop.exec() == 0);
}
+class LongLastingSlotClass : public QObject
+{
+ Q_OBJECT
+
+public:
+ LongLastingSlotClass(QTimer *timer) : count(0), timer(timer) {}
+
+public slots:
+ void longLastingSlot()
+ {
+ // Don't use timers for this, because we are testing them.
+ QTime time;
+ time.start();
+ while (time.elapsed() < 200) {
+ for (int c = 0; c < 100000; c++) {} // Mindless looping.
+ }
+ if (++count >= 2) {
+ timer->stop();
+ }
+ }
+
+public:
+ int count;
+ QTimer *timer;
+};
+
+void tst_QTimer::timerFiresOnlyOncePerProcessEvents_data()
+{
+ QTest::addColumn<int>("interval");
+ QTest::newRow("zero timer") << 0;
+ QTest::newRow("non-zero timer") << 10;
+}
+
+void tst_QTimer::timerFiresOnlyOncePerProcessEvents()
+{
+ QFETCH(int, interval);
+
+ QTimer t;
+ LongLastingSlotClass longSlot(&t);
+ t.start(interval);
+ connect(&t, SIGNAL(timeout()), &longSlot, SLOT(longLastingSlot()));
+ // Loop because there may be other events pending.
+ while (longSlot.count == 0) {
+ QCoreApplication::processEvents(QEventLoop::WaitForMoreEvents);
+ }
+
+ QCOMPARE(longSlot.count, 1);
+}
+
QTEST_MAIN(tst_QTimer)
#include "tst_qtimer.moc"
-\
+
diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index 8a181c6..95dc12b 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -8441,6 +8441,7 @@ void tst_QWidget::translucentWidget()
ColorRedWidget label;
label.setFixedSize(16,16);
label.setAttribute(Qt::WA_TranslucentBackground);
+ label.move(qApp->desktop()->availableGeometry().topLeft());
label.show();
#ifdef Q_WS_X11
qt_x11_wait_for_window_manager(&label);
diff --git a/tests/auto/qxmlstream/XML-Test-Suite-LICENSE.txt b/tests/auto/qxmlstream/XML-Test-Suite-LICENSE.txt
new file mode 100644
index 0000000..bd84fae
--- /dev/null
+++ b/tests/auto/qxmlstream/XML-Test-Suite-LICENSE.txt
@@ -0,0 +1,59 @@
+The XML testsuite available here is a copy of the Extensible Markup
+Language (XML) Conformance Test Suites provided by W3C. Please see
+http://www.w3.org/XML/Test/ for updates and other information.
+
+These files are licensed under the W3C Software License (19980720),
+reproduced below:
+
+---
+W3C® SOFTWARE NOTICE AND LICENSE
+
+Copyright © 1994-2002 World Wide Web Consortium, (Massachusetts
+Institute of Technology, Institut National de Recherche en
+Informatique et en Automatique, Keio University). All Rights
+Reserved. http://www.w3.org/Consortium/Legal/
+
+This W3C work (including software, documents, or other related items)
+is being provided by the copyright holders under the following
+license. By obtaining, using and/or copying this work, you (the
+licensee) agree that you have read, understood, and will comply with
+the following terms and conditions:
+
+Permission to use, copy, modify, and distribute this software and its
+documentation, with or without modification, for any purpose and
+without fee or royalty is hereby granted, provided that you include
+the following on ALL copies of the software and documentation or
+portions thereof, including modifications, that you make:
+
+ 1. The full text of this NOTICE in a location viewable to users of
+ the redistributed or derivative work.
+
+ 2. Any pre-existing intellectual property disclaimers, notices, or
+ terms and conditions. If none exist, a short notice of the
+ following form (hypertext is preferred, text is permitted) should
+ be used within the body of any redistributed or derivative code:
+ "Copyright © [$date-of-software] World Wide Web Consortium,
+ (Massachusetts Institute of Technology, Institut National de
+ Recherche en Informatique et en Automatique, Keio University). All
+ Rights Reserved. http://www.w3.org/Consortium/Legal/"
+
+ 3. Notice of any changes or modifications to the W3C files, including
+ the date changes were made. (We recommend you provide URIs to the
+ location from which the code is derived.)
+
+THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT
+HOLDERS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED,
+INCLUDING BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS
+FOR ANY PARTICULAR PURPOSE OR THAT THE USE OF THE SOFTWARE OR
+DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
+TRADEMARKS OR OTHER RIGHTS.
+
+COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+DOCUMENTATION.
+
+The name and trademarks of copyright holders may NOT be used in
+advertising or publicity pertaining to the software without specific,
+written prior permission. Title to copyright in this software and any
+associated documentation will at all times remain with copyright
+holders.
diff --git a/tests/auto/uic/baseline/languagesdialog.ui.h b/tests/auto/uic/baseline/languagesdialog.ui.h
index a0b9cae..fbe57ca 100644
--- a/tests/auto/uic/baseline/languagesdialog.ui.h
+++ b/tests/auto/uic/baseline/languagesdialog.ui.h
@@ -1,8 +1,8 @@
/********************************************************************************
** Form generated from reading ui file 'languagesdialog.ui'
**
-** Created: Mon Jun 16 17:57:32 2008
-** by: Qt User Interface Compiler version 4.5.0
+** Created: Fri May 15 16:58:03 2009
+** by: Qt User Interface Compiler version 4.5.2
**
** WARNING! All changes made in this file will be lost when recompiling ui file!
********************************************************************************/
@@ -57,7 +57,7 @@ public:
upButton->setObjectName(QString::fromUtf8("upButton"));
upButton->setEnabled(false);
QIcon icon;
- icon.addPixmap(QPixmap(QString::fromUtf8(":/images/up.png")), QIcon::Normal, QIcon::Off);
+ icon.addFile(QString::fromUtf8(":/images/up.png"), QSize(), QIcon::Normal, QIcon::Off);
upButton->setIcon(icon);
hboxLayout->addWidget(upButton);
@@ -66,7 +66,7 @@ public:
downButton->setObjectName(QString::fromUtf8("downButton"));
downButton->setEnabled(false);
QIcon icon1;
- icon1.addPixmap(QPixmap(QString::fromUtf8(":/images/down.png")), QIcon::Normal, QIcon::Off);
+ icon1.addFile(QString::fromUtf8(":/images/down.png"), QSize(), QIcon::Normal, QIcon::Off);
downButton->setIcon(icon1);
hboxLayout->addWidget(downButton);
@@ -75,7 +75,7 @@ public:
removeButton->setObjectName(QString::fromUtf8("removeButton"));
removeButton->setEnabled(false);
QIcon icon2;
- icon2.addPixmap(QPixmap(QString::fromUtf8(":/images/editdelete.png")), QIcon::Normal, QIcon::Off);
+ icon2.addFile(QString::fromUtf8(":/images/editdelete.png"), QSize(), QIcon::Normal, QIcon::Off);
removeButton->setIcon(icon2);
hboxLayout->addWidget(removeButton);
@@ -84,7 +84,7 @@ public:
openFileButton->setObjectName(QString::fromUtf8("openFileButton"));
openFileButton->setEnabled(true);
QIcon icon3;
- icon3.addPixmap(QPixmap(QString::fromUtf8(":/images/mac/fileopen.png")), QIcon::Normal, QIcon::Off);
+ icon3.addFile(QString::fromUtf8(":/images/mac/fileopen.png"), QSize(), QIcon::Normal, QIcon::Off);
openFileButton->setIcon(icon3);
hboxLayout->addWidget(openFileButton);
diff --git a/tests/auto/utf8/tst_utf8.cpp b/tests/auto/utf8/tst_utf8.cpp
new file mode 100644
index 0000000..e21e5a3
--- /dev/null
+++ b/tests/auto/utf8/tst_utf8.cpp
@@ -0,0 +1,309 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the either Technology Preview License Agreement or the
+** Beta Release License Agreement.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Nokia gives you certain
+** additional rights. These rights are described in the Nokia Qt LGPL
+** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
+** package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+** If you are unsure which license is appropriate for your use, please
+** contact the sales department at qt-sales@nokia.com.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <QtTest/QtTest>
+
+#include <qtextcodec.h>
+#include <qsharedpointer.h>
+
+//TESTED_CLASS=
+//TESTED_FILES=
+
+static const char utf8bom[] = "\xEF\xBB\xBF";
+
+class tst_Utf8 : public QObject
+{
+ Q_OBJECT
+
+public:
+ // test data:
+ QTextCodec *codec;
+ QString (*from8BitPtr)(const char *, int);
+ QByteArray (QString:: *to8Bit)() const;
+
+ inline QString from8Bit(const QByteArray &ba)
+ { return from8BitPtr(ba.constData(), ba.length()); }
+public slots:
+ void initTestCase();
+ void init();
+
+private slots:
+ void roundTrip_data();
+ void roundTrip();
+
+ void charByChar_data();
+ void charByChar();
+
+ void invalidUtf8_data();
+ void invalidUtf8();
+};
+
+void tst_Utf8::initTestCase()
+{
+ QTest::addColumn<bool>("useLocale");
+ QTest::newRow("utf8codec") << false;
+
+ // is the locale UTF-8?
+ if (QString(QChar(QChar::ReplacementCharacter)).toLocal8Bit() == "\xEF\xBF\xBD") {
+ QTest::newRow("localecodec") << true;
+ qDebug() << "locale is utf8";
+ }
+}
+
+void tst_Utf8::init()
+{
+ QFETCH_GLOBAL(bool, useLocale);
+ if (useLocale) {
+ codec = QTextCodec::codecForLocale();
+ from8BitPtr = &QString::fromLocal8Bit;
+ to8Bit = &QString::toLocal8Bit;
+ } else {
+ codec = QTextCodec::codecForMib(106);
+ from8BitPtr = &QString::fromUtf8;
+ to8Bit = &QString::toUtf8;
+ }
+}
+
+void tst_Utf8::roundTrip_data()
+{
+ QTest::addColumn<QByteArray>("utf8");
+ QTest::addColumn<QString>("utf16");
+
+ QTest::newRow("empty") << QByteArray() << QString();
+ QTest::newRow("nul") << QByteArray("", 1) << QString(QChar(QChar::Null));
+
+ static const char ascii[] = "This is a standard US-ASCII message";
+ QTest::newRow("ascii") << QByteArray(ascii) << ascii;
+
+ static const char ascii2[] = "\1This\2is\3an\4US-ASCII\020 message interspersed with control chars";
+ QTest::newRow("ascii2") << QByteArray(ascii2) << ascii2;
+
+ static const char utf8_1[] = "\302\240"; // NBSP
+ QTest::newRow("utf8_1") << QByteArray(utf8_1) << QString(QChar(QChar::Nbsp));
+
+ static const char utf8_2[] = "\342\202\254"; // Euro symbol
+ QTest::newRow("utf8_2") << QByteArray(utf8_2) << QString(QChar(0x20AC));
+
+#if 0
+ // Can't test this because QString::fromUtf8 consumes it
+ static const char utf8_3[] = "\357\273\277"; // byte order mark
+ QTest::newRow("utf8_3") << QByteArray(utf8_3) << QString(QChar(QChar::ByteOrderMark));
+#endif
+
+ static const char utf8_4[] = "\357\277\275"; // replacement char
+ QTest::newRow("utf8_4") << QByteArray(utf8_4) << QString(QChar(QChar::ReplacementCharacter));
+
+ static const char utf8_5[] = "\360\220\210\203"; // U+010203
+ static const uint utf32_5[] = { 0x010203 };
+ QTest::newRow("utf8_5") << QByteArray(utf8_5) << QString::fromUcs4(utf32_5, 1);
+
+ static const char utf8_6[] = "\364\217\277\277"; // U+10FFFF
+ static const uint utf32_6[] = { 0x10FFFF };
+ QTest::newRow("utf8_6") << QByteArray(utf8_6) << QString::fromUcs4(utf32_6, 1);
+
+ static const char utf8_7[] = "abc\302\240\303\241\303\251\307\275 \342\202\254def";
+ static const ushort utf16_7[] = { 'a', 'b', 'c', 0x00A0,
+ 0x00E1, 0x00E9, 0x01FD,
+ ' ', 0x20AC, 'd', 'e', 'f', 0 };
+ QTest::newRow("utf8_7") << QByteArray(utf8_7) << QString::fromUtf16(utf16_7);
+
+ static const char utf8_8[] = "abc\302\240\303\241\303\251\307\275 \364\217\277\277 \342\202\254def";
+ static const uint utf32_8[] = { 'a', 'b', 'c', 0x00A0,
+ 0x00E1, 0x00E9, 0x01FD,
+ ' ', 0x10FFFF, ' ',
+ 0x20AC, 'd', 'e', 'f', 0 };
+ QTest::newRow("utf8_8") << QByteArray(utf8_8) << QString::fromUcs4(utf32_8);
+}
+
+void tst_Utf8::roundTrip()
+{
+ QFETCH(QByteArray, utf8);
+ QFETCH(QString, utf16);
+
+ QCOMPARE((utf16.*to8Bit)(), utf8);
+ QCOMPARE(from8Bit(utf8), utf16);
+
+ QCOMPARE((from8Bit(utf8).*to8Bit)(), utf8);
+ QCOMPARE(from8Bit((utf16.*to8Bit)()), utf16);
+}
+
+void tst_Utf8::charByChar_data()
+{
+ roundTrip_data();
+}
+
+void tst_Utf8::charByChar()
+{
+ QFETCH(QByteArray, utf8);
+ QFETCH(QString, utf16);
+
+ {
+ // from utf16 to utf8 char by char:
+ QSharedPointer<QTextEncoder> encoder = QSharedPointer<QTextEncoder>(codec->makeEncoder());
+ QByteArray encoded;
+
+ for (int i = 0; i < utf16.length(); ++i) {
+ encoded += encoder->fromUnicode(utf16.constData() + i, 1);
+ QVERIFY(!encoder->hasFailure());
+ }
+
+ if (encoded.startsWith(utf8bom))
+ encoded = encoded.mid(strlen(utf8bom));
+ QCOMPARE(encoded, utf8);
+ }
+ {
+ // from utf8 to utf16 char by char:
+ QSharedPointer<QTextDecoder> decoder = QSharedPointer<QTextDecoder>(codec->makeDecoder());
+ QString decoded;
+
+ for (int i = 0; i < utf8.length(); ++i) {
+ decoded += decoder->toUnicode(utf8.constData() + i, 1);
+ QVERIFY(!decoder->hasFailure());
+ }
+
+ QCOMPARE(decoded, utf16);
+ }
+}
+
+void tst_Utf8::invalidUtf8_data()
+{
+ QTest::addColumn<QByteArray>("utf8");
+
+ QTest::newRow("1char") << QByteArray("\x80");
+ QTest::newRow("2chars") << QByteArray("\xC2\xC0");
+ QTest::newRow("3chars-1") << QByteArray("\xE0\xA0\xC0");
+ QTest::newRow("3chars-2") << QByteArray("\xE0\xC0\xA0");
+ QTest::newRow("4chars-1") << QByteArray("\xF0\x90\x80\xC0");
+ QTest::newRow("4chars-2") << QByteArray("\xF0\x90\xC0\x80");
+ QTest::newRow("4chars-3") << QByteArray("\xF0\xC0\x80\x80");
+
+ // U+FFFE and U+FFFF are non-characters and must not be present
+ // U+FFFE: 1111 11 1111 11 1110
+ // encoding: xxxz:1111 xz11:1111 xz11:1110
+ QTest::newRow("fffe") << QByteArray("\xEF\xBF\xBE");
+ // U+FFFF: 1111 11 1111 11 1111
+ // encoding: xxxz:1111 xz11:1111 xz11:1111
+ QTest::newRow("ffff") << QByteArray("\xEF\xBF\xBF");
+
+ // Surrogate pairs must now be present either
+ // U+D800: 1101 10 0000 00 0000
+ // encoding: xxxz:1101 xz10:0000 xz00:0000
+ QTest::newRow("hi-surrogate") << QByteArray("\xED\xA0\x80");
+ // U+DC00: 1101 11 0000 00 0000
+ // encoding: xxxz:1101 xz11:0000 xz00:0000
+ QTest::newRow("lo-surrogate") << QByteArray("\xED\xB0\x80");
+
+ // not even in pair:
+ QTest::newRow("surrogate-pair") << QByteArray("\xED\xA0\x80\xED\xB0\x80");
+
+ // Characters outside the Unicode range:
+ // 0x110000: 00 0100 01 0000 00 0000 00 0000
+ // encoding: xxxx:z100 xz01:0000 xz00:0000 xz00:0000
+ QTest::newRow("non-unicode-1") << QByteArray("\xF4\x90\x80\x80");
+ // 0x200000: 00 1000 00 0000 00 0000 00 0000
+ // encoding: xxxx:xz00 xz00:1000 xz00:0000 xz00:0000 xz00:0000
+ QTest::newRow("non-unicode-2") << QByteArray("\xF8\x88\x80\x80\x80");
+ // 0x04000000: 0100 00 0000 00 0000 00 0000 00 0000
+ // encoding: xxxx:xxz0 xz00:0100 xz00:0000 xz00:0000 xz00:0001 xz00:0001
+ QTest::newRow("non-unicode-3") << QByteArray("\xFC\x84\x80\x80\x80\x80");
+ // 0x7fffffff: 1 11 1111 11 1111 11 1111 11 1111 11 1111
+ // encoding: xxxx:xxz0 xz00:0100 xz00:0000 xz00:0000 xz00:0001 xz00:0001
+ QTest::newRow("non-unicode-3") << QByteArray("\xFD\xBF\xBF\xBF\xBF\xBF");
+
+ // As seen above, 0xFE and 0xFF never appear:
+ QTest::newRow("fe") << QByteArray("\xFE");
+ QTest::newRow("fe-bis") << QByteArray("\xFE\xBF\xBF\xBF\xBF\xBF\xBF");
+ QTest::newRow("ff") << QByteArray("\xFF");
+ QTest::newRow("ff-bis") << QByteArray("\xFF\xBF\xBF\xBF\xBF\xBF\xBF\xBF");
+
+ // some combinations in UTF-8 are invalid even though they have the proper bits set
+ // these are known as overlong sequences
+
+ // "A": U+0041: 01 00 0001
+ // overlong 2: xxz0:0001 xz00:0001
+ QTest::newRow("overlong-1-2") << QByteArray("\xC1\x81");
+ // overlong 3: xxxz:0000 xz00:0001 xz00:0001
+ QTest::newRow("overlong-1-3") << QByteArray("\xE0\x81\x81");
+ // overlong 4: xxxx:z000 xz00:0000 xz00:0001 xz00:0001
+ QTest::newRow("overlong-1-4") << QByteArray("\xF0\x80\x81\x81");
+ // overlong 5: xxxx:xz00 xz00:0000 xz00:0000 xz00:0001 xz00:0001
+ QTest::newRow("overlong-1-5") << QByteArray("\xF8\x80\x80\x81\x81");
+ // overlong 6: xxxx:xxz0 xz00:0000 xz00:0000 xz00:0000 xz00:0001 xz00:0001
+ QTest::newRow("overlong-1-6") << QByteArray("\xFC\x80\x80\x80\x81\x81");
+
+ // NBSP: U+00A0: 10 00 0000
+ // proper encoding: xxz0:0010 xz00:0000
+ // overlong 3: xxxz:0000 xz00:0010 xz00:0000
+ QTest::newRow("overlong-2-3") << QByteArray("\xC0\x82\x80");
+ // overlong 4: xxxx:z000 xz00:0000 xz00:0010 xz00:0000
+ QTest::newRow("overlong-2-4") << QByteArray("\xF0\x80\x82\x80");
+ // overlong 5: xxxx:xz00 xz00:0000 xz00:0000 xz00:0010 xz00:0000
+ QTest::newRow("overlong-2-4") << QByteArray("\xF8\x80\x80\x82\x80");
+ // overlong 6: xxxx:xxz0 xz00:0000 xz00:0000 xz00:0000 xz00:0010 xz00:0000
+ QTest::newRow("overlong-2-4") << QByteArray("\xFC\x80\x80\x80\x82\x80");
+
+ // U+0800: 10 0000 00 0000
+ // proper encoding: xxxz:0000 xz10:0000 xz00:0000
+ // overlong 4: xxxx:z000 xz00:0000 xz10:0000 xz00:0000
+ QTest::newRow("overlong-3-4") << QByteArray("\xF0\x80\xA0\x80");
+ // overlong 5: xxxx:xz00 xz00:0000 xz00:0000 xz10:0000 xz00:0000
+ QTest::newRow("overlong-3-5") << QByteArray("\xF8\x80\x80\xA0\x80");
+ // overlong 6: xxxx:xxz0 xz00:0000 xz00:0000 xz00:0000 xz10:0000 xz00:0000
+ QTest::newRow("overlong-3-6") << QByteArray("\xFC\x80\x80\x80\xA0\x80");
+
+ // U+010000: 00 0100 00 0000 00 0000
+ // proper encoding: xxxx:z000 xz00:0100 xz00:0000 xz00:0000
+ // overlong 5: xxxx:xz00 xz00:0000 xz00:0100 xz00:0000 xz00:0000
+ QTest::newRow("overlong-4-5") << QByteArray("\xF8\x80\x84\x80\x80");
+ // overlong 6: xxxx:xxz0 xz00:0000 xz00:0000 xz00:0100 xz00:0000 xz00:0000
+ QTest::newRow("overlong-4-6") << QByteArray("\xFC\x80\x80\x84\x80\x80");
+}
+
+void tst_Utf8::invalidUtf8()
+{
+ QFETCH(QByteArray, utf8);
+
+ QSharedPointer<QTextDecoder> decoder = QSharedPointer<QTextDecoder>(codec->makeDecoder());
+ QString decoded = decoder->toUnicode(utf8);
+ QVERIFY(decoder->hasFailure());
+}
+
+QTEST_MAIN(tst_Utf8)
+#include "tst_utf8.moc"
diff --git a/tests/auto/utf8/utf8.pro b/tests/auto/utf8/utf8.pro
new file mode 100644
index 0000000..4ec6851
--- /dev/null
+++ b/tests/auto/utf8/utf8.pro
@@ -0,0 +1,3 @@
+load(qttest_p4)
+QT -= gui
+SOURCES += tst_utf8.cpp
diff --git a/tests/benchmarks/qiodevice/main.cpp b/tests/benchmarks/qiodevice/main.cpp
index fa41f1c..5c459a8 100755
--- a/tests/benchmarks/qiodevice/main.cpp
+++ b/tests/benchmarks/qiodevice/main.cpp
@@ -66,8 +66,10 @@ void tst_qiodevice::read_data()
QTest::newRow("100k") << qint64(100 * 1024);
QTest::newRow("1000k") << qint64(1000 * 1024);
QTest::newRow("10000k") << qint64(10000 * 1024);
+#ifndef Q_OS_SYMBIAN // Symbian devices don't (yet) have enough available RAM to run these
QTest::newRow("100000k") << qint64(100000 * 1024);
QTest::newRow("1000000k") << qint64(1000000 * 1024);
+#endif
}
void tst_qiodevice::read_old()
diff --git a/tests/benchmarks/qiodevice/qiodevice.pro b/tests/benchmarks/qiodevice/qiodevice.pro
index 59b6302..749a4d6 100755
--- a/tests/benchmarks/qiodevice/qiodevice.pro
+++ b/tests/benchmarks/qiodevice/qiodevice.pro
@@ -1,6 +1,7 @@
load(qttest_p4)
TEMPLATE = app
TARGET = tst_qiodevice
+TARGET.EPOCHEAPSIZE = 0x100000 0x2000000
DEPENDPATH += .
INCLUDEPATH += .
diff --git a/tools/assistant/tools/assistant/assistant.qch b/tools/assistant/tools/assistant/assistant.qch
index 64763f7..99687ed 100644
--- a/tools/assistant/tools/assistant/assistant.qch
+++ b/tools/assistant/tools/assistant/assistant.qch
Binary files differ
diff --git a/tools/assistant/tools/assistant/bookmarkmanager.cpp b/tools/assistant/tools/assistant/bookmarkmanager.cpp
index 6f5732f..66475a4 100644
--- a/tools/assistant/tools/assistant/bookmarkmanager.cpp
+++ b/tools/assistant/tools/assistant/bookmarkmanager.cpp
@@ -536,58 +536,57 @@ void BookmarkWidget::focusInEvent(QFocusEvent *e)
bool BookmarkWidget::eventFilter(QObject *object, QEvent *e)
{
- if (object == this && e->type() == QEvent::KeyPress) {
- QKeyEvent *ke = static_cast<QKeyEvent*>(e);
+ if ((object == this) || (object == treeView->viewport())) {
QModelIndex index = treeView->currentIndex();
- switch (ke->key()) {
+ if (e->type() == QEvent::KeyPress) {
+ QKeyEvent *ke = static_cast<QKeyEvent*>(e);
if (index.isValid() && searchField->text().isEmpty()) {
- case Qt::Key_F2: {
- const QModelIndex& source = filterBookmarkModel->mapToSource(index);
- QStandardItem *item =
- bookmarkManager->treeBookmarkModel()->itemFromIndex(source);
+ if (ke->key() == Qt::Key_F2) {
+ QStandardItem *item = bookmarkManager->treeBookmarkModel()
+ ->itemFromIndex(filterBookmarkModel->mapToSource(index));
if (item) {
item->setEditable(true);
treeView->edit(index);
item->setEditable(false);
}
- } break;
-
- case Qt::Key_Delete: {
+ } else if (ke->key() == Qt::Key_Delete) {
bookmarkManager->removeBookmarkItem(treeView,
filterBookmarkModel->mapToSource(index));
- } break;
+ }
}
- case Qt::Key_Up:
- case Qt::Key_Down:
- treeView->subclassKeyPressEvent(ke);
- break;
-
- case Qt::Key_Enter: {
- case Qt::Key_Return:
- index = treeView->selectionModel()->currentIndex();
- if (index.isValid()) {
- QString data = index.data(Qt::UserRole + 10).toString();
- if (!data.isEmpty() && data != QLatin1String("Folder"))
- emit requestShowLink(data);
- }
- } break;
+ switch (ke->key()) {
+ default: break;
+ case Qt::Key_Up: {
+ case Qt::Key_Down:
+ treeView->subclassKeyPressEvent(ke);
+ } break;
- case Qt::Key_Escape:
- emit escapePressed();
- break;
+ case Qt::Key_Enter: {
+ case Qt::Key_Return:
+ index = treeView->selectionModel()->currentIndex();
+ if (index.isValid()) {
+ QString data = index.data(Qt::UserRole + 10).toString();
+ if (!data.isEmpty() && data != QLatin1String("Folder"))
+ emit requestShowLink(data);
+ }
+ } break;
- default:
- break;
- }
- }
- else if (object == treeView->viewport() && e->type() == QEvent::MouseButtonRelease) {
- const QModelIndex& index = treeView->currentIndex();
- QMouseEvent *me = static_cast<QMouseEvent*>(e);
- if (index.isValid() && (me->button() == Qt::MidButton)) {
- QString data = index.data(Qt::UserRole + 10).toString();
- if (!data.isEmpty() && data != QLatin1String("Folder"))
- CentralWidget::instance()->setSourceInNewTab(data);
+ case Qt::Key_Escape: {
+ emit escapePressed();
+ } break;
+ }
+ } else if (e->type() == QEvent::MouseButtonRelease) {
+ if (index.isValid()) {
+ QMouseEvent *me = static_cast<QMouseEvent*>(e);
+ bool controlPressed = me->modifiers() & Qt::ControlModifier;
+ if(((me->button() == Qt::LeftButton) && controlPressed)
+ || (me->button() == Qt::MidButton)) {
+ QString data = index.data(Qt::UserRole + 10).toString();
+ if (!data.isEmpty() && data != QLatin1String("Folder"))
+ CentralWidget::instance()->setSourceInNewTab(data);
+ }
+ }
}
}
return QWidget::eventFilter(object, e);
diff --git a/tools/assistant/tools/assistant/contentwindow.cpp b/tools/assistant/tools/assistant/contentwindow.cpp
index 89060bd..9f39de5 100644
--- a/tools/assistant/tools/assistant/contentwindow.cpp
+++ b/tools/assistant/tools/assistant/contentwindow.cpp
@@ -124,10 +124,10 @@ bool ContentWindow::eventFilter(QObject *o, QEvent *e)
QModelIndex index = m_contentWidget->indexAt(me->pos());
QItemSelectionModel *sm = m_contentWidget->selectionModel();
+ Qt::MouseButtons button = me->button();
if (index.isValid() && (sm && sm->isSelected(index))) {
- if (me->button() == Qt::LeftButton) {
- itemClicked(index);
- } else if (me->button() == Qt::MidButton) {
+ if ((button == Qt::LeftButton && (me->modifiers() & Qt::ControlModifier))
+ || (button == Qt::MidButton)) {
QHelpContentModel *contentModel =
qobject_cast<QHelpContentModel*>(m_contentWidget->model());
if (contentModel) {
@@ -135,12 +135,15 @@ bool ContentWindow::eventFilter(QObject *o, QEvent *e)
if (itm && !isPdfFile(itm))
CentralWidget::instance()->setSourceInNewTab(itm->url());
}
+ } else if (button == Qt::LeftButton) {
+ itemClicked(index);
}
}
}
return QWidget::eventFilter(o, e);
}
+
void ContentWindow::showContextMenu(const QPoint &pos)
{
if (!m_contentWidget->indexAt(pos).isValid())
diff --git a/tools/assistant/tools/assistant/indexwindow.cpp b/tools/assistant/tools/assistant/indexwindow.cpp
index a2c0950..1117ae0 100644
--- a/tools/assistant/tools/assistant/indexwindow.cpp
+++ b/tools/assistant/tools/assistant/indexwindow.cpp
@@ -146,8 +146,13 @@ bool IndexWindow::eventFilter(QObject *obj, QEvent *e)
&& e->type() == QEvent::MouseButtonRelease) {
QMouseEvent *mouseEvent = static_cast<QMouseEvent*>(e);
QModelIndex idx = m_indexWidget->indexAt(mouseEvent->pos());
- if (idx.isValid() && mouseEvent->button()==Qt::MidButton)
- open(m_indexWidget, idx);
+ if (idx.isValid()) {
+ Qt::MouseButtons button = mouseEvent->button();
+ if (((button == Qt::LeftButton) && (mouseEvent->modifiers() & Qt::ControlModifier))
+ || (button == Qt::MidButton)) {
+ open(m_indexWidget, idx);
+ }
+ }
}
#ifdef Q_OS_MAC
else if (obj == m_indexWidget && e->type() == QEvent::KeyPress) {
diff --git a/tools/assistant/tools/assistant/mainwindow.cpp b/tools/assistant/tools/assistant/mainwindow.cpp
index b0c2c6b..582eef3 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -926,25 +926,27 @@ void MainWindow::expandTOC(int depth)
void MainWindow::indexingStarted()
{
- m_progressWidget = new QWidget();
- QLayout* hlayout = new QHBoxLayout(m_progressWidget);
+ if (!m_progressWidget) {
+ m_progressWidget = new QWidget();
+ QLayout* hlayout = new QHBoxLayout(m_progressWidget);
- QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
+ QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Maximum);
- QLabel *label = new QLabel(tr("Updating search index"));
- label->setSizePolicy(sizePolicy);
- hlayout->addWidget(label);
+ QLabel *label = new QLabel(tr("Updating search index"));
+ label->setSizePolicy(sizePolicy);
+ hlayout->addWidget(label);
- QProgressBar *progressBar = new QProgressBar();
- progressBar->setRange(0, 0);
- progressBar->setTextVisible(false);
- progressBar->setSizePolicy(sizePolicy);
+ QProgressBar *progressBar = new QProgressBar();
+ progressBar->setRange(0, 0);
+ progressBar->setTextVisible(false);
+ progressBar->setSizePolicy(sizePolicy);
- hlayout->setSpacing(6);
- hlayout->setMargin(0);
- hlayout->addWidget(progressBar);
+ hlayout->setSpacing(6);
+ hlayout->setMargin(0);
+ hlayout->addWidget(progressBar);
- statusBar()->addPermanentWidget(m_progressWidget);
+ statusBar()->addPermanentWidget(m_progressWidget);
+ }
}
void MainWindow::indexingFinished()
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 70413e1..a879e5d 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -353,6 +353,7 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "QMAKESPEC" ] = tmp;
dictionary[ "INCREDIBUILD_XGE" ] = "auto";
+ dictionary[ "LTCG" ] = "no";
}
Configure::~Configure()
@@ -489,6 +490,12 @@ void Configure::parseCmdLine()
else if( configCmdLine.at(i) == "-commercial" ) {
dictionary[ "BUILDTYPE" ] = "commercial";
}
+ else if( configCmdLine.at(i) == "-ltcg" ) {
+ dictionary[ "LTCG" ] = "yes";
+ }
+ else if( configCmdLine.at(i) == "-no-ltcg" ) {
+ dictionary[ "LTCG" ] = "no";
+ }
#endif
else if( configCmdLine.at(i) == "-platform" ) {
@@ -1560,6 +1567,9 @@ bool Configure::displayHelp()
desc("SHARED", "yes", "-shared", "Create and use shared Qt libraries.");
desc("SHARED", "no", "-static", "Create and use static Qt libraries.\n");
+ desc("LTCG", "yes", "-ltcg", "Use Link Time Code Generation. (Release builds only)");
+ desc("LTCG", "no", "-no-ltcg", "Do not use Link Time Code Generation.\n");
+
desc("FAST", "no", "-no-fast", "Configure Qt normally by generating Makefiles for all project files.");
desc("FAST", "yes", "-fast", "Configure Qt quickly by generating Makefiles only for library and "
"subdirectory targets. All other Makefiles are created as wrappers "
@@ -1876,14 +1886,14 @@ bool Configure::checkAvailability(const QString &part)
else if (part == "SQL_DB2")
available = findFile("sqlcli.h") && findFile("sqlcli1.h") && findFile("db2cli.lib");
else if (part == "SQL_SQLITE")
- if (dictionary["XQMAKESPEC"].startsWith("symbian"))
+ if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian"))
available = false; // In Symbian we only support system sqlite option
else
available = true; // Built in, we have a fork
else if (part == "SQL_SQLITE_LIB") {
if (dictionary[ "SQL_SQLITE_LIB" ] == "system") {
// Symbian has multiple .lib/.dll files we need to find
- if (dictionary["XQMAKESPEC"].startsWith("symbian")) {
+ if (dictionary.contains("XQMAKESPEC") && dictionary["XQMAKESPEC"].startsWith("symbian")) {
available = true; // There is sqlite_symbian plugin which exports the necessary stuff
dictionary[ "QT_LFLAGS_SQLITE" ] += "-lsqlite3";
} else {
@@ -2628,6 +2638,8 @@ void Configure::generateCachefile()
else
configStream << " static";
+ if( dictionary[ "LTCG" ] == "yes" )
+ configStream << " ltcg";
if( dictionary[ "STL" ] == "yes" )
configStream << " stl";
if ( dictionary[ "EXCEPTIONS" ] == "yes" )
@@ -3071,6 +3083,7 @@ void Configure::displayConfig()
cout << "Architecture................" << dictionary[ "ARCHITECTURE" ] << endl;
cout << "Maketool...................." << dictionary[ "MAKE" ] << endl;
cout << "Debug symbols..............." << (dictionary[ "BUILD" ] == "debug" ? "yes" : "no") << endl;
+ cout << "Link Time Code Generation..." << dictionary[ "LTCG" ] << endl;
cout << "Accessibility support......." << dictionary[ "ACCESSIBILITY" ] << endl;
cout << "STL support................." << dictionary[ "STL" ] << endl;
cout << "Exception support..........." << dictionary[ "EXCEPTIONS" ] << endl;
diff --git a/tools/designer/src/components/formeditor/formwindow_widgetstack.cpp b/tools/designer/src/components/formeditor/formwindow_widgetstack.cpp
index 7270628..58127b0 100644
--- a/tools/designer/src/components/formeditor/formwindow_widgetstack.cpp
+++ b/tools/designer/src/components/formeditor/formwindow_widgetstack.cpp
@@ -57,16 +57,20 @@ using namespace qdesigner_internal;
FormWindowWidgetStack::FormWindowWidgetStack(QObject *parent) :
QObject(parent),
m_formContainer(new QWidget),
- m_formContainerLayout(new QVBoxLayout),
+ m_formContainerLayout(new QStackedLayout),
m_layout(new QStackedLayout)
{
m_layout->setMargin(0);
m_layout->setSpacing(0);
m_layout->setStackingMode(QStackedLayout::StackAll);
+ // We choose a QStackedLayout as immediate layout for
+ // the form windows as it ignores the sizePolicy of
+ // its child (for example, Fixed would cause undesired side effects).
m_formContainerLayout->setMargin(0);
m_formContainer->setObjectName(QLatin1String("formContainer"));
m_formContainer->setLayout(m_formContainerLayout);
+ m_formContainerLayout->setStackingMode(QStackedLayout::StackAll);
// System settings might have different background colors, autofill them
// (affects for example mainwindow status bars)
m_formContainer->setAutoFillBackground(true);
diff --git a/tools/designer/src/components/formeditor/formwindow_widgetstack.h b/tools/designer/src/components/formeditor/formwindow_widgetstack.h
index 92323c5..f21c4f0 100644
--- a/tools/designer/src/components/formeditor/formwindow_widgetstack.h
+++ b/tools/designer/src/components/formeditor/formwindow_widgetstack.h
@@ -51,7 +51,6 @@ QT_BEGIN_NAMESPACE
class QDesignerFormWindowToolInterface;
class QStackedLayout;
-class QVBoxLayout;
class QWidget;
namespace qdesigner_internal {
@@ -92,7 +91,7 @@ protected:
private:
QList<QDesignerFormWindowToolInterface*> m_tools;
QWidget *m_formContainer;
- QVBoxLayout *m_formContainerLayout;
+ QStackedLayout *m_formContainerLayout;
QStackedLayout *m_layout;
};
diff --git a/tools/designer/src/lib/shared/formwindowbase.cpp b/tools/designer/src/lib/shared/formwindowbase.cpp
index 3e7e17b..b569b51 100644
--- a/tools/designer/src/lib/shared/formwindowbase.cpp
+++ b/tools/designer/src/lib/shared/formwindowbase.cpp
@@ -55,7 +55,7 @@ TRANSLATOR qdesigner_internal::FormWindowBase
#include "deviceprofile_p.h"
#include "qdesigner_utils_p.h"
-#include <abstractformbuilder.h>
+#include "qsimpleresource_p.h"
#include <QtDesigner/QDesignerFormEditorInterface>
#include <QtDesigner/QDesignerContainerExtension>
@@ -482,6 +482,14 @@ void FormWindowBase::setupDefaultAction(QDesignerFormWindowInterface *fw)
QObject::connect(fw, SIGNAL(activated(QWidget*)), fw, SLOT(triggerDefaultAction(QWidget*)));
}
+QString FormWindowBase::fileContents() const
+{
+ const bool oldValue = QSimpleResource::setWarningsEnabled(false);
+ const QString rc = contents();
+ QSimpleResource::setWarningsEnabled(oldValue);
+ return rc;
+}
+
} // namespace qdesigner_internal
QT_END_NAMESPACE
diff --git a/tools/designer/src/lib/shared/formwindowbase_p.h b/tools/designer/src/lib/shared/formwindowbase_p.h
index 68e977e..0891f6e 100644
--- a/tools/designer/src/lib/shared/formwindowbase_p.h
+++ b/tools/designer/src/lib/shared/formwindowbase_p.h
@@ -90,6 +90,9 @@ public:
QVariantMap formData();
void setFormData(const QVariantMap &vm);
+ // Return contents without warnings. Should be 'contents(bool quiet)'
+ QString fileContents() const;
+
// Return the widget containing the form. This is used to
// apply embedded design settings to that are inherited (for example font).
// These are meant to be applied to the form only and not to the other editors
diff --git a/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp b/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp
index ff3b50b..94e8044 100644
--- a/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp
+++ b/tools/designer/src/lib/shared/qdesigner_propertycommand.cpp
@@ -316,6 +316,10 @@ Qt::Alignment variantToAlignment(const QVariant & q)
// find changed subproperties of a variant
unsigned compareSubProperties(const QVariant & q1, const QVariant & q2, qdesigner_internal::SpecialProperty specialProperty)
{
+ // Do not clobber new value in the comparison function in
+ // case someone sets a QString on a PropertySheetStringValue.
+ if (q1.type() != q2.type())
+ return SubPropertyAll;
switch (q1.type()) {
case QVariant::Rect:
return compareSubProperties(q1.toRect(), q2.toRect());
diff --git a/tools/designer/src/uitools/quiloader.cpp b/tools/designer/src/uitools/quiloader.cpp
index 67bd29c..2a66095 100644
--- a/tools/designer/src/uitools/quiloader.cpp
+++ b/tools/designer/src/uitools/quiloader.cpp
@@ -572,53 +572,52 @@ void QUiLoaderPrivate::setupWidgetMap() const
\class QUiLoader
\inmodule QtUiTools
- \brief The QUiLoader class allows standalone applications dynamically
- create user interfaces at run-time using the information stored in
- .ui files or specified plugin paths.
+ \brief The QUiLoader class enables standalone applications to
+ dynamically create user interfaces at run-time using the
+ information stored in .ui files or specified in plugin paths.
- In addition, you can customize of creating an user interface by
+ In addition, you can customize or create your own user interface by
deriving your own loader class.
- If you have a custom component or an application that embeds Qt
- Designer, you can also use the QFormBuilder class provided by the
- QtDesigner module to create user interfaces from .ui files.
+ If you have a custom component or an application that embeds \QD, you can
+ also use the QFormBuilder class provided by the QtDesigner module to create
+ user interfaces from \c{.ui} files.
- The QUiLoader class provides a collection of functions that allows
- you to create widgets based on the information stored in \c .ui
- files (created with Qt Designer) or available in the specified
- plugin paths. The specified plugin paths can be retrieved using
- the pluginPaths() function. You can retrieve the contents of an \c
- .ui file using the load() function. For example:
+ The QUiLoader class provides a collection of functions allowing you to
+ create widgets based on the information stored in \c .ui files (created
+ with \QD) or available in the specified plugin paths. The specified plugin
+ paths can be retrieved using the pluginPaths() function. Similarly, the
+ contents of a \c{.ui} file can be retrieved using the load() function. For
+ example:
\snippet doc/src/snippets/quiloader/mywidget.cpp 0
- By including the user interface in the form's resources (\c myform.qrc),
- we ensure that it will be present at run-time:
+ By including the user interface in the form's resources (\c myform.qrc), we
+ ensure that it will be present at run-time:
\quotefile doc/src/snippets/quiloader/mywidget.qrc
- The availableWidgets() function returns a QStringList with the
- class names of the widgets available in the specified plugin
- paths. You can create any of these widgets using the
- createWidget() function. For example:
+ The availableWidgets() function returns a QStringList with the class names
+ of the widgets available in the specified plugin paths. To create these
+ widgets, simply use the createWidget() function. For example:
\snippet doc/src/snippets/quiloader/main.cpp 0
- You can make a custom widget available to the loader using the
- addPluginPath() function, and you can remove all the available widgets
- by calling the clearPluginPaths() function.
+ To make a custom widget available to the loader, you can use the
+ addPluginPath() function; to remove all available widgets, you can call
+ the clearPluginPaths() function.
- The createAction(), createActionGroup(), createLayout() and
- createWidget() functions are used internally by the QUiLoader class
- whenever it has to create an action, action group, layout or
- widget respectively. For that reason, you can subclass the QUiLoader
- class and reimplement these functions to intervene the process of
- constructing an user interface. For example, you might want to
- create a list of the actions created when loading a form or
- creating a custom widget.
+ The createAction(), createActionGroup(), createLayout(), and createWidget()
+ functions are used internally by the QUiLoader class whenever it has to
+ create an action, action group, layout, or widget respectively. For that
+ reason, you can subclass the QUiLoader class and reimplement these
+ functions to intervene the process of constructing a user interface. For
+ example, you might want to have a list of the actions created when loading
+ a form or creating a custom widget. However, in your reimplementation, you
+ must call QUiLoader's original implementation of these functions first.
- For a complete example using the QUiLoader class, see the \l
- {designer/calculatorbuilder}{Calculator Builder} example.
+ For a complete example using the QUiLoader class, see the
+ \l{Calculator Builder Example}.
\sa QtUiTools, QFormBuilder
*/
@@ -653,8 +652,8 @@ QUiLoader::~QUiLoader()
}
/*!
- Loads a form from the given \a device and creates a new widget with the given
- \a parentWidget to hold its contents.
+ Loads a form from the given \a device and creates a new widget with the
+ given \a parentWidget to hold its contents.
\sa createWidget()
*/
@@ -668,8 +667,8 @@ QWidget *QUiLoader::load(QIODevice *device, QWidget *parentWidget)
}
/*!
- Returns a list naming the paths the loader searches when locating
- custom widget plugins.
+ Returns a list naming the paths in which the loader will search when
+ locating custom widget plugins.
\sa addPluginPath(), clearPluginPaths()
*/
@@ -680,7 +679,7 @@ QStringList QUiLoader::pluginPaths() const
}
/*!
- Clears the list of paths the loader searches when locating
+ Clears the list of paths in which the loader will search when locating
plugins.
\sa addPluginPath(), pluginPaths()
@@ -692,7 +691,7 @@ void QUiLoader::clearPluginPaths()
}
/*!
- Adds the given \a path to the list of paths the loader searches
+ Adds the given \a path to the list of paths in which the loader will search
when locating plugins.
\sa pluginPaths(), clearPluginPaths()
@@ -704,17 +703,17 @@ void QUiLoader::addPluginPath(const QString &path)
}
/*!
- Creates a new widget with the given \a parent and \a name
- using the class specified by \a className. You can use this
- function to create any of the widgets returned by the
- availableWidgets() function.
+ Creates a new widget with the given \a parent and \a name using the class
+ specified by \a className. You can use this function to create any of the
+ widgets returned by the availableWidgets() function.
- The function is also used internally by the QUiLoader class whenever
- it has to create a widget. For that reason, you can subclass the
- QUiLoader class and reimplement this function to intervene in the
- process of constructing a user interface or widget.
+ The function is also used internally by the QUiLoader class whenever it
+ creates a widget. Hence, you can subclass QUiLoader and reimplement this
+ function to intervene process of constructing a user interface or widget.
+ However, in your implementation, ensure that you call QUiLoader's version
+ first.
- \sa availableWidgets(), load()
+ \sa availableWidgets(), load()
*/
QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, const QString &name)
{
@@ -723,13 +722,14 @@ QWidget *QUiLoader::createWidget(const QString &className, QWidget *parent, cons
}
/*!
- Creates a new layout with the given \a parent and \a name
- using the class specified by \a className.
+ Creates a new layout with the given \a parent and \a name using the class
+ specified by \a className.
- The function is used internally by the QUiLoader class whenever it
- has to create a layout. For that reason, you can subclass the
- QUiLoader class and reimplement this function to intervene the
- process of constructing an user interface or widget.
+ The function is also used internally by the QUiLoader class whenever it
+ creates a widget. Hence, you can subclass QUiLoader and reimplement this
+ function to intervene process of constructing a user interface or widget.
+ However, in your implementation, ensure that you call QUiLoader's version
+ first.
\sa createWidget(), load()
*/
@@ -742,10 +742,11 @@ QLayout *QUiLoader::createLayout(const QString &className, QObject *parent, cons
/*!
Creates a new action group with the given \a parent and \a name.
- The function is used internally by the QUiLoader class whenever it
- has to create an action group. For that reason, you can subclass
- the QUiLoader class and reimplement this function to intervene the
- process of constructing an user interface or widget.
+ The function is also used internally by the QUiLoader class whenever it
+ creates a widget. Hence, you can subclass QUiLoader and reimplement this
+ function to intervene process of constructing a user interface or widget.
+ However, in your implementation, ensure that you call QUiLoader's version
+ first.
\sa createAction(), createWidget(), load()
*/
@@ -758,10 +759,11 @@ QActionGroup *QUiLoader::createActionGroup(QObject *parent, const QString &name)
/*!
Creates a new action with the given \a parent and \a name.
- The function is used internally by the QUiLoader class whenever it
- has to create an action. For that reason, you can subclass the
- QUiLoader class and reimplement this function to intervene the
- process of constructing an user interface or widget.
+ The function is also used internally by the QUiLoader class whenever it
+ creates a widget. Hence, you can subclass QUiLoader and reimplement this
+ function to intervene process of constructing a user interface or widget.
+ However, in your implementation, ensure that you call QUiLoader's version
+ first.
\sa createActionGroup(), createWidget(), load()
*/
@@ -772,9 +774,9 @@ QAction *QUiLoader::createAction(QObject *parent, const QString &name)
}
/*!
- Returns a list naming the available widgets that can be built
- using the createWidget() function, i.e all the widgets specified
- within the given plugin paths.
+ Returns a list naming all available widgets that can be built using the
+ createWidget() function, i.e all the widgets specified within the given
+ plugin paths.
\sa pluginPaths(), createWidget()
@@ -795,11 +797,11 @@ QStringList QUiLoader::availableWidgets() const
/*!
- Returns a list naming the available layouts that can be built
- using the createLayout() function
+ \since 4.5
+ Returns a list naming all available layouts that can be built using the
+ createLayout() function
\sa createLayout()
- \since 4.5
*/
QStringList QUiLoader::availableLayouts() const
@@ -816,9 +818,9 @@ QStringList QUiLoader::availableLayouts() const
}
/*!
- Sets the working directory of the loader to \a dir. The loader
- looks for other resources, such as icons and resource files,
- in paths relative to this directory.
+ Sets the working directory of the loader to \a dir. The loader will look
+ for other resources, such as icons and resource files, in paths relative to
+ this directory.
\sa workingDirectory()
*/
@@ -842,9 +844,13 @@ QDir QUiLoader::workingDirectory() const
}
/*!
- Sets whether the execution of scripts is enabled to \a enabled.
- \since 4.3
\internal
+ \since 4.3
+
+ If \a enabled is true, the loader will be able to execute scripts.
+ Otherwise, execution of scripts will be disabled.
+
+ \sa isScriptingEnabled()
*/
void QUiLoader::setScriptingEnabled(bool enabled)
@@ -854,10 +860,12 @@ void QUiLoader::setScriptingEnabled(bool enabled)
}
/*!
- Returns whether the execution of scripts is enabled.
- \sa setScriptingEnabled()
- \since 4.3
- \internal
+ \internal
+ \since 4.3
+
+ Returns true if execution of scripts is enabled; returns false otherwise.
+
+ \sa setScriptingEnabled()
*/
bool QUiLoader::isScriptingEnabled() const
@@ -867,11 +875,13 @@ bool QUiLoader::isScriptingEnabled() const
}
/*!
- Sets whether user interfaces loaded by this loader automatically
- retranslate themselves upon receiving a language change event or not,
- depending on \a enabled.
-
\since 4.5
+
+ If \a enabled is true, user interfaces loaded by this loader will
+ automatically retranslate themselves upon receiving a language change
+ event. Otherwise, the user interfaces will not be retranslated.
+
+ \sa isLanguageChangeEnabled()
*/
void QUiLoader::setLanguageChangeEnabled(bool enabled)
@@ -881,9 +891,12 @@ void QUiLoader::setLanguageChangeEnabled(bool enabled)
}
/*!
- Returns whether dynamic retranslation on language change is enabled.
- \sa setLanguageChangeEnabled()
- \since 4.5
+ \since 4.5
+
+ Returns true if dynamic retranslation on language change is enabled;
+ returns false otherwise.
+
+ \sa setLanguageChangeEnabled()
*/
bool QUiLoader::isLanguageChangeEnabled() const
@@ -894,11 +907,14 @@ bool QUiLoader::isLanguageChangeEnabled() const
/*!
\internal
+ \since 4.5
- Sets whether user interfaces loaded by this loader are translated
- at all. Note that this is orthogonal to languageChangeEnabled.
+ If \a enabled is true, user interfaces loaded by this loader will be
+ translated. Otherwise, the user interfaces will not be translated.
- \since 4.5
+ \note This is orthogonal to languageChangeEnabled.
+
+ \sa isLanguageChangeEnabled(), setLanguageChangeEnabled()
*/
void QUiLoader::setTranslationEnabled(bool enabled)
@@ -909,11 +925,11 @@ void QUiLoader::setTranslationEnabled(bool enabled)
/*!
\internal
+ \since 4.5
- Returns whether translation is enabled.
- \sa setTranslationEnabled()
+ Returns true if translation is enabled; returns false otherwise.
- \since 4.5
+ \sa setTranslationEnabled()
*/
bool QUiLoader::isTranslationEnabled() const
diff --git a/tools/linguist/shared/java.cpp b/tools/linguist/shared/java.cpp
index 912a8d7..4c244d2 100644
--- a/tools/linguist/shared/java.cpp
+++ b/tools/linguist/shared/java.cpp
@@ -58,7 +58,7 @@ enum { Tok_Eof, Tok_class, Tok_return, Tok_tr,
Tok_Comment, Tok_String, Tok_Colon, Tok_Dot,
Tok_LeftBrace, Tok_RightBrace, Tok_LeftParen,
Tok_RightParen, Tok_Comma, Tok_Semicolon,
- Tok_Integer, Tok_Plus, Tok_PlusPlus, Tok_PlusEq };
+ Tok_Integer, Tok_Plus, Tok_PlusPlus, Tok_PlusEq, Tok_null };
class Scope
{
@@ -142,7 +142,11 @@ static int getToken()
case 'c':
if ( yyIdent == QLatin1String("class") )
return Tok_class;
- break;
+ break;
+ case 'n':
+ if ( yyIdent == QLatin1String("null") )
+ return Tok_null;
+ break;
}
}
switch ( yyIdent.at(0).toLatin1() ) {
@@ -382,9 +386,11 @@ static bool matchInteger( qlonglong *number)
static bool matchStringOrNull(QString &s)
{
bool matches = matchString(s);
- qlonglong num = 0;
- if (!matches) matches = matchInteger(&num);
- return matches && num == 0;
+ if (!matches) {
+ matches = (yyTok == Tok_null);
+ if (matches) yyTok = getToken();
+ }
+ return matches;
}
/*
diff --git a/tools/macdeployqt/shared/shared.cpp b/tools/macdeployqt/shared/shared.cpp
index db76ef2..1faa63a 100644
--- a/tools/macdeployqt/shared/shared.cpp
+++ b/tools/macdeployqt/shared/shared.cpp
@@ -343,7 +343,7 @@ DeploymentInfo deployQtFrameworks(QList<FrameworkInfo> frameworks, const QString
copiedFrameworks.append(framework.frameworkName);
// Get the qt path from one of the Qt frameworks;
- if (deploymenInfo.qtPath == QString() && framework.frameworkName.contains("Qt")
+ if (deploymenInfo.qtPath.isNull() && framework.frameworkName.contains("Qt")
&& framework.frameworkDirectory.contains("/lib"))
{
deploymenInfo.qtPath = framework.frameworkDirectory;
@@ -364,7 +364,7 @@ DeploymentInfo deployQtFrameworks(QList<FrameworkInfo> frameworks, const QString
// Copy farmework to app bundle.
const QString deployedBinaryPath = copyFramework(framework, bundlePath);
// Skip the rest if already was deployed.
- if (deployedBinaryPath == QString())
+ if (deployedBinaryPath.isNull())
continue;
runStrip(deployedBinaryPath);
diff --git a/tools/porting/src/portingrules.cpp b/tools/porting/src/portingrules.cpp
index 4931064..cd29403 100644
--- a/tools/porting/src/portingrules.cpp
+++ b/tools/porting/src/portingrules.cpp
@@ -189,7 +189,7 @@ void PortingRules::parseXml(QString fileName)
QString includeFile = xml[QLatin1String("Rules")][QLatin1String("Include")].text();
- if(includeFile != QString()) {
+ if(!includeFile.isNull()) {
QString resolvedIncludeFile = resolveFileName(fileName, includeFile);
if (!resolvedIncludeFile.isEmpty())
parseXml(resolvedIncludeFile);
diff --git a/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp b/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp
index a871fe4..d7dab0b 100644
--- a/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp
+++ b/tools/qdbus/qdbusxml2cpp/qdbusxml2cpp.cpp
@@ -82,7 +82,6 @@ static QStringList wantedInterfaces;
static const char help[] =
"Usage: " PROGRAMNAME " [options...] [xml-or-xml-file] [interfaces...]\n"
"Produces the C++ code to implement the interfaces defined in the input file.\n"
- "If no options are given, the code is written to the standard output.\n"
"\n"
"Options:\n"
" -a <filename> Write the adaptor code to <filename>\n"
@@ -99,7 +98,10 @@ static const char help[] =
"If the file name given to the options -a and -p does not end in .cpp or .h, the\n"
"program will automatically append the suffixes and produce both files.\n"
"You can also use a colon (:) to separate the header name from the source file\n"
- "name, as in '-a filename_p.h:filename.cpp'.\n";
+ "name, as in '-a filename_p.h:filename.cpp'.\n"
+ "\n"
+ "If you pass a dash (-) as the argument to either -p or -a, the output is written\n"
+ "to the standard output\n";
static const char includeList[] =
"#include <QtCore/QByteArray>\n"
diff --git a/translations/assistant_de.qm b/translations/assistant_de.qm
index 54146f6..5b31aea 100644
--- a/translations/assistant_de.qm
+++ b/translations/assistant_de.qm
Binary files differ
diff --git a/translations/assistant_de.ts b/translations/assistant_de.ts
index 0411ef1..9b0d628 100644
--- a/translations/assistant_de.ts
+++ b/translations/assistant_de.ts
@@ -163,7 +163,7 @@
<context>
<name>CentralWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+195"/>
+ <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+208"/>
<source>Add new page</source>
<translation>Neue Seite hinzufügen</translation>
</message>
@@ -173,38 +173,38 @@
<translation>Aktuelle Seite schließen</translation>
</message>
<message>
- <location line="+265"/>
+ <location line="+282"/>
<source>Print Document</source>
<translation>Drucken</translation>
</message>
<message>
- <location line="+147"/>
+ <location line="+148"/>
<location line="+2"/>
<source>unknown</source>
<translation>unbekannt</translation>
</message>
<message>
- <location line="+96"/>
+ <location line="+91"/>
<source>Add New Page</source>
<translation>Neue Seite hinzufügen</translation>
</message>
<message>
- <location line="+1"/>
+ <location line="+3"/>
<source>Close This Page</source>
<translation>Aktuelle Seite schließen</translation>
</message>
<message>
- <location line="+1"/>
+ <location line="+3"/>
<source>Close Other Pages</source>
<translation>Andere Seiten schließen</translation>
</message>
<message>
- <location line="+2"/>
+ <location line="+5"/>
<source>Add Bookmark for this Page...</source>
<translation>Lesezeichen für diese Seite hinzufügen...</translation>
</message>
<message>
- <location line="+257"/>
+ <location line="+259"/>
<source>Search</source>
<translation>Suchen</translation>
</message>
@@ -242,17 +242,17 @@
<context>
<name>FindWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="-863"/>
+ <location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="-899"/>
<source>Previous</source>
<translation>Vorherige</translation>
</message>
<message>
- <location line="+7"/>
+ <location line="+4"/>
<source>Next</source>
<translation>Nächste</translation>
</message>
<message>
- <location line="+5"/>
+ <location line="+4"/>
<source>Case Sensitive</source>
<translation>Gross/ Kleinschreibung beachten</translation>
</message>
@@ -298,7 +298,7 @@
<context>
<name>HelpViewer</name>
<message>
- <location filename="../tools/assistant/tools/assistant/helpviewer.cpp" line="+481"/>
+ <location filename="../tools/assistant/tools/assistant/helpviewer.cpp" line="+492"/>
<source>Help</source>
<translation>Hilfe</translation>
</message>
@@ -329,12 +329,12 @@
<translation>Link in neuem Tab öffnen </translation>
</message>
<message>
- <location line="-267"/>
+ <location line="-275"/>
<source>Open Link in New Tab</source>
<translation>Link in neuem Tab öffnen</translation>
</message>
<message>
- <location line="+201"/>
+ <location line="+209"/>
<source>Unable to launch external application.
</source>
<translation>Fehler beim Starten der externen Anwendung.
@@ -463,38 +463,37 @@
<name>MainWindow</name>
<message>
<location filename="../tools/assistant/tools/assistant/mainwindow.cpp" line="+108"/>
- <location line="+350"/>
+ <location line="+354"/>
<source>Index</source>
<translation>Index</translation>
</message>
<message>
- <location line="-344"/>
- <location line="+342"/>
+ <location line="-348"/>
+ <location line="+346"/>
<source>Contents</source>
<translation>Inhalt</translation>
</message>
<message>
- <location line="-337"/>
- <location line="+341"/>
+ <location line="-341"/>
+ <location line="+345"/>
<source>Bookmarks</source>
<translation>Lesezeichen</translation>
</message>
<message>
- <location line="-329"/>
- <location line="+331"/>
+ <location line="+2"/>
<source>Search</source>
<translation>Suchen</translation>
</message>
<message>
- <location line="-319"/>
- <location line="+192"/>
- <location line="+470"/>
+ <location line="-335"/>
+ <location line="+208"/>
+ <location line="+476"/>
<source>Qt Assistant</source>
<translation>Qt Assistant</translation>
</message>
<message>
- <location line="-501"/>
- <location line="+4"/>
+ <location line="-508"/>
+ <location line="+5"/>
<source>Unfiltered</source>
<translation>Ohne Filter</translation>
</message>
@@ -718,7 +717,7 @@
<translation>Navigationsleiste</translation>
</message>
<message>
- <location line="+74"/>
+ <location line="+76"/>
<source>Toolbars</source>
<translation>Werkzeugleisten</translation>
</message>
@@ -743,7 +742,7 @@
<translation>Adresse:</translation>
</message>
<message>
- <location line="+110"/>
+ <location line="+114"/>
<source>Could not find the associated content item.</source>
<translation>Der zugehörige Inhaltseintrag konnte nicht gefunden werden.</translation>
</message>
@@ -769,12 +768,12 @@
<translation>Über %1</translation>
</message>
<message>
- <location line="+115"/>
+ <location line="+113"/>
<source>Updating search index</source>
<translation>Suchindex wird aufgebaut</translation>
</message>
<message>
- <location line="-597"/>
+ <location line="-601"/>
<source>Looking for Qt Documentation...</source>
<translation>Suche nach Qt Dokumentationen...</translation>
</message>
@@ -862,46 +861,45 @@
<translation type="obsolete">Von Helpserver herunterladen...</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/preferencesdialog.cpp" line="+237"/>
- <location line="+7"/>
- <location line="+6"/>
+ <location filename="../tools/assistant/tools/assistant/preferencesdialog.cpp" line="+256"/>
+ <location line="+43"/>
<source>Add Documentation</source>
<translation>Dokumentation hinzufügen</translation>
</message>
<message>
- <location line="-13"/>
+ <location line="-43"/>
<source>Qt Compressed Help Files (*.qch)</source>
<translation>Komprimierte Hilfe Dateien (*.qch)</translation>
</message>
<message>
- <location line="+8"/>
+ <location line="+37"/>
<source>The specified file is not a valid Qt Help File!</source>
<translation>Die angegebene Datei ist keine Qt Hilfe Datei!</translation>
</message>
<message>
- <location line="+6"/>
+ <location line="-8"/>
<source>The namespace %1 is already registered!</source>
<translation>Der Namespace %1 ist bereits registriert!</translation>
</message>
<message>
- <location line="+23"/>
+ <location line="+31"/>
<source>Remove Documentation</source>
- <translation type="unfinished"></translation>
+ <translation>Dokumentation entfernen</translation>
</message>
<message>
<location line="+1"/>
<source>Some documents currently opened in Assistant reference the documentation you are attempting to remove. Removing the documentation will close those documents.</source>
- <translation type="unfinished"></translation>
+ <translation>Einige der gegenwärtig geöffneten Dokumente stammen aus der Dokumentation, die Sie gerade zu löschen versuchen. Sie werden beim Löschen geschlossen.</translation>
</message>
<message>
<location line="+2"/>
<source>Cancel</source>
- <translation type="unfinished">Abbrechen</translation>
+ <translation>Abbrechen</translation>
</message>
<message>
<location line="+1"/>
<source>OK</source>
- <translation type="unfinished">OK</translation>
+ <translation>OK</translation>
</message>
<message>
<location line="+86"/>
@@ -1000,22 +998,22 @@
<message>
<location/>
<source>Options</source>
- <translation type="unfinished"></translation>
+ <translation>Einstellungen</translation>
</message>
<message>
<location/>
<source>Current Page</source>
- <translation type="unfinished"></translation>
+ <translation>Aktuelle Seite</translation>
</message>
<message>
<location/>
<source>Restore to default</source>
- <translation type="unfinished"></translation>
+ <translation>Vorgabe wiederherstellen</translation>
</message>
<message>
<location/>
<source>Homepage</source>
- <translation type="unfinished"></translation>
+ <translation>Startseite</translation>
</message>
</context>
<context>
@@ -1025,7 +1023,7 @@
<translation type="obsolete">Neuer Ordner</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/cmdlineparser.cpp" line="+110"/>
+ <location filename="../tools/assistant/tools/assistant/cmdlineparser.cpp" line="+112"/>
<source>The specified collection file does not exist!</source>
<translation>Die angegeben Katalogdatei (collection file) konnte nicht gefunden werden!</translation>
</message>
@@ -1073,10 +1071,10 @@
<message>
<location line="+7"/>
<source>Missing filter argument!</source>
- <translation type="unfinished"></translation>
+ <translation>Das Filter-Argument fehlt!</translation>
</message>
<message>
- <location line="+10"/>
+ <location line="+12"/>
<source>Unknown option: %1</source>
<translation>Unbekannte Option: %1</translation>
</message>
@@ -1087,7 +1085,7 @@
<translation>Qt Assistant</translation>
</message>
<message>
- <location filename="../tools/assistant/tools/assistant/main.cpp" line="+190"/>
+ <location filename="../tools/assistant/tools/assistant/main.cpp" line="+203"/>
<source>Could not register documentation file
%1
@@ -1115,9 +1113,9 @@ Reason:
<translation>Dokumentation erfolgreich entfernt.</translation>
</message>
<message>
- <location line="+18"/>
+ <location line="+40"/>
<source>Cannot load sqlite database driver!</source>
- <translation type="unfinished"></translation>
+ <translation>Der Datenbanktreiber für SQLite kann nicht geladen werden!</translation>
</message>
<message>
<location line="+9"/>
@@ -1147,7 +1145,7 @@ Reason:
<context>
<name>SearchWidget</name>
<message>
- <location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+193"/>
+ <location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+195"/>
<source>&amp;Copy</source>
<translation>&amp;Kopieren</translation>
</message>
@@ -1157,20 +1155,18 @@ Reason:
<translation>&amp;Link Adresse kopieren</translation>
</message>
<message>
- <location line="+3"/>
- <location line="+36"/>
+ <location line="+4"/>
<source>Open Link in New Tab</source>
<translation>Link in neuem Tab öffnen</translation>
</message>
<message>
- <location line="-29"/>
+ <location line="+8"/>
<source>Select All</source>
<translation>Alles markieren</translation>
</message>
<message>
- <location line="+28"/>
<source>Open Link</source>
- <translation>Link öffnen</translation>
+ <translation type="obsolete">Link öffnen</translation>
</message>
</context>
<context>
diff --git a/translations/assistant_ja.ts b/translations/assistant_ja.ts
index 1853155..5e4d2c9 100644
--- a/translations/assistant_ja.ts
+++ b/translations/assistant_ja.ts
@@ -1,12 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
-<TS version="2.0">
+<TS version="2.0" language="ja_JP">
<context>
<name>AboutDialog</name>
<message>
<location filename="../tools/assistant/tools/assistant/aboutdialog.cpp" line="+110"/>
<source>&amp;Close</source>
- <translation type="unfinished"></translation>
+ <translation>閉じる(&amp;C)</translation>
</message>
</context>
<context>
@@ -14,18 +14,19 @@
<message>
<location line="-14"/>
<source>Warning</source>
- <translation type="unfinished"></translation>
+ <translation>警告</translation>
</message>
<message>
<location line="+1"/>
<source>Unable to launch external application.
</source>
- <translation type="unfinished"></translation>
+ <translation>外部アプリケーションを起動できません。
+</translation>
</message>
<message>
<location line="+1"/>
<source>OK</source>
- <translation type="unfinished"></translation>
+ <translation>OK</translation>
</message>
</context>
<context>
@@ -37,42 +38,42 @@
<location line="+24"/>
<location line="+32"/>
<source>Bookmarks</source>
- <translation type="unfinished"></translation>
+ <translation>ブックマーク</translation>
</message>
<message>
<location filename="../tools/assistant/tools/assistant/bookmarkdialog.ui"/>
<source>Add Bookmark</source>
- <translation type="unfinished"></translation>
+ <translation>ブックマークの追加</translation>
</message>
<message>
<location/>
<source>Bookmark:</source>
- <translation type="unfinished"></translation>
+ <translation>ブックマーク:</translation>
</message>
<message>
<location/>
<source>Add in Folder:</source>
- <translation type="unfinished"></translation>
+ <translation>追加先フォルダ:</translation>
</message>
<message>
<location/>
<source>+</source>
- <translation type="unfinished"></translation>
+ <translation>+</translation>
</message>
<message>
<location/>
<source>New Folder</source>
- <translation type="unfinished"></translation>
+ <translation>新しいフォルダ</translation>
</message>
<message>
<location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="-69"/>
<source>Delete Folder</source>
- <translation type="unfinished"></translation>
+ <translation>フォルダを削除</translation>
</message>
<message>
<location line="+1"/>
<source>Rename Folder</source>
- <translation type="unfinished"></translation>
+ <translation>フォルダの名前変更</translation>
</message>
</context>
<context>
@@ -80,23 +81,23 @@
<message>
<location line="+450"/>
<source>Bookmarks</source>
- <translation type="unfinished"></translation>
+ <translation>ブックマーク</translation>
</message>
<message>
<location line="+36"/>
<source>Remove</source>
- <translation type="unfinished"></translation>
+ <translation>削除</translation>
</message>
<message>
<location line="+1"/>
<source>You are going to delete a Folder, this will also&lt;br&gt;remove it&apos;s content. Are you sure to continue?</source>
- <translation type="unfinished"></translation>
+ <translation>フォルダを削除すると中身も削除されますが、続けてよろしいですか?</translation>
</message>
<message>
<location line="+109"/>
<location line="+9"/>
<source>New Folder</source>
- <translation type="unfinished"></translation>
+ <translation>新しいフォルダ</translation>
</message>
</context>
<context>
@@ -104,47 +105,47 @@
<message>
<location line="-391"/>
<source>Filter:</source>
- <translation type="unfinished"></translation>
+ <translation>フィルタ:</translation>
</message>
<message>
<location line="+32"/>
<source>Remove</source>
- <translation type="unfinished"></translation>
+ <translation>削除</translation>
</message>
<message>
<location line="-78"/>
<source>Delete Folder</source>
- <translation type="unfinished"></translation>
+ <translation>フォルダを削除</translation>
</message>
<message>
<location line="+1"/>
<source>Rename Folder</source>
- <translation type="unfinished"></translation>
+ <translation>フォルダの名前変更</translation>
</message>
<message>
<location line="+2"/>
<source>Show Bookmark</source>
- <translation type="unfinished"></translation>
+ <translation>ブックマークを開く</translation>
</message>
<message>
<location line="+1"/>
<source>Show Bookmark in New Tab</source>
- <translation type="unfinished"></translation>
+ <translation>ブックマークを新しいタブで開く</translation>
</message>
<message>
<location line="+3"/>
<source>Delete Bookmark</source>
- <translation type="unfinished"></translation>
+ <translation>ブックマークを削除</translation>
</message>
<message>
<location line="+1"/>
<source>Rename Bookmark</source>
- <translation type="unfinished"></translation>
+ <translation>ブックマークの名前変更</translation>
</message>
<message>
<location line="+61"/>
<source>Add</source>
- <translation type="unfinished"></translation>
+ <translation>追加</translation>
</message>
</context>
<context>
@@ -152,48 +153,48 @@
<message>
<location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="+195"/>
<source>Add new page</source>
- <translation type="unfinished"></translation>
+ <translation>新しいページの追加</translation>
</message>
<message>
<location line="+9"/>
<source>Close current page</source>
- <translation type="unfinished"></translation>
+ <translation>現在のページを閉じる</translation>
</message>
<message>
<location line="+265"/>
<source>Print Document</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントを印刷</translation>
</message>
<message>
<location line="+147"/>
<location line="+2"/>
<source>unknown</source>
- <translation type="unfinished"></translation>
+ <translation>不明</translation>
</message>
<message>
<location line="+96"/>
<source>Add New Page</source>
- <translation type="unfinished"></translation>
+ <translation>新しいページの追加</translation>
</message>
<message>
<location line="+1"/>
<source>Close This Page</source>
- <translation type="unfinished"></translation>
+ <translation>このページを閉じる</translation>
</message>
<message>
<location line="+1"/>
<source>Close Other Pages</source>
- <translation type="unfinished"></translation>
+ <translation>他のページを閉じる</translation>
</message>
<message>
<location line="+2"/>
<source>Add Bookmark for this Page...</source>
- <translation type="unfinished"></translation>
+ <translation>このページをブックマークに追加...</translation>
</message>
<message>
<location line="+257"/>
<source>Search</source>
- <translation type="unfinished"></translation>
+ <translation>検索</translation>
</message>
</context>
<context>
@@ -201,12 +202,12 @@
<message>
<location filename="../tools/assistant/tools/assistant/contentwindow.cpp" line="+155"/>
<source>Open Link</source>
- <translation type="unfinished"></translation>
+ <translation>リンクを開く</translation>
</message>
<message>
<location line="+1"/>
<source>Open Link in New Tab</source>
- <translation type="unfinished"></translation>
+ <translation>リンクを新しいタブで開く</translation>
</message>
</context>
<context>
@@ -214,12 +215,12 @@
<message>
<location filename="../tools/assistant/tools/assistant/filternamedialog.ui"/>
<source>Add Filter Name</source>
- <translation type="unfinished"></translation>
+ <translation>フィルタ名を追加</translation>
</message>
<message>
<location/>
<source>Filter Name:</source>
- <translation type="unfinished"></translation>
+ <translation>フィルタ名:</translation>
</message>
</context>
<context>
@@ -227,27 +228,27 @@
<message>
<location filename="../tools/assistant/tools/assistant/centralwidget.cpp" line="-863"/>
<source>Previous</source>
- <translation type="unfinished"></translation>
+ <translation>戻る</translation>
</message>
<message>
<location line="+7"/>
<source>Next</source>
- <translation type="unfinished"></translation>
+ <translation>進む</translation>
</message>
<message>
<location line="+5"/>
<source>Case Sensitive</source>
- <translation type="unfinished"></translation>
+ <translation>大文字/小文字を区別する</translation>
</message>
<message>
<location line="+3"/>
<source>Whole words</source>
- <translation type="unfinished"></translation>
+ <translation>単語単位で検索する</translation>
</message>
<message>
<location line="+12"/>
<source>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;Search wrapped</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;img src=&quot;:/trolltech/assistant/images/wrap.png&quot;&gt;&amp;nbsp;見つからなければ先頭から検索する</translation>
</message>
</context>
<context>
@@ -255,27 +256,27 @@
<message>
<location filename="../tools/shared/fontpanel/fontpanel.cpp" line="+63"/>
<source>Font</source>
- <translation type="unfinished"></translation>
+ <translation>フォント</translation>
</message>
<message>
<location line="+11"/>
<source>&amp;Writing system</source>
- <translation type="unfinished"></translation>
+ <translation>文字セット(&amp;W)</translation>
</message>
<message>
<location line="+3"/>
<source>&amp;Family</source>
- <translation type="unfinished"></translation>
+ <translation>フォント名(&amp;F)</translation>
</message>
<message>
<location line="+4"/>
<source>&amp;Style</source>
- <translation type="unfinished"></translation>
+ <translation>スタイル(&amp;S)</translation>
</message>
<message>
<location line="+4"/>
<source>&amp;Point size</source>
- <translation type="unfinished"></translation>
+ <translation>サイズ(&amp;P)</translation>
</message>
</context>
<context>
@@ -283,38 +284,39 @@
<message>
<location filename="../tools/assistant/tools/assistant/helpviewer.cpp" line="+481"/>
<source>Help</source>
- <translation type="unfinished"></translation>
+ <translation>ヘルプ</translation>
</message>
<message>
<location line="+1"/>
<source>OK</source>
- <translation type="unfinished"></translation>
+ <translation>OK</translation>
</message>
<message>
<location line="-62"/>
<source>&lt;title&gt;Error 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;The page could not be found&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;title&gt;Error 404...&lt;/title&gt;&lt;div align=&quot;center&quot;&gt;&lt;br&gt;&lt;br&gt;&lt;h1&gt;ページが見つかりませんでした&lt;/h1&gt;&lt;br&gt;&lt;h3&gt;&apos;%1&apos;&lt;/h3&gt;&lt;/div&gt;</translation>
</message>
<message>
<location line="+125"/>
<source>Copy &amp;Link Location</source>
- <translation type="unfinished"></translation>
+ <translation>リンクのURLをコピー(&amp;L)</translation>
</message>
<message>
<location line="+3"/>
<source>Open Link in New Tab Ctrl+LMB</source>
- <translation type="unfinished"></translation>
+ <translation>リンクを新しいタブで開く Ctrl+LMB</translation>
</message>
<message>
<location line="-267"/>
<source>Open Link in New Tab</source>
- <translation type="unfinished"></translation>
+ <translation>リンクを新しいタブで開く</translation>
</message>
<message>
<location line="+201"/>
<source>Unable to launch external application.
</source>
- <translation type="unfinished"></translation>
+ <translation>外部アプリケーションを起動できません。
+</translation>
</message>
</context>
<context>
@@ -322,17 +324,17 @@
<message>
<location filename="../tools/assistant/tools/assistant/indexwindow.cpp" line="+66"/>
<source>&amp;Look for:</source>
- <translation type="unfinished"></translation>
+ <translation>検索文字列(&amp;L):</translation>
</message>
<message>
<location line="+68"/>
<source>Open Link</source>
- <translation type="unfinished"></translation>
+ <translation>リンクを開く</translation>
</message>
<message>
<location line="+1"/>
<source>Open Link in New Tab</source>
- <translation type="unfinished"></translation>
+ <translation>リンクを新しいタブで開く</translation>
</message>
</context>
<context>
@@ -341,97 +343,98 @@
<location filename="../tools/assistant/tools/assistant/installdialog.cpp" line="+75"/>
<location filename="../tools/assistant/tools/assistant/installdialog.ui"/>
<source>Install Documentation</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントのインストール</translation>
</message>
<message>
<location line="+30"/>
<source>Downloading documentation info...</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメント情報をダウンロード中...</translation>
</message>
<message>
<location line="+48"/>
<source>Download canceled.</source>
- <translation type="unfinished"></translation>
+ <translation>ダウンロードを中止しました。</translation>
</message>
<message>
<location line="+26"/>
<location line="+78"/>
<location line="+27"/>
<source>Done.</source>
- <translation type="unfinished"></translation>
+ <translation>完了.</translation>
</message>
<message>
<location line="-90"/>
<source>The file %1 already exists. Do you want to overwrite it?</source>
- <translation type="unfinished"></translation>
+ <translation>%1 は既に存在します。上書きしますか?</translation>
</message>
<message>
<location line="+11"/>
<source>Unable to save the file %1: %2.</source>
- <translation type="unfinished"></translation>
+ <translation>ファイルを保存できません。%1: %2.</translation>
</message>
<message>
<location line="+8"/>
<source>Downloading %1...</source>
- <translation type="unfinished"></translation>
+ <translation>%1 をダウンロード中...</translation>
</message>
<message>
<location line="+19"/>
<location line="+42"/>
<location line="+38"/>
<source>Download failed: %1.</source>
- <translation type="unfinished"></translation>
+ <translation>ダウンロード失敗: %1.</translation>
</message>
<message>
<location line="-70"/>
<source>Documentation info file is corrupt!</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメント情報ファイルが不正です!</translation>
</message>
<message>
<location line="+37"/>
<source>Download failed: Downloaded file is corrupted.</source>
- <translation type="unfinished"></translation>
+ <translation>ダウンロード失敗: ダウンロードしたファイルが不正です。</translation>
</message>
<message>
<location line="+2"/>
<source>Installing documentation %1...</source>
- <translation type="unfinished"></translation>
+ <translation>%1 のドキュメントをインストール中...</translation>
</message>
<message>
<location line="+22"/>
<source>Error while installing documentation:
%1</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントのインストール中にエラーが発生しました:
+%1 </translation>
</message>
<message>
<location filename="../tools/assistant/tools/assistant/installdialog.ui"/>
<source>Available Documentation:</source>
- <translation type="unfinished"></translation>
+ <translation>使用可能なドキュメント:</translation>
</message>
<message>
<location/>
<source>Install</source>
- <translation type="unfinished"></translation>
+ <translation>インストール</translation>
</message>
<message>
<location/>
<source>Cancel</source>
- <translation type="unfinished"></translation>
+ <translation>キャンセル</translation>
</message>
<message>
<location/>
<source>Close</source>
- <translation type="unfinished"></translation>
+ <translation>閉じる</translation>
</message>
<message>
<location/>
<source>Installation Path:</source>
- <translation type="unfinished"></translation>
+ <translation>インストール先のパス:</translation>
</message>
<message>
<location/>
<source>...</source>
- <translation type="unfinished"></translation>
+ <translation>...</translation>
</message>
</context>
<context>
@@ -440,298 +443,298 @@
<location filename="../tools/assistant/tools/assistant/mainwindow.cpp" line="+108"/>
<location line="+350"/>
<source>Index</source>
- <translation type="unfinished"></translation>
+ <translation>インデックス</translation>
</message>
<message>
<location line="-344"/>
<location line="+342"/>
<source>Contents</source>
- <translation type="unfinished"></translation>
+ <translation>コンテンツ</translation>
</message>
<message>
<location line="-337"/>
<location line="+341"/>
<source>Bookmarks</source>
- <translation type="unfinished"></translation>
+ <translation>ブックマーク</translation>
</message>
<message>
<location line="-329"/>
<location line="+331"/>
<source>Search</source>
- <translation type="unfinished"></translation>
+ <translation>検索</translation>
</message>
<message>
<location line="-319"/>
<location line="+192"/>
<location line="+470"/>
<source>Qt Assistant</source>
- <translation type="unfinished"></translation>
+ <translation>Qt Assistant</translation>
</message>
<message>
<location line="-501"/>
<location line="+4"/>
<source>Unfiltered</source>
- <translation type="unfinished"></translation>
+ <translation>フィルタなし</translation>
</message>
<message>
<location line="+84"/>
<source>Page Set&amp;up...</source>
- <translation type="unfinished"></translation>
+ <translation>ページ設定(&amp;U)...</translation>
</message>
<message>
<location line="+2"/>
<source>Print Preview...</source>
- <translation type="unfinished"></translation>
+ <translation>印刷プレビュー...</translation>
</message>
<message>
<location line="+3"/>
<source>&amp;Print...</source>
- <translation type="unfinished"></translation>
+ <translation>印刷(&amp;P)...</translation>
</message>
<message>
<location line="+6"/>
<source>New &amp;Tab</source>
- <translation type="unfinished"></translation>
+ <translation>新しいタブ(&amp;T)</translation>
</message>
<message>
<location line="+3"/>
<source>&amp;Close Tab</source>
- <translation type="unfinished"></translation>
+ <translation>タブを閉じる(&amp;C)</translation>
</message>
<message>
<location line="+4"/>
<source>&amp;Quit</source>
- <translation type="unfinished"></translation>
+ <translation>終了(&amp;Q)</translation>
</message>
<message>
<location line="+1"/>
<source>CTRL+Q</source>
- <translation type="unfinished"></translation>
+ <translation>CTRL+Q</translation>
</message>
<message>
<location line="+4"/>
<source>&amp;Copy selected Text</source>
- <translation type="unfinished"></translation>
+ <translation>選択中の文字をコピー(&amp;C)</translation>
</message>
<message>
<location line="+6"/>
<source>&amp;Find in Text...</source>
- <translation type="unfinished"></translation>
+ <translation>検索(&amp;F)...</translation>
</message>
<message>
<location line="+5"/>
<source>Find &amp;Next</source>
- <translation type="unfinished"></translation>
+ <translation>次を検索(&amp;N)</translation>
</message>
<message>
<location line="+4"/>
<source>Find &amp;Previous</source>
- <translation type="unfinished"></translation>
+ <translation>前を検索(&amp;P)</translation>
</message>
<message>
<location line="+5"/>
<source>Preferences...</source>
- <translation type="unfinished"></translation>
+ <translation>設定...</translation>
</message>
<message>
<location line="+4"/>
<source>Zoom &amp;in</source>
- <translation type="unfinished"></translation>
+ <translation>拡大(&amp;I)</translation>
</message>
<message>
<location line="+5"/>
<source>Zoom &amp;out</source>
- <translation type="unfinished"></translation>
+ <translation>縮小(&amp;O)</translation>
</message>
<message>
<location line="+5"/>
<source>Normal &amp;Size</source>
- <translation type="unfinished"></translation>
+ <translation>普通の大きさ(&amp;S)</translation>
</message>
<message>
<location line="+3"/>
<source>Ctrl+0</source>
- <translation type="unfinished"></translation>
+ <translation>Ctrl+0</translation>
</message>
<message>
<location line="+5"/>
<source>ALT+C</source>
- <translation type="unfinished"></translation>
+ <translation>ALT+C</translation>
</message>
<message>
<location line="+2"/>
<source>ALT+I</source>
- <translation type="unfinished"></translation>
+ <translation>ALT+I</translation>
</message>
<message>
<location line="+4"/>
<source>ALT+S</source>
- <translation type="unfinished"></translation>
+ <translation>ALT+S</translation>
</message>
<message>
<location line="+3"/>
<source>&amp;Home</source>
- <translation type="unfinished"></translation>
+ <translation>ホーム(&amp;H)</translation>
</message>
<message>
<location line="+1"/>
<source>Ctrl+Home</source>
- <translation type="unfinished"></translation>
+ <translation>Ctrl+Home</translation>
</message>
<message>
<location line="+3"/>
<source>&amp;Back</source>
- <translation type="unfinished"></translation>
+ <translation>戻る(&amp;B)</translation>
</message>
<message>
<location line="+5"/>
<source>&amp;Forward</source>
- <translation type="unfinished"></translation>
+ <translation>進む(&amp;F)</translation>
</message>
<message>
<location line="+5"/>
<source>Sync with Table of Contents</source>
- <translation type="unfinished"></translation>
+ <translation>内容と目次を同期する</translation>
</message>
<message>
<location line="+6"/>
<source>Next Page</source>
- <translation type="unfinished"></translation>
+ <translation>次のページ</translation>
</message>
<message>
<location line="+1"/>
<source>Ctrl+Alt+Right</source>
- <translation type="unfinished"></translation>
+ <translation>Ctrl+Alt+Right</translation>
</message>
<message>
<location line="+3"/>
<source>Previous Page</source>
- <translation type="unfinished"></translation>
+ <translation>前のページ</translation>
</message>
<message>
<location line="+1"/>
<source>Ctrl+Alt+Left</source>
- <translation type="unfinished"></translation>
+ <translation>Ctrl+Alt+Left</translation>
</message>
<message>
<location line="+4"/>
<source>Add Bookmark...</source>
- <translation type="unfinished"></translation>
+ <translation>ブックマークの追加...</translation>
</message>
<message>
<location line="+4"/>
<source>About...</source>
- <translation type="unfinished"></translation>
+ <translation>Qt Assistant について...</translation>
</message>
<message>
<location line="+3"/>
<source>Navigation Toolbar</source>
- <translation type="unfinished"></translation>
+ <translation>ナビゲーション ツールバー</translation>
</message>
<message>
<location line="+74"/>
<source>Toolbars</source>
- <translation type="unfinished"></translation>
+ <translation>ツールバー</translation>
</message>
<message>
<location line="+15"/>
<source>Filter Toolbar</source>
- <translation type="unfinished"></translation>
+ <translation>フィルター ツールバー</translation>
</message>
<message>
<location line="+2"/>
<source>Filtered by:</source>
- <translation type="unfinished"></translation>
+ <translation>フィルタ条件:</translation>
</message>
<message>
<location line="+23"/>
<source>Address Toolbar</source>
- <translation type="unfinished"></translation>
+ <translation>アドレス ツールバー</translation>
</message>
<message>
<location line="+4"/>
<source>Address:</source>
- <translation type="unfinished"></translation>
+ <translation>アドレス:</translation>
</message>
<message>
<location line="+110"/>
<source>Could not find the associated content item.</source>
- <translation type="unfinished"></translation>
+ <translation>関連付いた内容が見つかりません。</translation>
</message>
<message>
<location line="+81"/>
<source>About %1</source>
- <translation type="unfinished"></translation>
+ <translation>%1 について</translation>
</message>
<message>
<location line="+115"/>
<source>Updating search index</source>
- <translation type="unfinished"></translation>
+ <translation>検索インデックスを更新中</translation>
</message>
<message>
<location line="-597"/>
<source>Looking for Qt Documentation...</source>
- <translation type="unfinished"></translation>
+ <translation>Qt ドキュメントを探しています...</translation>
</message>
<message>
<location line="+195"/>
<source>&amp;Window</source>
- <translation type="unfinished"></translation>
+ <translation>ウィンドウ(&amp;W)</translation>
</message>
<message>
<location line="+3"/>
<source>Minimize</source>
- <translation type="unfinished"></translation>
+ <translation>最小化</translation>
</message>
<message>
<location line="+1"/>
<source>Ctrl+M</source>
- <translation type="unfinished"></translation>
+ <translation>Ctrl+M</translation>
</message>
<message>
<location line="-2"/>
<source>Zoom</source>
- <translation type="unfinished"></translation>
+ <translation>ズーム</translation>
</message>
<message>
<location line="-136"/>
<source>&amp;File</source>
- <translation type="unfinished"></translation>
+ <translation>ファイル(&amp;F)</translation>
</message>
<message>
<location line="+24"/>
<source>&amp;Edit</source>
- <translation type="unfinished"></translation>
+ <translation>編集(&amp;E)</translation>
</message>
<message>
<location line="+24"/>
<source>&amp;View</source>
- <translation type="unfinished"></translation>
+ <translation>表示(&amp;V)</translation>
</message>
<message>
<location line="+27"/>
<source>&amp;Go</source>
- <translation type="unfinished"></translation>
+ <translation>ジャンプ(&amp;G)</translation>
</message>
<message>
<location line="+29"/>
<source>&amp;Bookmarks</source>
- <translation type="unfinished"></translation>
+ <translation>ブックマーク(&amp;B)</translation>
</message>
<message>
<location line="+4"/>
<source>&amp;Help</source>
- <translation type="unfinished"></translation>
+ <translation>ヘルプ(&amp;H)</translation>
</message>
<message>
<location line="-37"/>
<source>ALT+O</source>
- <translation type="unfinished"></translation>
+ <translation>ALT+O</translation>
</message>
<message>
<location line="+35"/>
<source>CTRL+D</source>
- <translation type="unfinished"></translation>
+ <translation>CTRL+D</translation>
</message>
</context>
<context>
@@ -741,47 +744,47 @@
<location line="+7"/>
<location line="+6"/>
<source>Add Documentation</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントの追加</translation>
</message>
<message>
<location line="-13"/>
<source>Qt Compressed Help Files (*.qch)</source>
- <translation type="unfinished"></translation>
+ <translation>圧縮済み Qt ヘルプファイル (*.qch)</translation>
</message>
<message>
<location line="+8"/>
<source>The specified file is not a valid Qt Help File!</source>
- <translation type="unfinished"></translation>
+ <translation>指定されたファイルは有効な Qt ヘルプ ファイルではありません!</translation>
</message>
<message>
<location line="+6"/>
<source>The namespace %1 is already registered!</source>
- <translation type="unfinished"></translation>
+ <translation>ネームスペース %1 は既に登録済みです!</translation>
</message>
<message>
<location line="+23"/>
<source>Remove Documentation</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントの除去</translation>
</message>
<message>
<location line="+1"/>
<source>Some documents currently opened in Assistant reference the documentation you are attempting to remove. Removing the documentation will close those documents.</source>
- <translation type="unfinished"></translation>
+ <translation>除去しようとしているいくつかのドキュメントは Assistant 上で参照されています。除去すると、これらのドキュメントは閉じられます。</translation>
</message>
<message>
<location line="+2"/>
<source>Cancel</source>
- <translation type="unfinished"></translation>
+ <translation>キャンセル</translation>
</message>
<message>
<location line="+1"/>
<source>OK</source>
- <translation type="unfinished"></translation>
+ <translation>OK</translation>
</message>
<message>
<location line="+86"/>
<source>Use custom settings</source>
- <translation type="unfinished"></translation>
+ <translation>独自設定を使用する</translation>
</message>
</context>
<context>
@@ -789,92 +792,92 @@
<message>
<location filename="../tools/assistant/tools/assistant/preferencesdialog.ui"/>
<source>Preferences</source>
- <translation type="unfinished"></translation>
+ <translation>設定</translation>
</message>
<message>
<location/>
<source>Fonts</source>
- <translation type="unfinished"></translation>
+ <translation>フォント</translation>
</message>
<message>
<location/>
<source>Font settings:</source>
- <translation type="unfinished"></translation>
+ <translation>フォント設定:</translation>
</message>
<message>
<location/>
<source>Browser</source>
- <translation type="unfinished"></translation>
+ <translation>ブラウザー</translation>
</message>
<message>
<location/>
<source>Application</source>
- <translation type="unfinished"></translation>
+ <translation>アプリケーション</translation>
</message>
<message>
<location/>
<source>Filters</source>
- <translation type="unfinished"></translation>
+ <translation>フィルタ</translation>
</message>
<message>
<location/>
<source>Filter:</source>
- <translation type="unfinished"></translation>
+ <translation>フィルタ:</translation>
</message>
<message>
<location/>
<source>Attributes:</source>
- <translation type="unfinished"></translation>
+ <translation>属性:</translation>
</message>
<message>
<location/>
<source>1</source>
- <translation type="unfinished"></translation>
+ <translation>1</translation>
</message>
<message>
<location/>
<source>Add</source>
- <translation type="unfinished"></translation>
+ <translation>追加</translation>
</message>
<message>
<location/>
<source>Remove</source>
- <translation type="unfinished"></translation>
+ <translation>削除</translation>
</message>
<message>
<location/>
<source>Documentation</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメント</translation>
</message>
<message>
<location/>
<source>Registered Documentation:</source>
- <translation type="unfinished"></translation>
+ <translation>登録済みドキュメント:</translation>
</message>
<message>
<location/>
<source>Add...</source>
- <translation type="unfinished"></translation>
+ <translation>追加...</translation>
</message>
<message>
<location/>
<source>Options</source>
- <translation type="unfinished"></translation>
+ <translation>オプション</translation>
</message>
<message>
<location/>
<source>Current Page</source>
- <translation type="unfinished"></translation>
+ <translation>現在のページ</translation>
</message>
<message>
<location/>
<source>Restore to default</source>
- <translation type="unfinished"></translation>
+ <translation>デフォルト設定に戻す</translation>
</message>
<message>
<location/>
<source>Homepage</source>
- <translation type="unfinished"></translation>
+ <translation>ホームページ</translation>
</message>
</context>
<context>
@@ -882,64 +885,64 @@
<message>
<location filename="../tools/assistant/tools/assistant/cmdlineparser.cpp" line="+110"/>
<source>The specified collection file does not exist!</source>
- <translation type="unfinished"></translation>
+ <translation>指定されたコレクションファイルは存在しません!</translation>
</message>
<message>
<location line="+4"/>
<source>Missing collection file!</source>
- <translation type="unfinished"></translation>
+ <translation>コレクションファイルが見つかりません!</translation>
</message>
<message>
<location line="+9"/>
<source>Invalid URL!</source>
- <translation type="unfinished"></translation>
+ <translation>不正なURLです!</translation>
</message>
<message>
<location line="+4"/>
<source>Missing URL!</source>
- <translation type="unfinished"></translation>
+ <translation>URLが見つかりません!</translation>
</message>
<message>
<location line="+17"/>
<location line="+19"/>
<location line="+19"/>
<source>Unknown widget: %1</source>
- <translation type="unfinished"></translation>
+ <translation>不明なウィジェット: %1</translation>
</message>
<message>
<location line="-34"/>
<location line="+19"/>
<location line="+19"/>
<source>Missing widget!</source>
- <translation type="unfinished"></translation>
+ <translation>ウィジェットが見つかりません!</translation>
</message>
<message>
<location line="+7"/>
<location line="+12"/>
<source>The specified Qt help file does not exist!</source>
- <translation type="unfinished"></translation>
+ <translation>指定された Qt ヘルプ ファイルが存在しません!</translation>
</message>
<message>
<location line="-7"/>
<location line="+12"/>
<source>Missing help file!</source>
- <translation type="unfinished"></translation>
+ <translation>ヘルプファイルが見つかりません!</translation>
</message>
<message>
<location line="+7"/>
<source>Missing filter argument!</source>
- <translation type="unfinished"></translation>
+ <translation>フィルタ引数が不足しています!</translation>
</message>
<message>
<location line="+10"/>
<source>Unknown option: %1</source>
- <translation type="unfinished"></translation>
+ <translation>不明なオプション: %1</translation>
</message>
<message>
<location line="+30"/>
<location line="+2"/>
<source>Qt Assistant</source>
- <translation type="unfinished"></translation>
+ <translation>Qt Assistant</translation>
</message>
<message>
<location filename="../tools/assistant/tools/assistant/main.cpp" line="+190"/>
@@ -948,12 +951,16 @@
Reason:
%2</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントファイルを登録できませんでした。
+%1
+
+原因:
+%2</translation>
</message>
<message>
<location line="+4"/>
<source>Documentation successfully registered.</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントの登録に成功しました。</translation>
</message>
<message>
<location line="+11"/>
@@ -962,28 +969,32 @@ Reason:
Reason:
%2</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントファイルを解除できませんでした。
+%1
+
+原因:
+%2</translation>
</message>
<message>
<location line="-3"/>
<source>Documentation successfully unregistered.</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントの解放に成功しました。</translation>
</message>
<message>
<location line="+18"/>
<source>Cannot load sqlite database driver!</source>
- <translation type="unfinished"></translation>
+ <translation>SQLite データベース ドライバーをロードできません!</translation>
</message>
<message>
<location line="+9"/>
<source>The specified collection file could not be read!</source>
- <translation type="unfinished"></translation>
+ <translation>指定されたコレクションファイルは読み込めません!</translation>
</message>
<message>
<location filename="../tools/assistant/tools/assistant/bookmarkmanager.cpp" line="+167"/>
<location line="+1"/>
<source>Bookmark</source>
- <translation type="unfinished"></translation>
+ <translation>ブックマーク</translation>
</message>
</context>
<context>
@@ -991,12 +1002,12 @@ Reason:
<message>
<location filename="../tools/assistant/tools/assistant/remotecontrol.cpp" line="+157"/>
<source>Debugging Remote Control</source>
- <translation type="unfinished"></translation>
+ <translation>リモート コントロールをデバッグ中</translation>
</message>
<message>
<location line="+1"/>
<source>Received Command: %1 %2</source>
- <translation type="unfinished"></translation>
+ <translation>受信したコマンド: %1 %2</translation>
</message>
</context>
<context>
@@ -1004,28 +1015,28 @@ Reason:
<message>
<location filename="../tools/assistant/tools/assistant/searchwidget.cpp" line="+193"/>
<source>&amp;Copy</source>
- <translation type="unfinished"></translation>
+ <translation>コピー(&amp;C)</translation>
</message>
<message>
<location line="+4"/>
<source>Copy &amp;Link Location</source>
- <translation type="unfinished"></translation>
+ <translation>リンクのURLをコピー(&amp;L)</translation>
</message>
<message>
<location line="+3"/>
<location line="+36"/>
<source>Open Link in New Tab</source>
- <translation type="unfinished"></translation>
+ <translation>リンクを新しいタブで開く</translation>
</message>
<message>
<location line="-29"/>
<source>Select All</source>
- <translation type="unfinished"></translation>
+ <translation>すべてを選択</translation>
</message>
<message>
<location line="+28"/>
<source>Open Link</source>
- <translation type="unfinished"></translation>
+ <translation>リンクを開く</translation>
</message>
</context>
<context>
@@ -1033,27 +1044,27 @@ Reason:
<message>
<location filename="../tools/assistant/tools/assistant/topicchooser.cpp" line="+54"/>
<source>Choose a topic for &lt;b&gt;%1&lt;/b&gt;:</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;b&gt;%1&lt;/b&gt; の検索先トピックを選択してください:</translation>
</message>
<message>
<location filename="../tools/assistant/tools/assistant/topicchooser.ui"/>
<source>Choose Topic</source>
- <translation type="unfinished"></translation>
+ <translation>トピックを選択</translation>
</message>
<message>
<location/>
<source>&amp;Topics</source>
- <translation type="unfinished"></translation>
+ <translation>トピック(&amp;T)</translation>
</message>
<message>
<location/>
<source>&amp;Display</source>
- <translation type="unfinished"></translation>
+ <translation>表示(&amp;D)</translation>
</message>
<message>
<location/>
<source>&amp;Close</source>
- <translation type="unfinished"></translation>
+ <translation>閉じる(&amp;C)</translation>
</message>
</context>
</TS>
diff --git a/translations/designer_de.qm b/translations/designer_de.qm
index d51c51d..f9b0a03 100644
--- a/translations/designer_de.qm
+++ b/translations/designer_de.qm
Binary files differ
diff --git a/translations/designer_de.ts b/translations/designer_de.ts
index 4cd9914..002fc8d 100644
--- a/translations/designer_de.ts
+++ b/translations/designer_de.ts
@@ -339,7 +339,7 @@ ate the goose who was loose.</source>
<message>
<location line="-220"/>
<source>Change signal-slot connection</source>
- <translation type="unfinished"></translation>
+ <translation>Signale-Slotverbindung ändern</translation>
</message>
<message>
<location line="+234"/>
@@ -1384,7 +1384,7 @@ ate the goose who was loose.</source>
<message>
<location filename="../tools/designer/src/lib/shared/plugindialog.ui"/>
<source>Plugin Information</source>
- <translation type="unfinished">Plugins</translation>
+ <translation>Plugins</translation>
</message>
<message>
<location/>
@@ -4026,7 +4026,7 @@ Möchten Sie sie überschreiben?</translation>
<message>
<location line="+1"/>
<source>Go to slot...</source>
- <translation type="unfinished">Slot anzeigen...</translation>
+ <translation>Slot anzeigen...</translation>
</message>
<message>
<location line="+1"/>
@@ -5963,14 +5963,14 @@ Please select another name.</source>
<translation>Detailansicht</translation>
</message>
<message>
- <location line="+596"/>
+ <location line="+597"/>
<source>Object: %1
Class: %2</source>
<translation>Objekt: %1
Klasse: %2</translation>
</message>
<message>
- <location line="-599"/>
+ <location line="-600"/>
<source>Sorting</source>
<translation>Sortiert</translation>
</message>
@@ -5980,7 +5980,7 @@ Klasse: %2</translation>
<translation>Farbige Hervorhebung</translation>
</message>
<message>
- <location line="+65"/>
+ <location line="+66"/>
<source>Configure Property Editor</source>
<translation>Anzeige der Eigenschaften konfigurieren</translation>
</message>
diff --git a/translations/linguist_de.qm b/translations/linguist_de.qm
index f411122..a39c3bf 100644
--- a/translations/linguist_de.qm
+++ b/translations/linguist_de.qm
Binary files differ
diff --git a/translations/linguist_de.ts b/translations/linguist_de.ts
index 712f75d..cb8e4d2 100644
--- a/translations/linguist_de.ts
+++ b/translations/linguist_de.ts
@@ -6,7 +6,7 @@
<message>
<location filename="../tools/linguist/linguist/phrasebookbox.cpp" line="+59"/>
<source>(New Entry)</source>
- <translation type="unfinished"></translation>
+ <translation>(Neuer Eintrag)</translation>
</message>
</context>
<context>
@@ -29,7 +29,7 @@
<message>
<location filename="../tools/linguist/linguist/batchtranslationdialog.cpp" line="+79"/>
<source>Batch Translation of &apos;%1&apos; - Qt Linguist</source>
- <translation type="unfinished"></translation>
+ <translation>Automatische Übersetzung von &apos;%1&apos; - Qt Linguist</translation>
</message>
<message>
<location line="+37"/>
@@ -57,62 +57,62 @@
<message>
<location filename="../tools/linguist/linguist/batchtranslation.ui"/>
<source>Qt Linguist - Batch Translation</source>
- <translation type="unfinished">Qt Linguist - Automatische Übersetzung</translation>
+ <translation>Qt Linguist - Automatische Übersetzung</translation>
</message>
<message>
<location/>
<source>Options</source>
- <translation type="unfinished">Optionen</translation>
+ <translation>Optionen</translation>
</message>
<message>
<location/>
<source>Set translated entries to finished</source>
- <translation type="unfinished">Markiere Übersetzung als erledigt</translation>
+ <translation>Markiere Übersetzung als erledigt</translation>
</message>
<message>
<location/>
<source>Retranslate entries with existing translation</source>
- <translation type="unfinished"></translation>
+ <translation>Einträge mit bereits existierender Übersetzung neu übersetzen</translation>
</message>
<message>
<location/>
<source>Note that the modified entries will be reset to unfinished if &apos;Set translated entries to finished&apos; above is unchecked.</source>
- <translation type="unfinished"></translation>
+ <translation>Beachten Sie, dass die geänderten Einträge in den Status &apos;unerledigt&apos; zurückgesetzt werden, wenn &apos;Markiere Übersetzung als erledigt&apos; deaktiviert ist.</translation>
</message>
<message>
<location/>
<source>Translate also finished entries</source>
- <translation type="unfinished"></translation>
+ <translation>Erledigte Einträge übersetzen</translation>
</message>
<message>
<location/>
<source>Phrase book preference</source>
- <translation type="unfinished">Wörterbücher</translation>
+ <translation>Wörterbücher</translation>
</message>
<message>
<location/>
<source>Move up</source>
- <translation type="unfinished">Nach oben</translation>
+ <translation>Nach oben</translation>
</message>
<message>
<location/>
<source>Move down</source>
- <translation type="unfinished">Nach unten</translation>
+ <translation>Nach unten</translation>
</message>
<message>
<location/>
<source>The batch translator will search through the selected phrase books in the order given above.</source>
- <translation type="unfinished"></translation>
+ <translation>Der automatische Übersetzer wird in der angegebenen Reihenfolge durch die ausgewählten Wörterbücher gehen.</translation>
</message>
<message>
<location/>
<source>&amp;Run</source>
- <translation type="unfinished">&amp;Ausführen</translation>
+ <translation>&amp;Ausführen</translation>
</message>
<message>
<location/>
<source>Cancel</source>
- <translation type="unfinished">Abbrechen</translation>
+ <translation>Abbrechen</translation>
</message>
</context>
<context>
@@ -120,38 +120,39 @@
<message>
<location filename="../tools/linguist/linguist/messagemodel.cpp" line="+214"/>
<source>&lt;qt&gt;Duplicate messages found in &apos;%1&apos;:</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;qt&gt;Mehrfach vorhandene Meldungen in &apos;%1&apos;:</translation>
</message>
<message>
<location line="+4"/>
<source>&lt;p&gt;[more duplicates omitted]</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;[weitere mehrfach vorhandene Nachrichten weggelassen]</translation>
</message>
<message>
<location line="+3"/>
<source>&lt;p&gt;* Context: %1&lt;br&gt;* Source: %2</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;p&gt;* Kontext: %1&lt;br&gt;* Quelle: %2</translation>
</message>
<message>
<location line="+3"/>
<source>&lt;br&gt;* Comment: %3</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;br&gt;* Kommentar: %3</translation>
</message>
<message>
<location line="+70"/>
<source>Linguist does not know the plural rules for &apos;%1&apos;.
Will assume a single universal form.</source>
- <translation type="unfinished"></translation>
+ <translation>Die Regeln zur Pluralbildung der Sprache &apos;%1&apos; sind in Linguist nicht definiert.
+Es wird mit einer einfachen Universalform gearbeitet.</translation>
</message>
<message>
<location line="+56"/>
<source>Cannot create &apos;%2&apos;: %1</source>
- <translation type="unfinished"></translation>
+ <translation>&apos;%2&apos; kann nicht erzeugt werden: %1</translation>
</message>
<message>
<location line="+56"/>
<source>Universal Form</source>
- <translation type="unfinished"></translation>
+ <translation>Universalform</translation>
</message>
</context>
<context>
@@ -239,7 +240,7 @@ Will assume a single universal form.</source>
<message>
<location line="+3"/>
<source>Translation does not contain the necessary %n place marker.</source>
- <translation type="unfinished"></translation>
+ <translation>Der erforderliche Platzhalter (%n) fehlt in der Übersetzung.</translation>
</message>
<message>
<location line="+3"/>
@@ -311,37 +312,37 @@ Will assume a single universal form.</source>
<message>
<location/>
<source>Find</source>
- <translation type="unfinished"></translation>
+ <translation>Suchen</translation>
</message>
<message>
<location/>
<source>&amp;Find what:</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Suchmuster:</translation>
</message>
<message>
<location/>
<source>&amp;Source texts</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Quelltexte</translation>
</message>
<message>
<location/>
<source>&amp;Translations</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Übersetzungen</translation>
</message>
<message>
<location/>
<source>&amp;Match case</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Groß-/Kleinschreibung beachten</translation>
</message>
<message>
<location/>
<source>&amp;Comments</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Kommentare</translation>
</message>
<message>
<location/>
<source>Ignore &amp;accelerators</source>
- <translation type="unfinished"></translation>
+ <translation>Tastenkürzel &amp;ignorieren</translation>
</message>
<message>
<location/>
@@ -612,102 +613,102 @@ p, li { white-space: pre-wrap; }
<message>
<location/>
<source>Previous unfinished item.</source>
- <translation type="unfinished"></translation>
+ <translation>Vorherige Unerledigte</translation>
</message>
<message>
<location/>
<source>Move to the previous unfinished item.</source>
- <translation type="unfinished"></translation>
+ <translation>Gehe zum vorangehenden unerledigten Eintrag.</translation>
</message>
<message>
<location/>
<source>Next unfinished item.</source>
- <translation type="unfinished"></translation>
+ <translation>Nächste Unerledigte</translation>
</message>
<message>
<location/>
<source>Move to the next unfinished item.</source>
- <translation type="unfinished"></translation>
+ <translation>Gehe zum nächsten unerledigten Eintrag.</translation>
</message>
<message>
<location/>
<source>Move to previous item.</source>
- <translation type="unfinished"></translation>
+ <translation>Gehe zum vorigen Eintrag.</translation>
</message>
<message>
<location/>
<source>Move to the previous item.</source>
- <translation type="unfinished"></translation>
+ <translation>Gehe zum vorigen Eintrag.</translation>
</message>
<message>
<location/>
<source>Next item.</source>
- <translation type="unfinished"></translation>
+ <translation>Nächster EIntrag.</translation>
</message>
<message>
<location/>
<source>Move to the next item.</source>
- <translation type="unfinished"></translation>
+ <translation>Gehe zum nächsten Eintrag.</translation>
</message>
<message>
<location/>
<source>Mark item as done and move to the next unfinished item.</source>
- <translation type="unfinished"></translation>
+ <translation>Markiere Eintrag als erledigt und gehe zum nächsten unerledigten Eintrag.</translation>
</message>
<message>
<location/>
<source>Mark this item as done and move to the next unfinished item.</source>
- <translation type="unfinished"></translation>
+ <translation>Markiert diesen Eintrag als erledigt und geht zum nächsten unerledigten Eintrag.</translation>
</message>
<message>
<location/>
<source>Copy from source text</source>
- <translation type="unfinished"></translation>
+ <translation>Übernehme &amp;Ursprungstext</translation>
</message>
<message>
<location/>
<source>Toggle the validity check of accelerators.</source>
- <translation type="unfinished"></translation>
+ <translation>Schalte Prüfung der Tastenkürzel um.</translation>
</message>
<message>
<location/>
<source>Toggle the validity check of accelerators, i.e. whether the number of ampersands in the source and translation text is the same. If the check fails, a message is shown in the warnings window.</source>
- <translation type="unfinished"></translation>
+ <translation>Schalte Prüfung der Tastenkürzel um; das heisst, die Übereinstimmung der kaufmännischen Und-Zeichen in Quelle und Übersetzung. Bei Fehlschlag wird eine Warnung im Hinweis-Fenster angezeigt.</translation>
</message>
<message>
<location/>
<source>Toggle the validity check of ending punctuation.</source>
- <translation type="unfinished"></translation>
+ <translation>Schalte Prüfung der Satzendezeichen am Ende des Textes um.</translation>
</message>
<message>
<location/>
<source>Toggle the validity check of ending punctuation. If the check fails, a message is shown in the warnings window.</source>
- <translation type="unfinished"></translation>
+ <translation>Schaltet die Prüfung der Satzendezeichen am Ende des Textes um. Bei Fehlschlag wird eine Warnung im Hinweis-Fenster angezeigt.</translation>
</message>
<message>
<location/>
<source>Toggle checking that phrase suggestions are used. If the check fails, a message is shown in the warnings window.</source>
- <translation type="unfinished"></translation>
+ <translation>Schaltet die Prüfung der Verwendung der Wörterbuchvorschläge um. Bei Fehlschlag wird eine Warnung im Hinweis-Fenster angezeigt.</translation>
</message>
<message>
<location/>
<source>Toggle the validity check of place markers.</source>
- <translation type="unfinished"></translation>
+ <translation>Schaltet die Prüfung der Platzhalter um.</translation>
</message>
<message>
<location/>
<source>Toggle the validity check of place markers, i.e. whether %1, %2, ... are used consistently in the source text and translation text. If the check fails, a message is shown in the warnings window.</source>
- <translation type="unfinished"></translation>
+ <translation>Schaltet die Prüfung der Platzhalter um; das heisst, ob %1, %2,... in Quelltext und Übersetzung übereinstimmend verwendet werden. Bei Fehlschlag wird eine Warnung im Hinweis-Fenster angezeigt.</translation>
</message>
<message>
<location/>
<source>Open Read-O&amp;nly...</source>
- <translation type="unfinished"></translation>
+ <translation>Schr&amp;eibgeschützt öffnen...</translation>
</message>
<message>
<location/>
<source>&amp;Save All</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Alles Speichern</translation>
</message>
<message>
<location/>
@@ -767,22 +768,22 @@ p, li { white-space: pre-wrap; }
<message>
<location/>
<source>Recently Opened &amp;Files</source>
- <translation type="unfinished"></translation>
+ <translation>Zu&amp;letzt bearbeitete Dateien</translation>
</message>
<message>
<location/>
<source>Save</source>
- <translation type="unfinished"></translation>
+ <translation>Speichern</translation>
</message>
<message>
<location/>
<source>Print a list of all the translation units in the current translation source file.</source>
- <translation type="unfinished"></translation>
+ <translation>Liste aller Übersetzungseinheiten in der aktuellen Übersetzungsdatei drucken.</translation>
</message>
<message>
<location/>
<source>Undo the last editing operation performed on the current translation.</source>
- <translation type="unfinished"></translation>
+ <translation>Mache die letzte Änderung an der Übersetzung rückgängig.</translation>
</message>
<message>
<location/>
@@ -902,12 +903,12 @@ p, li { white-space: pre-wrap; }
<message>
<location/>
<source>Close</source>
- <translation type="unfinished">Schließen</translation>
+ <translation>Schließen</translation>
</message>
<message>
<location/>
<source>&amp;Close All</source>
- <translation type="unfinished"></translation>
+ <translation>A&amp;lle schließen</translation>
</message>
<message>
<location/>
@@ -1170,49 +1171,49 @@ p, li { white-space: pre-wrap; }
<message>
<location line="+195"/>
<source>Source text</source>
- <translation type="unfinished">Ursprungstext</translation>
+ <translation>Ursprungstext</translation>
</message>
<message>
<location line="+1"/>
<location line="+25"/>
<source>Index</source>
- <translation type="unfinished">Index</translation>
+ <translation>Index</translation>
</message>
<message>
<location line="-2"/>
<location line="+61"/>
<source>Context</source>
- <translation type="unfinished">Kontext</translation>
+ <translation>Kontext</translation>
</message>
<message>
<location line="-60"/>
<source>Items</source>
- <translation type="unfinished">Einträge</translation>
+ <translation>Einträge</translation>
</message>
<message>
<location line="+77"/>
<source>This panel lists the source contexts.</source>
- <translation type="unfinished">Dieser Bereich zeigt die Kontexte an.</translation>
+ <translation>Dieser Bereich zeigt die Kontexte an.</translation>
</message>
<message>
<location line="+15"/>
<source>Strings</source>
- <translation type="unfinished">Zeichenketten</translation>
+ <translation>Zeichenketten</translation>
</message>
<message>
<location line="+39"/>
<source>Phrases and guesses</source>
- <translation type="unfinished">Wörterbuch und Vorschläge</translation>
+ <translation>Wörterbuch und Vorschläge</translation>
</message>
<message>
<location line="+10"/>
<source>Sources and Forms</source>
- <translation type="unfinished"></translation>
+ <translation>Quelldateien und Formulare</translation>
</message>
<message>
<location line="+15"/>
<source>Warnings</source>
- <translation type="unfinished">Warnungen</translation>
+ <translation>Hinweise</translation>
</message>
<message>
<location line="+59"/>
@@ -1223,120 +1224,124 @@ p, li { white-space: pre-wrap; }
<message>
<location line="+125"/>
<source>Loading...</source>
- <translation type="unfinished">Lade...</translation>
+ <translation>Lade...</translation>
</message>
<message>
<location line="+32"/>
<location line="+22"/>
<source>Loading File - Qt Linguist</source>
- <translation type="unfinished"></translation>
+ <translation>Laden - Qt Linguist</translation>
</message>
<message>
<location line="-21"/>
<source>The file &apos;%1&apos; does not seem to be related to the currently open file(s) &apos;%2&apos;.
Close the open file(s) first?</source>
- <translation type="unfinished"></translation>
+ <translation>Die Datei &apos;%1&apos; scheint nicht zu den bereits geöffneten Dateien &apos;%2&apos; zu passen.
+
+Sollen die bereits geöffneten Dateien vorher geschlossen werden?</translation>
</message>
<message>
<location line="+22"/>
<source>The file &apos;%1&apos; does not seem to be related to the file &apos;%2&apos; which is being loaded as well.
Skip loading the first named file?</source>
- <translation type="unfinished"></translation>
+ <translation>Die Datei &apos;%1&apos; scheint nicht zu der Datei &apos;%2&apos; zu passen, die ebenfalls geladen wird.
+
+Soll die erstgenannte Datei übersprungen werden?</translation>
</message>
<message numerus="yes">
<location line="+61"/>
<source>%n translation unit(s) loaded.</source>
- <translation type="unfinished">
- <numerusform></numerusform>
- <numerusform></numerusform>
+ <translation>
+ <numerusform>Eine Übersetzungseinheit geladen.</numerusform>
+ <numerusform>%n Übersetzungseinheiten geladen.</numerusform>
</translation>
</message>
<message>
<location line="+93"/>
<source>Related files (%1);;</source>
- <translation type="unfinished"></translation>
+ <translation>Verwandte Dateien (%1);;</translation>
</message>
<message>
<location line="+4"/>
<source>Open Translation Files</source>
- <translation type="unfinished"></translation>
+ <translation>Übersetzungsdateien öffnen</translation>
</message>
<message>
<location line="+10"/>
<location line="+31"/>
<source>File saved.</source>
- <translation type="unfinished">Datei gespeichert.</translation>
+ <translation>Datei gespeichert.</translation>
</message>
<message>
<location line="+15"/>
<location line="+1164"/>
<location filename="../tools/linguist/linguist/mainwindow.ui"/>
<source>Release</source>
- <translation type="unfinished">Freigeben</translation>
+ <translation>Freigeben</translation>
</message>
<message>
<location line="-1163"/>
<source>Qt message files for released applications (*.qm)
All files (*)</source>
- <translation type="unfinished">Qt Nachrichtendateien (*.qm)
+ <translation>Qt Nachrichtendateien (*.qm)
Alle Dateien (*)</translation>
</message>
<message>
<location line="+3"/>
<location line="+12"/>
<source>File created.</source>
- <translation type="unfinished">Datei erzeugt.</translation>
+ <translation>Datei erzeugt.</translation>
</message>
<message>
<location line="+27"/>
<location line="+355"/>
<source>Printing...</source>
- <translation type="unfinished">Drucke...</translation>
+ <translation>Drucke...</translation>
</message>
<message>
<location line="-347"/>
<source>Context: %1</source>
- <translation type="unfinished">Kontext: %1</translation>
+ <translation>Kontext: %1</translation>
</message>
<message>
<location line="+32"/>
<source>finished</source>
- <translation type="unfinished">erledigt</translation>
+ <translation>erledigt</translation>
</message>
<message>
<location line="+3"/>
<source>unresolved</source>
- <translation type="unfinished">ungelöst</translation>
+ <translation>ungelöst</translation>
</message>
<message>
<location line="+3"/>
<source>obsolete</source>
- <translation type="unfinished">veraltet</translation>
+ <translation>veraltet</translation>
</message>
<message>
<location line="+15"/>
<location line="+307"/>
<source>Printing... (page %1)</source>
- <translation type="unfinished">Drucke... (Seite %1)</translation>
+ <translation>Drucke... (Seite %1)</translation>
</message>
<message>
<location line="-300"/>
<location line="+307"/>
<source>Printing completed</source>
- <translation type="unfinished">Drucken beendet</translation>
+ <translation>Drucken beendet</translation>
</message>
<message>
<location line="-305"/>
<location line="+307"/>
<source>Printing aborted</source>
- <translation type="unfinished">Drucken abgebrochen</translation>
+ <translation>Drucken abgebrochen</translation>
</message>
<message>
<location line="-232"/>
<source>Search wrapped.</source>
- <translation type="unfinished">Suche beginnt von oben.</translation>
+ <translation>Suche beginnt von oben.</translation>
</message>
<message>
<location line="+17"/>
@@ -1356,7 +1361,7 @@ Alle Dateien (*)</translation>
<location line="-1204"/>
<location line="+102"/>
<source>Cannot find the string &apos;%1&apos;.</source>
- <translation type="unfinished">Kann Zeichenkette &apos;%1&apos; nicht finden.</translation>
+ <translation>Kann Zeichenkette &apos;%1&apos; nicht finden.</translation>
</message>
<message numerus="yes">
<source>Translated %n entries to &apos;%1&apos;</source>
@@ -1368,59 +1373,59 @@ Alle Dateien (*)</translation>
<message>
<location line="-82"/>
<source>Search And Translate in &apos;%1&apos; - Qt Linguist</source>
- <translation type="unfinished"></translation>
+ <translation>Suchen und übersetzen &apos;%1&apos; - Qt Linguist</translation>
</message>
<message>
<location line="+34"/>
<location line="+23"/>
<location line="+24"/>
<source>Translate - Qt Linguist</source>
- <translation type="unfinished"></translation>
+ <translation>Übersetzung - Qt Linguist</translation>
</message>
<message numerus="yes">
<location line="-46"/>
<source>Translated %n entry(s)</source>
- <translation type="unfinished">
- <numerusform></numerusform>
- <numerusform></numerusform>
+ <translation>
+ <numerusform>Ein Eintrag übersetzt</numerusform>
+ <numerusform>%n Einträge übersetzt</numerusform>
</translation>
</message>
<message>
<location line="+23"/>
<source>No more occurrences of &apos;%1&apos;. Start over?</source>
- <translation type="unfinished"></translation>
+ <translation>Keine weiteren Fundstellen von &apos;%1&apos;. Von vorn beginnen?</translation>
</message>
<message>
<location line="+30"/>
<source>Create New Phrase Book</source>
- <translation type="unfinished">Erzeugen eines neuen Wörterbuchs</translation>
+ <translation>Erzeugen eines neuen Wörterbuchs</translation>
</message>
<message>
<location line="+1"/>
<source>Qt phrase books (*.qph)
All files (*)</source>
- <translation type="unfinished">Qt Wörterbücher (*.qph)
+ <translation>Qt Wörterbücher (*.qph)
Alle Dateien (*)</translation>
</message>
<message>
<location line="+11"/>
<source>Phrase book created.</source>
- <translation type="unfinished">Wörterbuch erzeugt.</translation>
+ <translation>Wörterbuch erzeugt.</translation>
</message>
<message>
<location line="+17"/>
<source>Open Phrase Book</source>
- <translation type="unfinished">Öffne Wörterbuch</translation>
+ <translation>Öffne Wörterbuch</translation>
</message>
<message>
<location line="+1"/>
<source>Qt phrase books (*.qph);;All files (*)</source>
- <translation type="unfinished">Qt Wörterbücher (*.qph);;Alle Dateien (*)</translation>
+ <translation>Qt Wörterbücher (*.qph);;Alle Dateien (*)</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>%n phrase(s) loaded.</source>
- <translation type="unfinished">
+ <translation>
<numerusform>Ein Wörterbucheintrag geladen.</numerusform>
<numerusform>%n Wörterbucheinträge geladen.</numerusform>
</translation>
@@ -1430,32 +1435,32 @@ Alle Dateien (*)</translation>
<location line="+3"/>
<location line="+7"/>
<source>Add to phrase book</source>
- <translation type="unfinished">Hinzufügen zum Wörterbuch</translation>
+ <translation>Hinzufügen zum Wörterbuch</translation>
</message>
<message>
<location line="-9"/>
<source>No appropriate phrasebook found.</source>
- <translation type="unfinished"></translation>
+ <translation>Es wurde kein geeignetes Wörterbuch gefunden.</translation>
</message>
<message>
<location line="+3"/>
<source>Adding entry to phrasebook %1</source>
- <translation type="unfinished"></translation>
+ <translation>Eintrag zu Wörterbuch %1 hinzufügen</translation>
</message>
<message>
<location line="+7"/>
<source>Select phrase book to add to</source>
- <translation type="unfinished">Zu welchem Wörterbuch soll der Eintrag hinzugefügt werden?</translation>
+ <translation>Zu welchem Wörterbuch soll der Eintrag hinzugefügt werden?</translation>
</message>
<message>
<location line="+29"/>
<source>Unable to launch Qt Assistant (%1)</source>
- <translation type="unfinished">Kann Qt Assistant nicht starten (%1)</translation>
+ <translation>Kann Qt Assistant nicht starten (%1)</translation>
</message>
<message>
<location line="+17"/>
<source>Version %1</source>
- <translation type="unfinished">Version %1</translation>
+ <translation>Version %1</translation>
</message>
<message>
<source> Open Source Edition</source>
@@ -1464,17 +1469,17 @@ Alle Dateien (*)</translation>
<message>
<location line="+6"/>
<source>&lt;center&gt;&lt;img src=&quot;:/images/splash.png&quot;/&gt;&lt;/img&gt;&lt;p&gt;%1&lt;/p&gt;&lt;/center&gt;&lt;p&gt;Qt Linguist is a tool for adding translations to Qt applications.&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;p&gt;Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).&lt;/p&gt;&lt;p&gt;The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.&lt;/p&gt;</source>
- <translation type="unfinished">&lt;center&gt;&lt;img src=&quot;:/images/splash.png&quot;/&gt;&lt;/img&gt;&lt;p&gt;%1&lt;/p&gt;&lt;/center&gt;&lt;p&gt;Qt Linguist ist ein Werkzeug zum Übersetzen von Qt Anwendungen.&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;p&gt;Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).&lt;/p&gt;&lt;p&gt;The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.&lt;/p&gt;</translation>
+ <translation>&lt;center&gt;&lt;img src=&quot;:/images/splash.png&quot;/&gt;&lt;/img&gt;&lt;p&gt;%1&lt;/p&gt;&lt;/center&gt;&lt;p&gt;Qt Linguist ist ein Werkzeug zum Übersetzen von Qt Anwendungen.&lt;/p&gt;&lt;p&gt;%2&lt;/p&gt;&lt;p&gt;Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).&lt;/p&gt;&lt;p&gt;The program is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.&lt;/p&gt;</translation>
</message>
<message>
<location line="+41"/>
<source>Do you want to save the modified files?</source>
- <translation type="unfinished"></translation>
+ <translation>Möchten Sie die geänderten Dateien speichern?</translation>
</message>
<message>
<location line="+22"/>
<source>Do you want to save &apos;%1&apos;?</source>
- <translation type="unfinished">Wollen Sie &apos;%1&apos; speichern?</translation>
+ <translation>Möchten Sie &apos;%1&apos; speichern?</translation>
</message>
<message>
<location line="+43"/>
@@ -1490,99 +1495,99 @@ Alle Dateien (*)</translation>
<location line="+267"/>
<location line="+12"/>
<source>No untranslated translation units left.</source>
- <translation type="unfinished"></translation>
+ <translation>Es wurden alle Übersetzungseinheiten abgearbeitet.</translation>
</message>
<message>
<location line="+176"/>
<source>&amp;Window</source>
- <translation type="unfinished">&amp;Fenster</translation>
+ <translation>&amp;Fenster</translation>
</message>
<message>
<location line="+2"/>
<source>Minimize</source>
- <translation type="unfinished">Minimieren</translation>
+ <translation>Minimieren</translation>
</message>
<message>
<location line="+1"/>
<source>Ctrl+M</source>
- <translation type="unfinished">Ctrl+M</translation>
+ <translation type="unfinished"></translation>
</message>
<message>
<location line="+12"/>
<source>Display the manual for %1.</source>
- <translation type="unfinished">Zeige Handbuch für %1 an.</translation>
+ <translation>Zeige Handbuch für %1 an.</translation>
</message>
<message>
<location line="+1"/>
<source>Display information about %1.</source>
- <translation type="unfinished">Zeige Informationen über %1 an.</translation>
+ <translation>Zeige Informationen über %1 an.</translation>
</message>
<message>
<location line="+70"/>
<source>&amp;Save &apos;%1&apos;</source>
- <translation type="unfinished"></translation>
+ <translation>&apos;%1&apos; &amp;Speichern</translation>
</message>
<message>
<location line="+1"/>
<source>Save &apos;%1&apos; &amp;As...</source>
- <translation type="unfinished"></translation>
+ <translation>Speichere &apos;%1&apos; &amp;unter...</translation>
</message>
<message>
<location line="+1"/>
<source>Release &apos;%1&apos;</source>
- <translation type="unfinished"></translation>
+ <translation>&apos;%1&apos; freigeben</translation>
</message>
<message>
<location line="+1"/>
<source>Release &apos;%1&apos; As...</source>
- <translation type="unfinished"></translation>
+ <translation>Gebe &apos;%1&apos;frei unter ...</translation>
</message>
<message>
<location line="+1"/>
<source>&amp;Close &apos;%1&apos;</source>
- <translation type="unfinished"></translation>
+ <translation>&apos;%1&apos; &amp;Schließen</translation>
</message>
<message>
<location line="+6"/>
<location line="+13"/>
<source>&amp;Close</source>
- <translation type="unfinished">&amp;Schließen</translation>
+ <translation>&amp;Schließen</translation>
</message>
<message>
<location line="-10"/>
<source>Save All</source>
- <translation type="unfinished"></translation>
+ <translation>Alles speichern</translation>
</message>
<message>
<location line="+1"/>
<location filename="../tools/linguist/linguist/mainwindow.ui"/>
<source>&amp;Release All</source>
- <translation type="unfinished"></translation>
+ <translation>Alles f&amp;reigeben</translation>
</message>
<message>
<location line="+1"/>
<source>Close All</source>
- <translation type="unfinished">Alle schließen</translation>
+ <translation>Alle schließen</translation>
</message>
<message>
<location line="+23"/>
<source>Translation File &amp;Settings for &apos;%1&apos;...</source>
- <translation type="unfinished"></translation>
+ <translation>Einstellungen der Übersetzungs&amp;datei für &apos;%1&apos;...</translation>
</message>
<message>
<location line="+1"/>
<source>&amp;Batch Translation of &apos;%1&apos;...</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Automatische Übersetzung von &apos;%1&apos;...</translation>
</message>
<message>
<location line="+1"/>
<source>Search And &amp;Translate in &apos;%1&apos;...</source>
- <translation type="unfinished"></translation>
+ <translation>Suchen und &amp;Übersetzen in &apos;%1&apos;...</translation>
</message>
<message>
<location line="+4"/>
<source>Search And &amp;Translate...</source>
- <translation type="unfinished"></translation>
+ <translation>Suchen und &amp;Übersetzen...</translation>
</message>
<message>
<location line="+51"/>
@@ -1617,37 +1622,37 @@ Alle Dateien (*)</translation>
<message>
<location line="+84"/>
<source>Cannot read from phrase book &apos;%1&apos;.</source>
- <translation type="unfinished">Kann Wörterbuch &apos;%1&apos; nicht lesen.</translation>
+ <translation>Kann Wörterbuch &apos;%1&apos; nicht lesen.</translation>
</message>
<message>
<location line="+15"/>
<source>Close this phrase book.</source>
- <translation type="unfinished">Schließe dieses Wörterbuch.</translation>
+ <translation>Schließe dieses Wörterbuch.</translation>
</message>
<message>
<location line="+4"/>
<source>Enables you to add, modify, or delete entries in this phrase book.</source>
- <translation type="unfinished"></translation>
+ <translation>Erlaubt das Hinzufügen, Ändern und Entfernen von Einträgen aus dem Wörterbuch.</translation>
</message>
<message>
<location line="+5"/>
<source>Print the entries in this phrase book.</source>
- <translation type="unfinished"></translation>
+ <translation>Drucke die Einträge des Wörterbuchs.</translation>
</message>
<message>
<location line="+16"/>
<source>Cannot create phrase book &apos;%1&apos;.</source>
- <translation type="unfinished">Kann Wörterbuch &apos;%1&apos; nicht erzeugen.</translation>
+ <translation>Kann Wörterbuch &apos;%1&apos; nicht erzeugen.</translation>
</message>
<message>
<location line="+10"/>
<source>Do you want to save phrase book &apos;%1&apos;?</source>
- <translation type="unfinished"></translation>
+ <translation>Möchten Sie das Wörterbuch &apos;%1&apos; speichern?</translation>
</message>
<message>
<location line="+314"/>
<source>All</source>
- <translation type="unfinished"></translation>
+ <translation>Alle</translation>
</message>
<message>
<location filename="../tools/linguist/linguist/mainwindow.ui"/>
@@ -1704,27 +1709,27 @@ Alle Dateien (*)</translation>
<message>
<location filename="../tools/linguist/linguist/messageeditor.cpp" line="+72"/>
<source>German</source>
- <translation type="unfinished">Deutsch</translation>
+ <translation>Deutsch</translation>
</message>
<message>
<location line="+1"/>
<source>Japanese</source>
- <translation type="unfinished">Japanisch</translation>
+ <translation>Japanisch</translation>
</message>
<message>
<location line="+1"/>
<source>French</source>
- <translation type="unfinished">Französisch</translation>
+ <translation>Französisch</translation>
</message>
<message>
<location line="+1"/>
<source>Polish</source>
- <translation type="unfinished">Polnisch</translation>
+ <translation>Polnisch</translation>
</message>
<message>
<location line="+1"/>
<source>Chinese</source>
- <translation type="unfinished">Chinesisch</translation>
+ <translation>Chinesisch</translation>
</message>
<message>
<location line="+50"/>
@@ -1732,59 +1737,59 @@ Alle Dateien (*)</translation>
<translation>Dieser Bereich erlaubt die Darstellung und Änderung der Übersetzung eines Textes.</translation>
</message>
<message>
- <location line="+25"/>
+ <location line="+18"/>
<source>Source text</source>
- <translation type="unfinished">Ursprungstext</translation>
+ <translation>Ursprungstext</translation>
</message>
<message>
<location line="+2"/>
<source>This area shows the source text.</source>
- <translation type="unfinished">Dieser Bereich zeigt den Ursprungstext.</translation>
+ <translation>Dieser Bereich zeigt den Ursprungstext.</translation>
</message>
<message>
<location line="+3"/>
<source>Source text (Plural)</source>
- <translation type="unfinished"></translation>
+ <translation>Ursprungstext (Plural)</translation>
</message>
<message>
<location line="+2"/>
<source>This area shows the plural form of the source text.</source>
- <translation type="unfinished"></translation>
+ <translation>Dieser Bereich zeigt die Pluralform des Ursprungstexts.</translation>
</message>
<message>
<location line="+3"/>
<source>Developer comments</source>
- <translation type="unfinished"></translation>
+ <translation>Hinweise des Entwicklers</translation>
</message>
<message>
<location line="+3"/>
<source>This area shows a comment that may guide you, and the context in which the text occurs.</source>
- <translation type="unfinished">Dieser Bereich zeigt eventuelle Kommentare und den Kontext, in dem der Text auftritt.</translation>
+ <translation>Dieser Bereich zeigt eventuelle Kommentare und den Kontext, in dem der Text auftritt.</translation>
</message>
<message>
<location line="+59"/>
<source>Here you can enter comments for your own use. They have no effect on the translated applications.</source>
- <translation type="unfinished"></translation>
+ <translation>Hier können Sie Hinweise für den eigenen Gebrauch eintragen. Diese haben keinen Einflusse auf die Übersetzung.</translation>
</message>
<message>
<location line="+205"/>
<source>%1 translation (%2)</source>
- <translation type="unfinished">Übersetzung %1 (%2)</translation>
+ <translation>Übersetzung %1 (%2)</translation>
</message>
<message>
<location line="+19"/>
<source>This is where you can enter or modify the translation of the above source text.</source>
- <translation type="unfinished"></translation>
+ <translation>Hier können Sie die Übersetzung des Ursprungstextes eingeben bzw. ändern.</translation>
</message>
<message>
<location line="+5"/>
<source>%1 translation</source>
- <translation type="unfinished">Übersetzung %1</translation>
+ <translation>Übersetzung %1</translation>
</message>
<message>
<location line="+1"/>
<source>%1 translator comments</source>
- <translation type="unfinished"></translation>
+ <translation>%1 Hinweise des Übersetzers</translation>
</message>
<message>
<location line="+138"/>
@@ -1839,22 +1844,22 @@ Zeile: %2</translation>
<message>
<location filename="../tools/linguist/linguist/messagemodel.cpp" line="+832"/>
<source>Completion status for %1</source>
- <translation type="unfinished"></translation>
+ <translation>Bearbeitungsstand von %1</translation>
</message>
<message>
<location line="+15"/>
<source>&lt;file header&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;Dateikopf&gt;</translation>
</message>
<message>
<location line="+2"/>
<source>&lt;context comment&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;Kontexthinweis&gt;</translation>
</message>
<message>
<location line="+71"/>
<source>&lt;unnamed context&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;unbenannter Kontext&gt;</translation>
</message>
</context>
<context>
@@ -1867,7 +1872,7 @@ Zeile: %2</translation>
<context>
<name>MsgEdit</name>
<message>
- <location filename="../tools/linguist/linguist/messageeditor.cpp" line="-579"/>
+ <location filename="../tools/linguist/linguist/messageeditor.cpp" line="-572"/>
<source></source>
<comment>This is the right panel of the main window.</comment>
<translation></translation>
@@ -1912,7 +1917,7 @@ Zeile: %2</translation>
<message>
<location/>
<source>This window allows you to add, modify, or delete entries in a phrase book.</source>
- <translation type="unfinished"></translation>
+ <translation>Dieses Fenster erlaubt das Hinzufügen, Ändern und Entfernen von Einträgen aus dem Wörterbuch.</translation>
</message>
<message>
<location/>
@@ -1952,22 +1957,22 @@ Zeile: %2</translation>
<message>
<location/>
<source>&amp;New Entry</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Neuer Eintrag</translation>
</message>
<message>
<location/>
<source>Click here to remove the entry from the phrase book.</source>
- <translation type="unfinished"></translation>
+ <translation>Entferne den Eintrag aus dem Wörterbuch.</translation>
</message>
<message>
<location/>
<source>&amp;Remove Entry</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Entferne Eintrag</translation>
</message>
<message>
<location/>
<source>Settin&amp;gs...</source>
- <translation type="unfinished"></translation>
+ <translation>&amp;Einstellungen...</translation>
</message>
<message>
<source>&amp;New Phrase</source>
@@ -2053,12 +2058,12 @@ Zeile: %2</translation>
<message>
<location filename="../tools/linguist/linguist/mainwindow.cpp" line="-1279"/>
<source>Translation files (%1);;</source>
- <translation type="unfinished"></translation>
+ <translation>Übersetzungsdateien (%1);;</translation>
</message>
<message>
<location line="+5"/>
<source>All files (*)</source>
- <translation type="unfinished"></translation>
+ <translation>Alle Dateien (*)</translation>
</message>
<message>
<location filename="../tools/linguist/linguist/messagemodel.cpp" line="-1118"/>
@@ -2074,57 +2079,57 @@ Zeile: %2</translation>
<message>
<location filename="../tools/linguist/shared/cpp.cpp" line="+1072"/>
<source>C++ source files</source>
- <translation type="unfinished"></translation>
+ <translation>C++-Quelltextdateien&apos;</translation>
</message>
<message>
<location filename="../tools/linguist/shared/java.cpp" line="+646"/>
<source>Java source files</source>
- <translation type="unfinished"></translation>
+ <translation>Java-Quelltextdateien</translation>
</message>
<message>
<location filename="../tools/linguist/shared/po.cpp" line="+651"/>
<source>GNU Gettext localization files</source>
- <translation type="unfinished"></translation>
+ <translation>GNU-Gettext Übersetzungsdateien</translation>
</message>
<message>
<location filename="../tools/linguist/shared/qscript.cpp" line="+2399"/>
<source>Qt Script source files</source>
- <translation type="unfinished"></translation>
+ <translation>Qt-Skript-Quelltextdateien</translation>
</message>
<message>
<location filename="../tools/linguist/shared/ts.cpp" line="+752"/>
<source>Qt translation sources (format 1.1)</source>
- <translation type="unfinished"></translation>
+ <translation>Qt-Übersetzungsdateien (Formatversion 1.1)</translation>
</message>
<message>
<location line="+8"/>
<source>Qt translation sources (format 2.0)</source>
- <translation type="unfinished"></translation>
+ <translation>Qt-Übersetzungsdateien (Formatversion 2.0)</translation>
</message>
<message>
<location line="+9"/>
<source>Qt translation sources (latest format)</source>
- <translation type="unfinished"></translation>
+ <translation>Qt Übersetzungsdateien (aktuelles Format)</translation>
</message>
<message>
<location filename="../tools/linguist/shared/ui.cpp" line="+213"/>
<source>Qt Designer form files</source>
- <translation type="unfinished"></translation>
+ <translation>Qt Designer Formulardateien</translation>
</message>
<message>
<location line="+9"/>
<source>Qt Jambi form files</source>
- <translation type="unfinished"></translation>
+ <translation>Qt Jambi Formulardateien</translation>
</message>
<message>
<location filename="../tools/linguist/shared/xliff.cpp" line="+817"/>
<source>XLIFF localization files</source>
- <translation type="unfinished"></translation>
+ <translation>XLIFF Übersetzungsdateien</translation>
</message>
<message>
<location filename="../tools/linguist/shared/qph.cpp" line="+192"/>
<source>Qt Linguist &apos;Phrase Book&apos;</source>
- <translation type="unfinished"></translation>
+ <translation>Qt Linguist-Wörterbuch</translation>
</message>
</context>
<context>
@@ -2223,7 +2228,7 @@ Zeile: %2</translation>
<message>
<location/>
<source>Close</source>
- <translation type="unfinished">Schließen</translation>
+ <translation>Schließen</translation>
</message>
</context>
<context>
@@ -2727,27 +2732,27 @@ Alle Dateien (*)</translation>
<location line="+11"/>
<location line="+8"/>
<source>Settings for &apos;%1&apos; - Qt Linguist</source>
- <translation type="unfinished"></translation>
+ <translation>Einstellungen für &apos;%1&apos; - Qt Linguist</translation>
</message>
<message>
<location filename="../tools/linguist/linguist/translationsettings.ui"/>
<source>Source language</source>
- <translation type="unfinished"></translation>
+ <translation>Ursprungssprache</translation>
</message>
<message>
<location/>
<source>Language</source>
- <translation type="unfinished">Sprache</translation>
+ <translation>Sprache</translation>
</message>
<message>
<location/>
<source>Country/Region</source>
- <translation type="unfinished">Land/Region</translation>
+ <translation>Land/Region</translation>
</message>
<message>
<location/>
<source>Target language</source>
- <translation type="unfinished">Zielsprache</translation>
+ <translation>Zielsprache</translation>
</message>
</context>
<context>
diff --git a/translations/qt_de.qm b/translations/qt_de.qm
index 5d68bf7..9ea09a7 100644
--- a/translations/qt_de.qm
+++ b/translations/qt_de.qm
Binary files differ
diff --git a/translations/qt_de.ts b/translations/qt_de.ts
index 70cf6f3..33f9ea8 100644
--- a/translations/qt_de.ts
+++ b/translations/qt_de.ts
@@ -22,7 +22,7 @@
<context>
<name>CloseButton</name>
<message>
- <location filename="../src/gui/widgets/qtabbar.cpp" line="+2251"/>
+ <location filename="../src/gui/widgets/qtabbar.cpp" line="+2252"/>
<source>Close Tab</source>
<translation>Schließen</translation>
</message>
@@ -186,7 +186,7 @@ Bitte prüfen Sie die Gstreamer-Installation und stellen Sie sicher, dass das Pa
<context>
<name>Q3FileDialog</name>
<message>
- <location filename="../src/qt3support/dialogs/q3filedialog.cpp" line="+864"/>
+ <location filename="../src/qt3support/dialogs/q3filedialog.cpp" line="+865"/>
<source>Copy or Move a File</source>
<translation>Datei kopieren oder verschieben</translation>
</message>
@@ -203,7 +203,7 @@ Bitte prüfen Sie die Gstreamer-Installation und stellen Sie sicher, dass das Pa
</message>
<message>
<location line="-22"/>
- <location line="+1575"/>
+ <location line="+1579"/>
<source>Cancel</source>
<translation>Abbrechen</translation>
</message>
@@ -886,7 +886,7 @@ nach
<context>
<name>QApplication</name>
<message>
- <location filename="../src/gui/kernel/qapplication.cpp" line="+2248"/>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2247"/>
<source>QT_LAYOUT_DIRECTION</source>
<comment>Translate this string to the string &apos;LTR&apos; in left-to-right languages or to &apos;RTL&apos; in right-to-left languages (such as Hebrew and Arabic) to get proper widget layout.</comment>
<translation>LTR</translation>
@@ -1170,7 +1170,7 @@ nach
<context>
<name>QDialogButtonBox</name>
<message>
- <location filename="../src/gui/dialogs/qmessagebox.cpp" line="+1866"/>
+ <location filename="../src/gui/dialogs/qmessagebox.cpp" line="+1869"/>
<location line="+464"/>
<location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+561"/>
<source>OK</source>
@@ -1392,7 +1392,7 @@ nach
<message>
<location line="-108"/>
<source>Cannot remove source file</source>
- <translation type="unfinished"></translation>
+ <translation>Die Quelldatei kann nicht entfernt werden</translation>
</message>
<message>
<location line="+120"/>
@@ -1418,8 +1418,8 @@ nach
<context>
<name>QFileDialog</name>
<message>
- <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+515"/>
- <location line="+444"/>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="+514"/>
+ <location line="+447"/>
<source>All Files (*)</source>
<translation>Alle Dateien (*)</translation>
</message>
@@ -1448,7 +1448,7 @@ nach
<translation>Datei</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-461"/>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-464"/>
<source>Open</source>
<translation>Öffnen</translation>
</message>
@@ -1458,26 +1458,26 @@ nach
<translation>Speichern unter</translation>
</message>
<message>
- <location line="+678"/>
+ <location line="+681"/>
<location line="+50"/>
- <location line="+1471"/>
+ <location line="+1467"/>
<location line="+75"/>
<source>&amp;Open</source>
<translation>&amp;Öffnen</translation>
</message>
<message>
- <location line="-1596"/>
+ <location line="-1592"/>
<location line="+50"/>
<source>&amp;Save</source>
<translation>S&amp;peichern</translation>
</message>
<message>
- <location line="+1822"/>
+ <location line="+1818"/>
<source>Recent Places</source>
<translation>Zuletzt besucht</translation>
</message>
<message>
- <location line="-2521"/>
+ <location line="-2520"/>
<source>&amp;Rename</source>
<translation>&amp;Umbenennen</translation>
</message>
@@ -1492,17 +1492,17 @@ nach
<translation>&amp;Versteckte Dateien anzeigen</translation>
</message>
<message>
- <location line="+1964"/>
+ <location line="+1963"/>
<source>New Folder</source>
<translation>Neues Verzeichnis</translation>
</message>
<message>
- <location line="-1999"/>
+ <location line="-1998"/>
<source>Find Directory</source>
<translation>Verzeichnis suchen</translation>
</message>
<message>
- <location line="+685"/>
+ <location line="+688"/>
<source>Directories</source>
<translation>Verzeichnisse</translation>
</message>
@@ -1512,13 +1512,13 @@ nach
<translation>Alle Dateien (*.*)</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-644"/>
- <location line="+648"/>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-647"/>
+ <location line="+651"/>
<source>Directory:</source>
<translation>Verzeichnis:</translation>
</message>
<message>
- <location line="+828"/>
+ <location line="+825"/>
<source>%1 already exists.
Do you want to replace it?</source>
<translation>Die Datei %1 existiert bereits.
@@ -1552,7 +1552,7 @@ Stellen Sie sicher, dass der Dateiname richtig ist.</translation>
</message>
<message>
<location filename="../src/gui/dialogs/qfiledialog.cpp" line="-54"/>
- <location line="+862"/>
+ <location line="+861"/>
<source>%1
Directory not found.
Please verify the correct directory name was given.</source>
@@ -1588,7 +1588,7 @@ Möchten sie die Datei trotzdem löschen?</translation>
<translation>Unbekannt</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-2118"/>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-2117"/>
<source>Show </source>
<translation>Anzeigen </translation>
</message>
@@ -1604,19 +1604,19 @@ Möchten sie die Datei trotzdem löschen?</translation>
<translation>&amp;Neues Verzeichnis</translation>
</message>
<message>
- <location line="+656"/>
+ <location line="+659"/>
<location line="+38"/>
<source>&amp;Choose</source>
<translation>&amp;Auswählen</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qsidebar.cpp" line="+418"/>
+ <location filename="../src/gui/dialogs/qsidebar.cpp" line="+437"/>
<source>Remove</source>
<translation>Löschen</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-687"/>
- <location line="+652"/>
+ <location filename="../src/gui/dialogs/qfiledialog.cpp" line="-690"/>
+ <location line="+655"/>
<source>File &amp;name:</source>
<translation>Datei&amp;name:</translation>
</message>
@@ -1698,7 +1698,7 @@ Möchten sie die Datei trotzdem löschen?</translation>
<translation>Änderungsdatum</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qfilesystemmodel_p.h" line="+234"/>
+ <location filename="../src/gui/dialogs/qfilesystemmodel_p.h" line="+242"/>
<source>My Computer</source>
<translation>Mein Computer</translation>
</message>
@@ -2161,7 +2161,7 @@ Möchten sie die Datei trotzdem löschen?</translation>
<context>
<name>QHttp</name>
<message>
- <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+876"/>
+ <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+901"/>
<location filename="../src/qt3support/network/q3http.cpp" line="+1836"/>
<source>Connection refused</source>
<translation>Verbindung verweigert</translation>
@@ -2253,7 +2253,7 @@ Möchten sie die Datei trotzdem löschen?</translation>
<message>
<location line="+28"/>
<source>Unknown authentication method</source>
- <translation type="unfinished"></translation>
+ <translation>Unbekannte Authentifizierungsmethode</translation>
</message>
<message>
<location line="+97"/>
@@ -2365,7 +2365,7 @@ Möchten sie die Datei trotzdem löschen?</translation>
<context>
<name>QIBaseDriver</name>
<message>
- <location filename="../src/sql/drivers/ibase/qsql_ibase.cpp" line="+1428"/>
+ <location filename="../src/sql/drivers/ibase/qsql_ibase.cpp" line="+1435"/>
<source>Error opening database</source>
<translation>Die Datenbankverbindung konnte nicht geöffnet werden</translation>
</message>
@@ -2643,7 +2643,7 @@ Möchten sie die Datei trotzdem löschen?</translation>
<name>QLocalServer</name>
<message>
<location filename="../src/network/socket/qlocalserver.cpp" line="+226"/>
- <location filename="../src/network/socket/qlocalserver_unix.cpp" line="+231"/>
+ <location filename="../src/network/socket/qlocalserver_unix.cpp" line="+233"/>
<source>%1: Name error</source>
<translation>%1: Fehlerhafter Name</translation>
</message>
@@ -2738,7 +2738,7 @@ Möchten sie die Datei trotzdem löschen?</translation>
<context>
<name>QMYSQLDriver</name>
<message>
- <location filename="../src/sql/drivers/mysql/qsql_mysql.cpp" line="+1231"/>
+ <location filename="../src/sql/drivers/mysql/qsql_mysql.cpp" line="+1252"/>
<source>Unable to open database &apos;</source>
<translation>Die Datenbankverbindung konnte nicht geöffnet werden &apos;</translation>
</message>
@@ -2766,12 +2766,12 @@ Möchten sie die Datei trotzdem löschen?</translation>
<context>
<name>QMYSQLResult</name>
<message>
- <location line="-922"/>
+ <location line="-935"/>
<source>Unable to fetch data</source>
<translation>Es konnten keine Daten abgeholt werden</translation>
</message>
<message>
- <location line="+176"/>
+ <location line="+183"/>
<source>Unable to execute query</source>
<translation>Die Abfrage konnte nicht ausgeführt werden</translation>
</message>
@@ -2781,13 +2781,13 @@ Möchten sie die Datei trotzdem löschen?</translation>
<translation>Das Ergebnis konnte nicht gespeichert werden</translation>
</message>
<message>
- <location line="+190"/>
+ <location line="+194"/>
<location line="+8"/>
<source>Unable to prepare statement</source>
<translation>Der Befehl konnte nicht initialisiert werden</translation>
</message>
<message>
- <location line="+34"/>
+ <location line="+36"/>
<source>Unable to reset statement</source>
<translation>Der Befehl konnte nicht zurückgesetzt werden</translation>
</message>
@@ -2813,7 +2813,7 @@ Möchten sie die Datei trotzdem löschen?</translation>
<translation>Die Ergebnisse des Befehls konnten nicht gespeichert werden</translation>
</message>
<message>
- <location line="-253"/>
+ <location line="-257"/>
<source>Unable to execute next query</source>
<translation>Die folgende Abfrage kann nicht ausgeführt werden</translation>
</message>
@@ -2971,7 +2971,7 @@ Möchten sie die Datei trotzdem löschen?</translation>
<translation type="obsolete">&lt;p&gt;Dieses Programm verwendet Qt-Version %1.&lt;/p&gt;</translation>
</message>
<message>
- <location line="-1097"/>
+ <location line="-1100"/>
<source>Show Details...</source>
<translation>Details einblenden...</translation>
</message>
@@ -2981,7 +2981,7 @@ Möchten sie die Datei trotzdem löschen?</translation>
<translation>Details ausblenden...</translation>
</message>
<message>
- <location line="+1570"/>
+ <location line="+1573"/>
<source>&lt;h3&gt;About Qt&lt;/h3&gt;&lt;p&gt;This program uses Qt version %1.&lt;/p&gt;&lt;p&gt;Qt is a C++ toolkit for cross-platform application development.&lt;/p&gt;&lt;p&gt;Qt provides single-source portability across MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux, and all major commercial Unix variants. Qt is also available for embedded devices as Qt for Embedded Linux and Qt for Windows CE.&lt;/p&gt;&lt;p&gt;Qt is available under three different licensing options designed to accommodate the needs of our various users.&lt;/p&gt;Qt licensed under our commercial license agreement is appropriate for development of proprietary/commercial software where you do not want to share any source code with third parties or otherwise cannot comply with the terms of the GNU LGPL version 2.1 or GNU GPL version 3.0.&lt;/p&gt;&lt;p&gt;Qt licensed under the GNU LGPL version 2.1 is appropriate for the development of Qt applications (proprietary or open source) provided you can comply with the terms and conditions of the GNU LGPL version 2.1.&lt;/p&gt;&lt;p&gt;Qt licensed under the GNU General Public License version 3.0 is appropriate for the development of Qt applications where you wish to use such applications in combination with software subject to the terms of the GNU GPL version 3.0 or where you are otherwise willing to comply with the terms of the GNU GPL version 3.0.&lt;/p&gt;&lt;p&gt;Please see &lt;a href=&quot;http://www.qtsoftware.com/products/licensing&quot;&gt;www.qtsoftware.com/products/licensing&lt;/a&gt; for an overview of Qt licensing.&lt;/p&gt;&lt;p&gt;Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).&lt;/p&gt;&lt;p&gt;Qt is a Nokia product. See &lt;a href=&quot;http://www.qtsoftware.com/qt/&quot;&gt;www.qtsoftware.com/qt&lt;/a&gt; for more information.&lt;/p&gt;</source>
<translation type="unfinished"></translation>
</message>
@@ -3310,7 +3310,7 @@ Möchten sie die Datei trotzdem löschen?</translation>
<context>
<name>QODBCDriver</name>
<message>
- <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="+1785"/>
+ <location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="+1781"/>
<source>Unable to connect</source>
<translation>Es kann keine Verbindung aufgebaut werden</translation>
</message>
@@ -3444,7 +3444,7 @@ Möchten sie die Datei trotzdem löschen?</translation>
<context>
<name>QPPDOptionsModel</name>
<message>
- <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="+1195"/>
+ <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="+1197"/>
<source>Name</source>
<translation>Name</translation>
</message>
@@ -4009,7 +4009,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>Benutzerdefiniert</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-522"/>
+ <location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-524"/>
<location line="+68"/>
<source>&amp;Options &gt;&gt;</source>
<translation>&amp;Einstellungen &gt;&gt;</translation>
@@ -4030,7 +4030,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>Druck in Postscript-Datei</translation>
</message>
<message>
- <location line="+45"/>
+ <location line="+47"/>
<source>Local file</source>
<translation>Lokale Datei</translation>
</message>
@@ -4040,7 +4040,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>Schreiben der Datei %1</translation>
</message>
<message>
- <location line="-367"/>
+ <location line="-369"/>
<source>&amp;Print</source>
<translation>&amp;Drucken</translation>
</message>
@@ -4373,7 +4373,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<message>
<location line="+912"/>
<source>No program defined</source>
- <translation type="unfinished"></translation>
+ <translation>Es wurde kein Programm angegeben</translation>
</message>
<message>
<location filename="../src/corelib/io/qprocess_win.cpp" line="-341"/>
@@ -5985,7 +5985,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>%1 (%2x%3 Pixel)</translation>
</message>
<message>
- <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+382"/>
+ <location filename="../src/3rdparty/webkit/WebCore/platform/network/qt/QNetworkReplyHandler.cpp" line="+384"/>
<source>Bad HTTP request</source>
<translation>Ungültige HTTP-Anforderung</translation>
</message>
@@ -6077,15 +6077,15 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<message>
<location line="+15"/>
<source>JavaScript Confirm - %1</source>
- <translation type="unfinished">JavaScript-Bestätigung - %1</translation>
+ <translation>JavaScript-Bestätigung - %1</translation>
</message>
<message>
<location line="+17"/>
<source>JavaScript Prompt - %1</source>
- <translation type="unfinished">JavaScript-Eingabeaufforderung - %1</translation>
+ <translation>JavaScript-Eingabeaufforderung - %1</translation>
</message>
<message>
- <location line="+333"/>
+ <location line="+340"/>
<source>Move the cursor to the next character</source>
<translation>Positionsmarke auf folgendes Zeichen setzen</translation>
</message>
@@ -6147,7 +6147,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<message>
<location line="+3"/>
<source>Select all</source>
- <translation type="unfinished"></translation>
+ <translation>Alles auswählen</translation>
</message>
<message>
<location line="+3"/>
@@ -6222,12 +6222,12 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<message>
<location line="+33"/>
<source>Insert a new paragraph</source>
- <translation type="unfinished"></translation>
+ <translation>Neuen Abschnitt einfügen</translation>
</message>
<message>
<location line="+3"/>
<source>Insert a new line</source>
- <translation type="unfinished"></translation>
+ <translation>Neue Zeile einfügen</translation>
</message>
</context>
<context>
@@ -6241,7 +6241,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<context>
<name>QWidget</name>
<message>
- <location filename="../src/gui/kernel/qwidget.cpp" line="+5326"/>
+ <location filename="../src/gui/kernel/qwidget.cpp" line="+5340"/>
<source>*</source>
<translation>*</translation>
</message>
@@ -6787,7 +6787,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<translation>%1 ist kein gültiger regulärer Ausdruck: %2</translation>
</message>
<message>
- <location filename="../src/xmlpatterns/functions/qsequencefns.cpp" line="+347"/>
+ <location filename="../src/xmlpatterns/functions/qsequencefns.cpp" line="+346"/>
<source>It will not be possible to retrieve %1.</source>
<translation>%1 kann nicht bestimmt werden.</translation>
</message>
@@ -7508,7 +7508,7 @@ Bitte wählen Sie einen anderen Dateinamen.</translation>
<message>
<location filename="../src/xmlpatterns/expr/qcomputednamespaceconstructor.cpp" line="+69"/>
<source>In a namespace constructor, the value for a namespace cannot be an empty string.</source>
- <translation type="unfinished"></translation>
+ <translation>Im Konstruktor eines Namensraums darf der Wert des Namensraumes keine leere Zeichenkette sein.</translation>
</message>
<message>
<location line="+11"/>
diff --git a/translations/qt_help_de.qm b/translations/qt_help_de.qm
index e28a97e..e3d8d87 100644
--- a/translations/qt_help_de.qm
+++ b/translations/qt_help_de.qm
Binary files differ
diff --git a/translations/qt_help_de.ts b/translations/qt_help_de.ts
index ed8a3c3..8f67ec3 100644
--- a/translations/qt_help_de.ts
+++ b/translations/qt_help_de.ts
@@ -39,7 +39,7 @@
<message>
<location line="+22"/>
<source>Cannot load sqlite database driver!</source>
- <translation type="unfinished"></translation>
+ <translation>Der Datenbanktreiber für SQLite kann nicht geladen werden!</translation>
</message>
<message>
<location line="+11"/>
diff --git a/util/install/archive/archive.pro b/util/install/archive/archive.pro
deleted file mode 100644
index e313a4a..0000000
--- a/util/install/archive/archive.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = lib
-CONFIG += staticlib
-CONFIG += qt x11
-CONFIG -= dll
-TARGET = arq
-
-SOURCES += qarchive.cpp ../keygen/keyinfo.cpp
-HEADERS += qarchive.h
-!zlib:unix:LIBS += -lz
diff --git a/util/install/archive/qarchive.cpp b/util/install/archive/qarchive.cpp
deleted file mode 100644
index dd51c65..0000000
--- a/util/install/archive/qarchive.cpp
+++ /dev/null
@@ -1,471 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "qarchive.h"
-#include <qdatastream.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qapplication.h>
-#include "../../../src/3rdparty/zlib/zlib.h"
-#include "../keygen/keyinfo.h"
-#ifdef Q_OS_UNIX
-# include <sys/stat.h>
-# include <unistd.h>
-# include <sys/types.h>
-# include <utime.h>
-#endif
-
-enum ChunkType {
- ChunkDirectory = 0,
- ChunkFile = 1,
- ChunkSymlink = 2,
- ChunkBeginHeader = 3,
- ChunkEndHeader = 4
-};
-
-static bool createDir( const QString& fullPath )
-{
- QStringList hierarchy = QStringList::split( QDir::separator(), fullPath );
- QString pathComponent, tmpPath;
- QDir dirTmp;
-#ifdef Q_OS_UNIX
- dirTmp = "/";
-#endif
-
- for( QStringList::Iterator it = hierarchy.begin(); it != hierarchy.end(); ++it ) {
- pathComponent = *it + QDir::separator();
- tmpPath += pathComponent;
- if (!dirTmp.exists(tmpPath) && !dirTmp.mkdir(tmpPath))
- return false;
- }
- return true;
-}
-
-QArchive::QArchive( const QString& archivePath )
-{
- setPath( archivePath );
-
- bufferSize = 512 * 1024;
-}
-
-QArchive::~QArchive()
-{
-}
-
-void QArchive::setPath( const QString& archivePath )
-{
- QString fullName = archivePath;
- if( fullName.right( 4 ) != ".arq" )
- fullName += ".arq";
- arcFile.setName( fullName );
-}
-
-bool QArchive::open( int mode )
-{
- switch( mode ) {
- case IO_ReadOnly:
- // Fallthrough intentional
- case IO_WriteOnly:
- if( arcFile.open( mode ) )
- return true;
- break;
- }
- return false;
-}
-
-void QArchive::close()
-{
- if( arcFile.isOpen() )
- arcFile.close();
-}
-
-bool QArchive::writeFile( const QString& fileName, const QString& localPath )
-{
- if( arcFile.isOpen() ) {
- QDataStream outStream( &arcFile );
- QFileInfo fi( fileName );
-
- QFile inFile( fi.absFilePath() );
- QByteArray inBuffer;
- QByteArray outBuffer( bufferSize );
- z_stream ztream;
- bool continueCompressing;
-
- if(symbolicLinks() && fi.isSymLink()) {
- outStream << (int)ChunkSymlink;
- outStream << fi.fileName().latin1();
- outStream << fi.readLink().latin1();
- } else if( inFile.open( IO_ReadOnly ) ) {
- if( inBuffer.resize( fi.size() ) ) {
- outStream << (int)ChunkFile;
- outStream << fi.fileName().latin1();
- outStream << fi.lastModified();
- {
- int perm = -1;
-#ifdef Q_OS_UNIX
- struct stat st;
- if(!::stat(fi.filePath().latin1(), &st))
- perm = (int)st.st_mode;
-#endif
- outStream << perm;
- }
- if( verbosityMode & Source )
- emit operationFeedback( "Deflating " + fi.absFilePath() + "..." );
- else if( verbosityMode & Destination )
- emit operationFeedback( "Deflating " + localPath + "/" + fi.fileName() + "..." );
- ztream.next_in = (unsigned char*)inBuffer.data();
- ztream.avail_in = inBuffer.size();
- ztream.total_in = 0;
- ztream.next_out = (unsigned char*)outBuffer.data();
- ztream.avail_out = outBuffer.size();
- ztream.total_out = 0;
- ztream.msg = NULL;
- ztream.zalloc = (alloc_func)NULL;
- ztream.zfree = (free_func)NULL;
- ztream.opaque = (voidpf)NULL;
- ztream.data_type = Z_BINARY;
- deflateInit( &ztream, 9 );
- if ( inBuffer.data() )
- inFile.readBlock( inBuffer.data(), inBuffer.size() );
-
- continueCompressing = true;
- while( continueCompressing ) {
- if(qApp)
- qApp->processEvents();
- continueCompressing = ( deflate( &ztream, Z_FINISH ) == Z_OK );
- if( !ztream.avail_out ) {
- if( !outBuffer.resize( outBuffer.size() + bufferSize ) )
- qFatal( "Could not allocate compression buffer!" );
- ztream.next_out = (unsigned char*)&outBuffer.data()[ ztream.total_out ];
- ztream.avail_out = bufferSize;
- }
- }
-
- emit operationFeedback( QString( "done. %1 => %2 (%3%)\n" )
- .arg( ztream.total_in )
- .arg( ztream.total_out )
- .arg( int(
- double( ztream.total_out ) / double( ztream.total_in ) * 100 ) ) );
- deflateEnd( &ztream );
- // Now write the compressed data to the output
- outStream << ztream.total_out;
- outStream.writeRawBytes( outBuffer.data(), ztream.total_out );
- }
- inFile.close();
- return true;
- } else {
- return false;
- }
- }
- return false;
-}
-
-bool QArchive::setDirectory( const QString& dirName )
-{
- if( arcFile.isOpen() ) {
- QString fullName = dirName;
- QDataStream outStream( &arcFile );
- if( fullName.right( 1 ) != "/" )
- fullName += "/";
- outStream << (int)ChunkDirectory;
- outStream << fullName.latin1();
- return true;
- }
- return false;
-}
-
-bool QArchive::writeHeader( const QArchiveHeader header )
-{
- if( arcFile.isOpen() ) {
- QDataStream outStream( &arcFile );
- outStream << (int)ChunkBeginHeader;
- outStream << header.mayorVersion();
- outStream << header.minorVersion();
- outStream << header.features();
- outStream << header.description();
- outStream << header.extraData;
- outStream << (int)ChunkEndHeader;
- return true;
- }
- return false;
-}
-
-bool QArchive::writeDir( const QString &dirName1, bool includeLastComponent, const QString &localPath1 )
-{
- if( arcFile.isOpen() ) {
- QString localPath = localPath1, dirName = dirName1;
- if(localPath.right(1) == "/")
- localPath.truncate(localPath.length()-1);
- if(dirName.right(1) == "/")
- dirName.truncate(dirName.length()-1);
-
- QFileInfo fi( dirName );
-
- if( includeLastComponent )
- setDirectory( fi.fileName() );
- QDir dir( dirName );
- const QFileInfoList* dirEntries = dir.entryInfoList();
- QFileInfoListIterator dirIter( *dirEntries );
- QDataStream outStream( &arcFile );
- QFileInfo* pFi;
-
- dirIter.toLast();
- while( ( pFi = dirIter.current() ) ) {
- if( pFi->fileName() != "." && pFi->fileName() != ".." ) {
- if( pFi->isDir() )
- writeDir( pFi->absFilePath(), true, localPath + "/" +
- pFi->fileName() ); // Subdirs should always get its name in the archive.
- else
- writeFile( pFi->absFilePath(), localPath );
- }
- --dirIter;
- }
- setDirectory( ".." );
- return true;
- }
- return false;
-}
-
-bool QArchive::writeFileList( const QStringList fileList )
-{
- for( QStringList::ConstIterator it = fileList.begin(); it != fileList.end(); ++it ) {
- if( !writeFile( (*it) ) )
- return false;
- }
- return true;
-}
-
-bool QArchive::writeDirList( const QStringList dirList, bool includeLastComponent )
-{
- for( QStringList::ConstIterator it = dirList.begin(); it != dirList.end(); ++it ) {
- QString lastComponent = (*it).mid( (*it).findRev( "/" ) + 1 );
- if( !writeDir( (*it), includeLastComponent, lastComponent ) )
- return false;
- }
- return true;
-}
-
-void QArchive::setVerbosity( int verbosity )
-{
- verbosityMode = verbosity;
-}
-
-QArchiveHeader* QArchive::readArchiveHeader()
-{
- QDataStream inStream( &arcFile );
- return readArchiveHeader( &inStream );
-}
-
-/*
- Reads the archive header and returns it on success. If an error occurs, it
- returns 0. The caller has to delete the object.
-*/
-QArchiveHeader* QArchive::readArchiveHeader( QDataStream *inStream )
-{
- int chunktype;
- QArchiveHeader *header = new QArchiveHeader;
-
- *inStream >> chunktype;
- if( chunktype == ChunkBeginHeader ) {
- *inStream >> header->_mayorVersion;
- *inStream >> header->_minorVersion;
- if ( header->mayorVersion()!=1 || header->minorVersion()!=0 ) {
- emit operationFeedback( "Incompatible package version" );
- delete header;
- return 0;
- }
- *inStream >> header->_features;
- *inStream >> header->_description;
- *inStream >> header->extraData;
- *inStream >> chunktype;
- if ( chunktype != ChunkEndHeader ) {
- emit operationFeedback( "Invalid package header" );
- delete header;
- return 0;
- }
- } else {
- emit operationFeedback( "No package header found." );
- delete header;
- return 0;
- }
- return header;
-}
-
-bool QArchive::readArchive( const QString &outpath, const QString &key )
-{
- QDataStream inStream( &arcFile );
- return readArchive( &inStream, outpath, key );
-}
-
-bool QArchive::readArchive( QDataStream *inStream, const QString &outpath, const QString &key )
-{
- QDataStream outStream;
- QFile outFile;
- QDir outDir;
- QByteArray inBuffer;
- QByteArray outBuffer( bufferSize );
- z_stream ztream;
- bool continueDeCompressing;
- QString entryName, dirName, symName;
- int entryLength, chunktype;
-
- //get the key
- QArchiveHeader *header = readArchiveHeader( inStream );
- if ( header == 0 )
- return false;
- uint infeatures = featuresForKey( key );
- if( (header->features() & infeatures) != header->features()) {
- emit operationFeedback( "Invalid key" );
- return false;
- }
-
- // Set up the initial directory.
- // If the dir does not exist, try to create it
- dirName = QDir::toNativeSeparators( outpath );
- outDir.setPath( dirName );
- if( !outDir.exists( dirName ) && !createDir( dirName ) )
- return false;
- outDir.cd( dirName );
-
- while( !inStream->atEnd() ) {
- //get our type
- *inStream >> chunktype;
- if(chunktype == ChunkDirectory) {
- *inStream >> entryLength;
- inBuffer.resize( entryLength );
- inStream->readRawBytes( inBuffer.data(), entryLength );
- entryName = inBuffer.data();
-
- if( verbosityMode & Source )
- emit operationFeedback( "Directory " + entryName + "... " );
- if( entryName == "../" ) {
- outDir.cdUp();
- } else {
- dirName = QDir::toNativeSeparators( outDir.absPath() +
- QString( "/" ) + entryName.left( entryName.length() - 1 ) );
- if( verbosityMode & Destination )
- emit operationFeedback( "Directory " + dirName + "... " );
-
- if( !outDir.exists( dirName ) && !createDir( dirName ) ) {
- emit operationFeedback( "Cannot create directory: " + dirName );
- return false;
- }
- outDir.cd( dirName );
- }
- } else if(chunktype == ChunkFile) {
- *inStream >> entryLength;
- inBuffer.resize( entryLength );
- inStream->readRawBytes( inBuffer.data(), entryLength );
- entryName = inBuffer.data();
-
- int filePerm;
- QDateTime timeStamp;
- QString fileName = QDir::toNativeSeparators( outDir.absPath() + QString( "/" ) + entryName );
- outFile.setName( fileName );
- if( outFile.open( IO_WriteOnly ) ) {
- *inStream >> timeStamp; // Get timestamp from the archive
- *inStream >> filePerm;
- outStream.setDevice( &outFile );
- *inStream >> entryLength;
- if( verbosityMode & Source )
- emit operationFeedback( "Expanding " + entryName + "..." );
- else if( verbosityMode & Destination )
- emit operationFeedback( "Expanding " + fileName + "..." );
- inBuffer.resize( entryLength );
- inStream->readRawBytes( inBuffer.data(), entryLength );
- ztream.next_in = (unsigned char*)inBuffer.data();
- ztream.avail_in = entryLength;
- ztream.total_in = 0;
- ztream.msg = NULL;
- ztream.zalloc = (alloc_func)0;
- ztream.zfree = (free_func)0;
- ztream.opaque = (voidpf)0;
- ztream.data_type = Z_BINARY;
- inflateInit( &ztream );
- continueDeCompressing = true;
- while( continueDeCompressing ) {
- ztream.next_out = (unsigned char*)outBuffer.data();
- ztream.avail_out = outBuffer.size();
- ztream.total_out = 0;
- continueDeCompressing = ( inflate( &ztream, Z_NO_FLUSH ) == Z_OK );
- outStream.writeRawBytes( outBuffer.data(), ztream.total_out );
- }
- inflateEnd( &ztream );
- outFile.close();
-#ifdef Q_OS_UNIX
- QDateTime t; t.setTime_t(0); //epoch
- struct utimbuf tb;
- tb.actime = tb.modtime = t.secsTo(timeStamp);
- utime(fileName.local8Bit(), &tb);
- if(filePerm != -1)
- chmod(fileName.local8Bit(), (mode_t)filePerm);
-#endif
- } else {
- emit operationFeedback( "Cannot open: " + fileName );
- return false;
- }
- } else if(chunktype == ChunkSymlink) {
- *inStream >> entryLength;
- inBuffer.resize( entryLength );
- inStream->readRawBytes( inBuffer.data(), entryLength );
- entryName = inBuffer.data();
- QString fileName = QDir::toNativeSeparators( outDir.absPath() + QString( "/" ) + entryName );
-
- *inStream >> entryLength;
- inBuffer.resize( entryLength );
- inStream->readRawBytes( inBuffer.data(), entryLength );
- symName = inBuffer.data();
- if( verbosityMode & Source )
- emit operationFeedback( "Linking " + symName + "... " );
- else if( verbosityMode & Destination )
- emit operationFeedback( "Linking " + fileName + "... " );
-#ifdef Q_OS_UNIX
- symlink( symName.local8Bit(), fileName.local8Bit() );
-#endif
- } else {
- if( verbosityMode & Source )
- emit operationFeedback( QString("Unknown chunk: %d") .arg(chunktype) );
- }
- if( verbosityMode & Progress )
- emit operationFeedback( inStream->device()->at() );
- }
- return true;
-}
-
diff --git a/util/install/archive/qarchive.h b/util/install/archive/qarchive.h
deleted file mode 100644
index 351a48b..0000000
--- a/util/install/archive/qarchive.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef QARCHIVE_H
-#define QARCHIVE_H
-
-#include <qstring.h>
-#include <qfile.h>
-#include <qstringlist.h>
-#include <qobject.h>
-
-class QArchiveHeader
-{
-public:
- QArchiveHeader( uint feat, const QString& desc=QString(), uchar mayorVer = 1, uchar minorVer = 0 )
- : _features(feat), _description(desc), _mayorVersion(mayorVer), _minorVersion(minorVer)
- {}
-
- uint features() const
- { return _features; }
-
- QString description() const
- { return _description; }
-
- uchar mayorVersion() const
- { return _mayorVersion; }
-
- uchar minorVersion() const
- { return _minorVersion; }
-
- void addExtraData( const QString& key, const QString& value )
- { extraData.insert( key, value ); }
-
- QString findExtraData( const QString& key ) const
- { return extraData[key]; }
-
-private:
- QArchiveHeader()
- {}
-
- uint _features;
- QString _description;
- uchar _mayorVersion;
- uchar _minorVersion;
- QMap<QString,QString> extraData;
-
- friend class QArchive;
-};
-
-class QArchive : public QObject
-{
- Q_OBJECT
-public:
- QArchive( const QString& archivePath = QString() );
- ~QArchive();
-
- void setPath( const QString& archivePath );
- void setVerbosity( int verbosity );
-
- bool symbolicLinks() const { return doSyms; }
- void setSymbolicLinks(bool b) { doSyms = b; }
-
- bool open( int mode );
- void close();
- bool isOpen() { return arcFile.isOpen(); }
-
- bool writeHeader( const QArchiveHeader header );
- bool writeFile( const QString& fileName, const QString& localPath = QString() );
- bool writeFileList( const QStringList fileList );
- bool writeDir( const QString& dirName, bool includeLastComponent = false,
- const QString& localPath = QString() );
- bool writeDirList( const QStringList dirList, bool includeLastComponent = true );
-
- QArchiveHeader* readArchiveHeader();
- QArchiveHeader* readArchiveHeader( QDataStream *inStream );
-
- bool readArchive( const QString &outpath, const QString &key = QString() );
- bool readArchive( QDataStream *inStream, const QString &outpath, const QString &key = QString() );
-private:
- QFile arcFile;
-
- int bufferSize;
- int verbosityMode;
- uint doSyms : 1;
- bool setDirectory( const QString& dirName );
-signals:
- void operationFeedback( const QString& );
- void operationFeedback( int );
-
-public:
- enum {
- NoFeedback = 0x00,
- OnlyNames = 0x01,
- Verbose = 0x02,
- Source = 0x10,
- Destination = 0x20,
- Progress = 0x40
- };
-};
-
-#endif
diff --git a/util/install/configure_installer.cache b/util/install/configure_installer.cache
deleted file mode 100644
index 9427b74..0000000
--- a/util/install/configure_installer.cache
+++ /dev/null
@@ -1,30 +0,0 @@
--disable-table
--disable-iconview
--disable-workspace
--disable-xml
--disable-network
--disable-canvas
--disable-opengl
--disable-sql
--release
--static
--lean
--no-dsp
--no-thread
--no-accessibility
--qt-style-windowsxp
--no-style-motif
--no-style-cde
--no-style-sgi
--no-style-motifplus
--no-style-platinum
--no-big-codecs
--no-jpeg
--no-png
--spec win32-msvc
--saveconfig installer
--D QT_NO_COLORNAMES
--D QT_NO_BEZIER
--D QT_NO_EFFECTS
--D QT_NO_DIRECTPAINTER
--D QT_NO_SVG
diff --git a/util/install/install.pro b/util/install/install.pro
deleted file mode 100644
index 4106453..0000000
--- a/util/install/install.pro
+++ /dev/null
@@ -1,9 +0,0 @@
-TEMPLATE = subdirs
-CONFIG += ordered
-
-SUBDIRS += archive \
- package \
- keygen
-
-win32:SUBDIRS += win
-mac:SUBDIRS += mac
diff --git a/util/install/keygen/keygen.pro b/util/install/keygen/keygen.pro
deleted file mode 100644
index 59daf75..0000000
--- a/util/install/keygen/keygen.pro
+++ /dev/null
@@ -1,13 +0,0 @@
-CONFIG += qt console
-SOURCES += keyinfo.cpp
-keychk {
- TEMPLATE = lib
- TARGET = keychk
- DESTDIR = ../../../lib/
- CONFIG -= shared dll
- CONFIG += staticlib
-} else {
- TEMPLATE = app
- TARGET = keygen
- SOURCES += main.cpp
-} \ No newline at end of file
diff --git a/util/install/keygen/keyinfo.cpp b/util/install/keygen/keyinfo.cpp
deleted file mode 100644
index 9ad5404..0000000
--- a/util/install/keygen/keyinfo.cpp
+++ /dev/null
@@ -1,164 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qregexp.h>
-
-#include "keyinfo.h"
-
-// Magic values
-enum {
- ProductMagic = 0xB292,
- PlatformMagic = 0x5C7E,
- LicenseSchemaMagic = 0xE3B,
- LicenseIDMagic = 0xCE57,
- FeatureMagic = 0x4D5
-};
-
-static const char Xalphabet[] = "WX9MUEC7AJH3KS6DB4YFG2L5PQRT8VNZ";
-static const int XAlphabetSize = sizeof(Xalphabet) - 1;
-
-static QString encodeBaseX(uint k)
-{
- QString str;
- do {
- str += QChar(Xalphabet[ k % XAlphabetSize ]);
- k /= XAlphabetSize;
- } while (k > 0u);
- return str;
-}
-
-static uint decodeBaseX(const QString &str)
-{
- uint k = 0;
- int i = str.length();
- while (i > 0) {
- i--;
- const char *p = strchr(Xalphabet, str[i].unicode());
- if (p == 0) {
- return 0;
- } else {
- k = (k * XAlphabetSize) + (p - Xalphabet);
- }
- }
- return k;
-}
-
-static const QDate StartDate(2001, 1, 1);
-static const uint MaxDays = 4000;
-
-static QString encodedExpiryDate(const QDate &date)
-{
- uint days = StartDate.daysTo(date);
- if (days >= MaxDays)
- days = MaxDays - 1;
- uint x = (days << 7) ^ days;
- return encodeBaseX(x ^ 0x0000beef);
-}
-
-static QDate decodedExpiryDate(const QString &encodedDate)
-{
- QDate date;
- uint y = decodeBaseX(encodedDate);
- uint x = y ^ 0x0000beef;
- uint days = ( (x >> 7) ^ x ) >> 7;
- if (days >= MaxDays)
- return QDate();
- date = StartDate.addDays( days );
- if (encodedExpiryDate(date) != encodedDate)
- return QDate();
- return date;
-}
-
-bool decodeLicenseKey(const QString &licenseKey,
- uint *products,
- uint *platforms,
- uint *licenseSchema,
- uint *licenseFeatures,
- uint *licenseID,
- QDate *expiryDate)
-{
- QStringList licenseParts;
- int dash = -1;
- do {
- int start = dash + 1;
- dash = licenseKey.indexOf('-', start);
- licenseParts.append(licenseKey.mid(start, dash - start));
- } while (dash != -1);
-
- // license keys have 7 fields
- if (licenseParts.size() != 7) {
- // invalid key
- return false;
- }
- QString productPart = licenseParts.at(0);
- QString platformPart = licenseParts.at(1);
- QString licenseSchemaPart = licenseParts.at(2);
- QString licenseFeaturesPart = licenseParts.at(3);
- QString licenseIDPart = licenseParts.at(4);
- QString expiryDatePart = licenseParts.at(5);
- QString checksumPart = licenseParts.at(6);
- QString keyPart = productPart
- + '-' + platformPart
- + '-' + licenseSchemaPart
- + '-' + licenseFeaturesPart
- + '-' + licenseIDPart
- + '-' + expiryDatePart;
-
- // verify the crc
- QByteArray ba = keyPart.toLatin1();
- int crc = qChecksum(ba.constData(), ba.size());
- QString checksumVerification = QString("%1%2")
- .arg((crc & 0xff),2,16,QChar('0'))
- .arg((crc >> 8 & 0xff),2,16,QChar('0'))
- .toUpper();
- if (checksumPart != checksumVerification) {
- // invalid checksum
- return false;
- }
-
- *products = decodeBaseX(productPart) ^ ProductMagic;
- *platforms = decodeBaseX(platformPart) ^ PlatformMagic;
- *licenseSchema = decodeBaseX(licenseSchemaPart) ^ LicenseSchemaMagic;
- *licenseFeatures = decodeBaseX(licenseFeaturesPart) ^ FeatureMagic;
- *licenseID = decodeBaseX(licenseIDPart) ^ LicenseIDMagic;
- *expiryDate = decodedExpiryDate(expiryDatePart);
- return true;
-}
diff --git a/util/install/keygen/keyinfo.h b/util/install/keygen/keyinfo.h
deleted file mode 100644
index 9b3687a..0000000
--- a/util/install/keygen/keyinfo.h
+++ /dev/null
@@ -1,123 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef KEYINFO_H
-#define KEYINFO_H
-
-// Products
-enum {
- // the first 10 bits are reserved for Qt editions
- QtUniversal = 0x00000001,
- QtDesktop = 0x00000002,
- QtDesktopLight = 0x00000004,
- QtConsole = 0x00000008,
- QtDesignerOnly = 0x00000010,
- QtReserved1 = 0x00000020,
- QtReserved2 = 0x00000040,
- QtReserved3 = 0x00000080,
- QtReserved4 = 0x00000100,
- QtReserved5 = 0x00000200,
- QtProductMask = 0x000003ff,
-
- // the next 10 bits are reserved for Qtopia editions
- QtopiaPDA = 0x00000400,
- QtopiaPhone = 0x00000800,
- QtopiaRefboard = 0x00001000,
- QtopiaReserved1 = 0x00002000,
- QtopiaReserved2 = 0x00004000,
- QtopiaReserved3 = 0x00008000,
- QtopiaReserved4 = 0x00010000,
- QtopiaReserved5 = 0x00020000,
- QtopiaReserved6 = 0x00040000,
- QtopiaReserved7 = 0x00080000,
-
- // other products get the upper 12 bits
- Teambuilder = 0x00100000,
- Solutions = 0x00200000,
- QSA = 0x00400000,
- OtherReserved1 = 0x00800000,
- OtherReserved2 = 0x01000000,
- OtherReserved3 = 0x02000000,
- OtherReserved4 = 0x04000000,
- OtherReserved5 = 0x08000000,
- OtherReserved6 = 0x10000000,
- OtherReserved7 = 0x20000000,
- OtherReserved8 = 0x40000000,
- OtherReserved9 = 0x80000000,
-};
-
-// Platforms
-enum {
- PlatformX11 = 0x01,
- PlatformEmbedded = 0x02,
- PlatformWindows = 0x04,
- PlatformMac = 0x08
-};
-
-// LicenseSchema
-enum {
- SupportedEvaluation = 0x01,
- UnsupportedEvaluation = 0x02,
- FullSourceEvaluation = 0x04,
- FullCommercial = 0x08
-};
-
-// LicenseFeatures
-enum {
- USCustomer = 0x01
-};
-
-#include <qdatetime.h>
-#include <qstring.h>
-
-/*
- Decodes the \a licenseKey. This function returns true if 1) decoding
- was successful and 2) the checksum matches, otherwise it returns false.
-*/
-bool decodeLicenseKey(const QString &licenseKey,
- uint *products,
- uint *platforms,
- uint *licenseSchema,
- uint *licenseFeatures,
- uint *licenseID,
- QDate *expiryDate);
-
-#endif
diff --git a/util/install/keygen/main.cpp b/util/install/keygen/main.cpp
deleted file mode 100644
index b6eee41..0000000
--- a/util/install/keygen/main.cpp
+++ /dev/null
@@ -1,250 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <qfile.h>
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "keyinfo.h"
-
-static void printNewKey( uint features, const QDate& expiryDate )
-{
- QFile in;
- QFile out;
- QString fn;
- char block[10];
-
- fn.sprintf( "next.%.2x", features );
- in.setFileName( fn );
- if ( !in.open(QFile::ReadOnly) )
- return;
- int ent = QString( in.readAll() ).toInt();
- in.close();
-
- fn.sprintf( "table.%.2x", features );
- in.setFileName( fn );
- if ( !in.open(QFile::ReadOnly) )
- return;
- in.seek( ent * 10 );
- in.read( block, 9 );
- block[9] = '\0';
- in.close();
-
- ent++;
- if ( ent == (1 << NumRandomBits) )
- ent = 1; // skip first entry
-
- fn.sprintf( "next.%.2x", features );
- out.setFileName( fn );
- if ( !out.open(QFile::WriteOnly) )
- return;
- QString s = QString::number( ent ) + QChar( '\n' );
- out.write( s.toLocal8Bit(), s.length() );
- out.close();
-
- if ( strlen(block) == 9 && block[4] == '-' )
- printf( "%s%s\n", block, qPrintable(encodedExpiryDate(expiryDate)) );
-}
-
-static QString textForFeatures( uint features )
-{
- QString text;
-
- if ( (features & Feature_US) != 0 )
- text += QString( " -us" );
- if ( (features & Feature_Enterprise) != 0 )
- text += QString( " -enterprise" );
- if ( (features & Feature_Unix) != 0 )
- text += QString( " -unix" );
- if ( (features & Feature_Windows) != 0 )
- text += QString( " -windows" );
- if ( (features & Feature_Mac) != 0 )
- text += QString( " -mac" );
- if ( (features & Feature_Embedded) != 0 )
- text += QString( " -embedded" );
- if ( (features & Feature_Extra1) != 0 )
- text += QString( " -extra1" );
- if ( (features & Feature_Extra2) != 0 )
- text += QString( " -extra2" );
-
- text = text.trimmed();
- if ( text.isEmpty() )
- text = QString( "invalid key" );
- return text;
-}
-
-static QString textForDate( const QDate& date )
-{
- if ( date.isValid() ) {
- return date.toString( Qt::ISODate );
- } else {
- return QString( "invalid date" );
- }
-}
-
-static void reset()
-{
- for ( uint features = 0; features < (1 << NumFeatures); features++ ) {
- printf( "Resetting 'table.%.2x' and 'next.%.2x' (%s)\n", features,
- features, qPrintable(textForFeatures(features)) );
-
- QFile out;
- QString fn;
-
- fn.sprintf( "table.%.2x", features );
- out.setFileName( fn );
- if ( !out.open(QFile::WriteOnly) ) {
- fprintf( stderr, "Cannot open '%s' for writing\n", qPrintable(fn) );
- exit( EXIT_FAILURE );
- }
-
- for ( uint bits = 0; bits < (1 << NumRandomBits); bits++ ) {
- QString k = keyForFeatures( features, bits ) + QChar( '\n' );
- out.write( k.toLatin1(), k.length() );
-
- /*
- We check that the generated keys give access to the
- correct feature sets. This accounts for most of the
- processing time of the function.
- */
-#if 1
- if ( featuresForKey(k) != features ) {
- fprintf( stderr, "Internal error in featuresForKey(\"%s\")\n",
- qPrintable(k.trimmed()) );
- exit( EXIT_FAILURE );
- }
- if ( (features & ~(Feature_US | Feature_Enterprise |
- Feature_Unix)) == 0 ) {
- if ( featuresForKeyOnUnix(k) != features ) {
- fprintf( stderr,
- "Internal error in featuresForKeyOnUnix(\"%s\")\n",
- qPrintable(k.trimmed()) );
- exit( EXIT_FAILURE );
- }
- }
-#endif
- }
- out.close();
-
- fn.sprintf( "next.%.2x", features );
- out.setFileName( fn );
- if ( !out.open(QFile::WriteOnly) ) {
- fprintf( stderr, "Cannot open '%s' for writing\n", qPrintable(fn) );
- exit( EXIT_FAILURE );
- }
- out.write( "1\n", 2 ); // skip first key
- out.close();
- }
-}
-
-int main( int argc, char **argv )
-{
- if ( argc == 1 || (strcmp(argv[1], "check") != 0 &&
- strcmp(argv[1], "new") != 0 &&
- strcmp(argv[1], "reset") != 0) ) {
- fprintf( stderr, "Usage:\n"
- " keygen check <key>\n"
- " keygen new YYYY-MM-DD [-us] [-enterprise] [-unix]\n"
- " [-windows] [-mac] [-embedded] [-extra1] [-extra2]\n"
- " keygen reset\n" );
- exit( EXIT_FAILURE );
- }
-
- if ( strcmp(argv[1], "check") == 0 ) {
- if ( argc != 3 ) {
- fprintf( stderr, "Usage:\n"
- " mkcode check <key>\n" );
- exit( EXIT_FAILURE );
- }
-
- QString key( argv[2] );
-
- printf("Unix check: %s\n",
- qPrintable(textForFeatures(featuresForKeyOnUnix(QString(argv[2])))));
- printf("Full check: %s\n",
- qPrintable(textForFeatures(featuresForKey(QString(argv[2])))));
- if ( featuresForKey(QString(argv[2])) != 0 )
- printf("Expiry date: %s\n",
- qPrintable(textForDate(decodedExpiryDate(key.mid(9)))));
- } else if ( strcmp(argv[1], "new") == 0 ) {
- uint features = 0;
-
- if ( argc < 3 ) {
- fprintf( stderr, "Usage:\n"
- " mkcode new YYYY-MM-DD [features]\n" );
- exit( EXIT_FAILURE );
- }
-
- QDate expiryDate = QDate::fromString( QString(argv[2]), Qt::ISODate );
- if ( !expiryDate.isValid() ) {
- fprintf( stderr, "Date '%s' not in YYYY-MM-DD format\n", argv[2] );
- exit( EXIT_FAILURE );
- }
-
- for ( int i = 3; i < argc; i++ ) {
- if ( strcmp(argv[i], "-us") == 0 ) {
- features |= Feature_US;
- } else if ( strcmp(argv[i], "-enterprise") == 0 ) {
- features |= Feature_Enterprise;
- } else if ( strcmp(argv[i], "-unix") == 0 ) {
- features |= Feature_Unix;
- } else if ( strcmp(argv[i], "-windows") == 0 ) {
- features |= Feature_Windows;
- } else if ( strcmp(argv[i], "-mac") == 0 ) {
- features |= Feature_Mac;
- } else if ( strcmp(argv[i], "-embedded") == 0 ) {
- features |= Feature_Embedded;
- } else if ( strcmp(argv[i], "-extra1") == 0 ) {
- features |= Feature_Extra1;
- } else if ( strcmp(argv[i], "-extra2") == 0 ) {
- features |= Feature_Extra2;
- } else {
- fprintf( stderr, "Unknown flag '%s'\n", argv[i] );
- exit( EXIT_FAILURE );
- }
- }
- printNewKey( features, expiryDate );
- } else {
- reset();
- }
- return 0;
-}
diff --git a/util/install/mac/licensedlg.ui b/util/install/mac/licensedlg.ui
deleted file mode 100644
index a20bd44..0000000
--- a/util/install/mac/licensedlg.ui
+++ /dev/null
@@ -1,134 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>LicenseDialog</class>
-<widget class="QDialog">
- <property name="name">
- <cstring>LicenseDialog</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>582</width>
- <height>531</height>
- </rect>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="caption">
- <string>License Agreement</string>
- </property>
- <property name="sizeGripEnabled">
- <bool>true</bool>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QTextView">
- <property name="name">
- <cstring>licenseText</cstring>
- </property>
- <property name="text">
- <string>License text goes here</string>
- </property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout1</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer>
- <property name="name" stdset="0">
- <cstring>Horizontal Spacing2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="QPushButton">
- <property name="name">
- <cstring>buttonReject</cstring>
- </property>
- <property name="text">
- <string>Reject</string>
- </property>
- <property name="accel">
- <number>0</number>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- <property name="default">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>buttonAccept</cstring>
- </property>
- <property name="text">
- <string>Accept</string>
- </property>
- <property name="accel">
- <number>0</number>
- </property>
- <property name="autoDefault">
- <bool>true</bool>
- </property>
- </widget>
- </hbox>
- </widget>
- </vbox>
-</widget>
-<connections>
- <connection>
- <sender>buttonReject</sender>
- <signal>pressed()</signal>
- <receiver>LicenseDialog</receiver>
- <slot>reject()</slot>
- </connection>
- <connection>
- <sender>buttonAccept</sender>
- <signal>clicked()</signal>
- <receiver>LicenseDialog</receiver>
- <slot>reject()</slot>
- </connection>
- <connection>
- <sender>buttonAccept</sender>
- <signal>pressed()</signal>
- <receiver>LicenseDialog</receiver>
- <slot>accept()</slot>
- </connection>
-</connections>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/mac/licensedlgimpl.cpp b/util/install/mac/licensedlgimpl.cpp
deleted file mode 100644
index ed2998a..0000000
--- a/util/install/mac/licensedlgimpl.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "licensedlgimpl.h"
-#include <qfile.h>
-#include <qtextview.h>
-
-LicenseDialogImpl::LicenseDialogImpl( QWidget *parent )
- : LicenseDialog( parent )
-{
-}
-
-bool LicenseDialogImpl::showLicense( bool licenseUs )
-{
- QFile f;
- QString path = "qt-mac-commercial-3.0.0.app/Contents/Qt/LICENSE";
- if (licenseUs)
- path.append( "-US" );
- f.setName( path );
- if ( !f.open( IO_ReadOnly ) )
- return false;
-
- QTextStream ts( &f );
- licenseText->setText( ts.read() );
- return true;
-}
-
-
diff --git a/util/install/mac/licensedlgimpl.h b/util/install/mac/licensedlgimpl.h
deleted file mode 100644
index 90f8809..0000000
--- a/util/install/mac/licensedlgimpl.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef __LICENSEDLGIMPL_H__
-#define __LICENSEDLGIMPL_H__
-
-#include "licensedlg.h"
-
-class LicenseDialogImpl : public LicenseDialog
-{
- Q_OBJECT
-
-public:
- LicenseDialogImpl( QWidget* parent = 0 );
- bool showLicense( bool licenseUs );
-};
-
-#endif /* __LICENSEDLGIMPL_H__ */
diff --git a/util/install/mac/mac.pro b/util/install/mac/mac.pro
deleted file mode 100644
index ad13bea..0000000
--- a/util/install/mac/mac.pro
+++ /dev/null
@@ -1,11 +0,0 @@
-TEMPLATE = app
-TARGET = unpackage
-mac:TARGET = qt-mac-commercial-3.0.0
-mac:RC_FILE = unpackage.icns
-HEADERS = unpackdlgimpl.h licensedlgimpl.h
-SOURCES = main.cpp unpackdlgimpl.cpp licensedlgimpl.cpp
-INTERFACES += unpackdlg.ui licensedlg.ui
-INCLUDEPATH += ../archive ../keygen
-CONFIG += qt
-unix:LIBS += -L$$QT_BUILD_TREE/util/install/archive -larq
-
diff --git a/util/install/mac/main.cpp b/util/install/mac/main.cpp
deleted file mode 100644
index ede85a6..0000000
--- a/util/install/mac/main.cpp
+++ /dev/null
@@ -1,117 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "unpackdlgimpl.h"
-#include "qarchive.h"
-#include <qapplication.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-
-class ConsoleOutput : public QObject
-{
- Q_OBJECT
-public:
- ConsoleOutput() : QObject() { }
- ~ConsoleOutput() { }
-public slots:
- void updateProgress( const QString& str) { qDebug("%s", str.latin1()); }
-};
-#include "main.moc"
-
-static int usage(const char *argv0, const char *un=NULL) {
- if(un)
- fprintf(stderr, "Unknown command: %s\n", un);
- else
- fprintf(stderr, "Usage:\n");
- fprintf(stderr, "%s [options] files...\n", argv0);
-
- fprintf(stderr, "\nOptions:\n");
- fprintf(stderr, " -k [k] : Use k as the key to open provided files\n");
- fprintf(stderr, " -s : Quiet mode, will not output process\n");
- fprintf(stderr, " -h : This help\n");
- return 665;
-}
-
-int main( int argc, char** argv )
-{
- QString key;
- bool output = true;
- QStringList files;
- QApplication app( argc, argv );
- for(int i = 1; i < argc; i++) {
- //options
- if(!strcmp(argv[i], "-s"))
- output = false;
- else if(!strcmp(argv[i], "-k"))
- key = argv[++i];
- else if(!strcmp(argv[i], "-h"))
- return usage(argv[0]);
- //files
- else if(*(argv[i]) != '-')
- files.append(argv[i]);
- //unknown
- else
- return usage(argv[0], argv[i]);
- }
- if(!files.isEmpty()) {
- QArchive archive;
- ConsoleOutput out;
- QObject::connect( &archive, SIGNAL( operationFeedback( const QString& ) ),
- &out, SLOT( updateProgress( const QString& ) ) );
- if(output)
- archive.setVerbosity( QArchive::Destination | QArchive::Verbose );
- for(QStringList::Iterator it = files.begin(); it != files.end(); ++it) {
- archive.setPath( (*it) );
- if( !archive.open( IO_ReadOnly ) ) {
- qDebug("Failed to open input %s", (*it).latin1());
- continue;
- }
- if(!archive.readArchive( QDir::currentDirPath(), key ))
- qDebug("Failed to unpack %s", (*it).latin1());
- archive.close();
- }
- } else {
- UnpackDlgImpl dlg(key);
- dlg.exec();
- }
- return 0;
-}
-
diff --git a/util/install/mac/unpackage.icns b/util/install/mac/unpackage.icns
deleted file mode 100644
index 20139b9..0000000
--- a/util/install/mac/unpackage.icns
+++ /dev/null
Binary files differ
diff --git a/util/install/mac/unpackdlg.ui b/util/install/mac/unpackdlg.ui
deleted file mode 100644
index ba4898e..0000000
--- a/util/install/mac/unpackdlg.ui
+++ /dev/null
@@ -1,330 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>UnpackDlg</class>
-<widget class="QDialog">
- <property name="name">
- <cstring>UnpackDlg</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>678</width>
- <height>337</height>
- </rect>
- </property>
- <property name="caption">
- <string>Install unpacking tool</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout24</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLabel">
- <property name="name">
- <cstring>pixmapLabel</cstring>
- </property>
- <property name="pixmap">
- <pixmap>image0</pixmap>
- </property>
- <property name="scaledContents">
- <bool>false</bool>
- </property>
- <property name="alignment">
- <set>AlignAuto|AlignTop</set>
- </property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout23</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLabel">
- <property name="name">
- <cstring>headerLabel</cstring>
- </property>
- <property name="font">
- <font>
- <bold>1</bold>
- </font>
- </property>
- <property name="text">
- <string>Open Qt/CD Package</string>
- </property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout22</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout21</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout19</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLabel">
- <property name="name">
- <cstring>destLabel</cstring>
- </property>
- <property name="text">
- <string>Destination path:</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer12</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Fixed</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>1</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="QLineEdit">
- <property name="name">
- <cstring>destPath</cstring>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>destButton</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="pixmap">
- <pixmap>image1</pixmap>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout20</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLabel">
- <property name="name">
- <cstring>TextLabel1</cstring>
- </property>
- <property name="text">
- <string>License Key:</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer13</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Fixed</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>24</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="QLineEdit">
- <property name="name">
- <cstring>srcKey</cstring>
- </property>
- </widget>
- </hbox>
- </widget>
- </vbox>
- </widget>
- <widget class="QTextView">
- <property name="name">
- <cstring>logOutput</cstring>
- </property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout4</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer>
- <property name="name">
- <cstring>Spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="QPushButton">
- <property name="name">
- <cstring>unpackButton</cstring>
- </property>
- <property name="text">
- <string>Unpack</string>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>cancelButton</cstring>
- </property>
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- </vbox>
- </widget>
- </vbox>
- </widget>
- </hbox>
- </widget>
- </vbox>
-</widget>
-<images>
- <image name="image0">
- <data format="XPM.GZ" length="30371">789cdd7c594f23cbb6e6fbf9155b27de8e5a716d8c01abd50f600633786286abfb105366da608cb10dc657fddf7bc51ac269a04e517b975abbbb5096fd919991b1e62122f98f7ffd71db6bfff1affff8c774666603f7872bcccb1ffff2f3d1e8fd3fffeb7ffdf73ffe59ad54fe88c7d646e58f8d7ffe8f7ffc53cdff707fa80afe43dc4f782762a30457f1bc394b18cfab19e34dbebf9730ddff2e98eeb72b4cf74f19efd0fdd6248ce77d5730df5f3076747d6811aef2fc3d3fbfcaf3b123c43b429f794a98e6f72898c7cf12a6f97519f378669430ddaf05f3fd2a61babfc398e9332661ba7f2998ef6f244cf4df0bdea0f33963a6df0e13a6f17605d378be92309ecf64fe8ec653fc3ce15fe8264ce38d198b7c5f18333de18cb1cce736e26a925fa831e6f3d95ec278de6ac134df704f58e6935f0ba6f3ee2561baff5c30d1631e18f37cf384f9fe5dc63c7f25f7f3fc4c9bf0063fdf0e180bfd743ed16b4e09cbf5ca3296eb0d63799e62ccf717680f1b69fcbc9730c9eb5630db5f83318f97df244cfab2c758e4b1245c93f9bd32e6e76533c63c9ea7f934d2f58eb15c7f9f30e9478db1e8f73963b14f7a5e6393c7731b11d7aae9fa2163996f3f611aff96b0dcaf7cc278de7519cbfc91dfb586dcef2784e5fe2c4b18cf177b8299bf0bc64caf9b264cf67c2698ae57323e3fdf2d13a6f9cbf8c28f9384c93e503f37abc25ff3cc58c6d38465bce25030db4b9b318faf2e1226fa2f05b37fb9215c677ee846c244df1be33af3eb4130dd5ff0fcea0dd63ff4a79b46e6af34639e8fa3f99a3af3d7e78cebec8f9a8c793c95254cf2ed0866fb1d11deaa32fde8bfeb1b222f7b40b8eed97eee046f3470fea784b7aa3cfebd60a66f91309d7f124cfea5088c991fe199313f2f3f466c923ce8fa447f7e4578ab5aabe2f88e318f674e12a6f17605d3f39d67ccfc513b8299bf4a305d9f3f32e6f915fb82f9fa8b84495f3a82f9fe82f036f3c7d884c9fff604d3f5d99c31cfdf22ffb622bf895f0709d3f3d279a6f79031df1f3619376a28bf7cc998e71b2e05f3f3657c4fd79b09e134df8560be7e85f1fac0e36fb33cec3861badf0a667d183166fdcd0682999f7dc1cc4f94d7569257a810deaed27cb30ee33acd27ef0a267db1778c797cbd2d98c6f7af09d3787dc1747fd64d18cfab0563d607fb9030f1775f308d1f2e12267eed08e6f15b8477449efb82597ff1feed9ae89f191016f9e81dc6cc6fffc058ec792998edf55130c7ff3bc2f2bc6012c6f9fa53c1345fb3c198e5998784897fcf82f9fa2663e66f2ef7337f3deacbb615f9e409f3f89631cfd70f09efb07db93bc1ac9f26619acf89e04d7c5ede66ccf32d0ac63c1fbbcb58f8f396305eef2682e9fa624ab8c1f2c85e04d3f5f655305d1fd0de776a22ff901396f9fbbb8489ff4782999f3b8c99ff99dccffcf655c144af4dd76f1a9caf8cc7fc0e0973be7c4138cdff50308f7fc258ec6b9f31cb571582f97c3761a207ed6fc726fadf0927fd538c79fcec5430d1137a09233de1867183ce671b09e3f9ec9c31dba7ca05337d6f82e97e759a30deef7705d7b1fecb1e090b3f4c9f31d39b6f3266fad43861d2b71661c3fc35178299bf3709d3f58e31f3a358264cfc467b83f4899f5f78c6a2af81b03ccfdf32167db109133f268299dfe709233f6c87b161792e04d3f9fc8471e0e769c1747d1809a6f1dd3161bbc1f16e2298ed7f85e9fe5dc1ccdf47c65b9ccf5e274cfe50c6dfe27c82e76f0d3f6f2b61b2df84e9fa8cf8e7c41ecc0d63d68f6c4ad8883fda13ccf6dc14ccfabe4818c7d35b82693c2798e3697ecf98f96d3a8c997f393f5ff851d88469fcba60f607b384c91f9c31667e8553c11c2f2682891e7d2198e7e304b3fd1c3166fe9aed84299f7a124ce3eb56c2943fee0be6e79d0ba6e7b903c681f3f1b784291e2e05f3f8bb09537d91eee7f8ba9d308d5f25ec581ff553c2347e5330d733370913ffe47ad647779d30c5b7b960be5f9e27fa87f1c26c8abf7433c2a23ff65930f9a3d04998ecafce98edd96f3236ac2f2f8c597fc21be1646f23c12ccf9384493f9560f687d78c591fc28660badf5f254cfe54c6dfa2fb2dcf4ff4c1e582391e68c1accf321ed3139a09533c180ae6f9ed30667df13e61f20f9960ce2f5dc224cf3bc13c9f743fe98bee09667e0f0433fd8709e3fc4c9570d2af79c2a45f23c1acbfd384e9fc9160b68f76c2c4ff743dfbf715a6f3db82997f45c2383f2df363fdd579c2f47c2598e7e712a6f30bc1ccaf9784499fdf0573bc64fe3bf617fa24611a6f28989f374998e2f9bd60ce876a8c59deea3661b2bf9660d6b746c2647f581f1927f1d1927c92ffcc170993bd9d0b26fb53ef8c99beec4a30eb7f4d305def041b8e0fb70953fc6f0b66fdae0a66fd3e4b98e27385b1c487ad84e9f9424fa0fb0be27ff267619630f1e34830e7871b09533ebf2d98e3f1306192f75830ebdb0ad37cde04d37c8ccc87f5cdbd0a6679bd254cf2ac08e67cbd9e30c5a7749ee6a7bb0953feb414ccf9c8ad609a8f67fe893eaa03c1ac8f0f09537ce909e67e712b61f217f78259bf9a09d37cae04d37cf44dc2649fc78cc57f05c1cc9fab8469be323ff657f99e60eea76c264cfac6fcf6ec8f544530c7e71bc19cdfa17ddb941f1686b0f87ff79830e97b8f31d3afb61326ff742598ef3f12ccfafe9630f9537ebef85f35104cd7ab4dc2e25fb34230fb9f61c2c41f2f98f3a5c098fda1bd4a98f44f09e67cad9630e53b5dc1dcff90e7b1feb9b9608e17fb09933dcb7cc43f1e244cf2d910ccfab897303d7f2c98fd914b98eca32598f9bdc224af07c1ccffe384e97c9db1c4d7f384c91e847fac9fc52c61ea0f3d0ae678b69130f1c70ae67a2b4f98e63f15ccfeee2c61cacf593e9ee36d3e4898e6772598e3e546c2d43f60fa3cfb138ffec27ad14f7bcd38b03e1e0bde227eed124efef34530fbc346c2144faa82d93f7704d378f96dc2e43feb8c59ffb271c294bf5c0be6783c4898fc515f30e7579782b99e3e14ccf9da5430cd47a5eb693ec51b63d657b59f30d99f16ccfdac79c2a40f35c1eccf3705b37c9b0993fe9d32967ae03561ca1f841f520fbc244ce7df05b3fe9d254cfe2017ccfeba2598f3efc38449fe5b8445df7425617a9e17ccf30909933def09e6fa649130e9df8e60f65f078c255f2b12a6e76582b9de68264cfe4b0b667f83f1c9d545dfb21bc6e2bf2f05b33e9a84c9deb61973bcb32782b93e550993bf7e12cccf3f12ccfa9f274cfa95c6a3e7bb016396afad274cf1aa10ccf1789430c59b3dc1ec5f2e1326fb9f08667b6f274cf27e15ccf9cb7dc234df343fe65743f0760dcfcf098bbeb8938469fe6782595f6cc224df8160b697a384c97fb60573fed34998ecfd5030e71bd70993bc8d60a24f6f0a66fd784f98e8ed31667d34d709d37c653cd6c7fe2c613aff2898eb519730e9d3a960b6c7b384c95ed378ec5fb384293fdf124cf4e4321efb2bdf4e98e6b32f98eda796309d7f16ccfe238dc7fd50a19ff53d7f154cf32b8e0573be72c798f5d9cc1226ff89fec3adfc4f5f30cbc3264cf181f897fc85ad264cfa9109667fdf10ccf5c4b6601e7f9830c9fb4030e973088c25ffd182b93eab08e678db4a98e623e38bfc6cc2444f2198edad9b30c9f75830cdd79f254cfe49e89778b32798ede730619acfb360b69fbb8429fff082397f6a264cf97a4d30d713070913ff7605733c95e74b3edf4f98f46d2698fb8b8d8469be3b82d9bfcaf8e2bfb612267e907ec3edecefb0bfe7933fc813a6f986bae01d9477fece98e553bc0866fa9a82595f1e0493be646dc13b16714f706313e77bcc58facb7dc12cff4230f1cfba8469bee97e7a5efe96303e4f093decfffd4c30dbc366c224cf5bc1f47c5711ccf6f64c38883fde17ccfafb2898f5f14930cf4fee97fa09f3691f84defc5270c321be232ce3db4bc17cfd91601abf3fd34a1badfeeca7b6dac1f1f1f36707dd5b3afeea3c50164afbdf7c846f1cf1ba4ce770fca6e7525cfccb3cc94b47fa3d9eb33f91e96f9249fcfc2d72c97581fc2d1ff4fbdf2def9fcae577f024c9c17c3ecae759562bbb1968f73b9eff1bede5a31df84f32fad1f5ae74cfdfc15e4abee947b2e1e3935dfdedece56b1ff599df24a7e2837dfdddec65283e0b3e1ff4236ace28da027eb7681378c4dfc3e7283e9d3f1ffe66f6e2f5931ec3cca22ce4f311a87ad613b689917e81c3027ed6d3f81da90e7ceddfc75e6630434fb3433cd673b48348e1ab7ec3dfd1aca3df5ac031d5ef48d192a9fa3bd98b476d899a3644cba6dfcd35c598b7282bd4b017bdabf79092056b6213cefd8dec05789feb7da022cefa000ecec970f616671ced66a10ff51150d142b944998cf1bee3dfe5cb7e8b5c4e60462738a338eb5398f1996eeb8eeec2ec7bbaafcfe1b8d097fa4a5feb1b7d0bbfbfd3f72897785fe577f9b2df622ffbba0a335260d51bba0633ddd475bda5b7f58e6e28ad9432cac26194535e0595a95c156aa086fa4e81f5abc7ffabf18562b7c4ef726c9798f1aa976aa4bbea498dd5b39ac0ac5fd454cdf098a979e988bf9bc2d957f5a616ea5d2dd5ae3e52d186c287677cf46f3ff577dfb11778c2091c43d564dda71c6aa4f6d5813a54477aac5aea589da85375a6da30db0ece79a6bafcd9537d38e678ac288ac7b9bad0dbea525da96b75a35fd5adbad34f30f654eda97ba0700972ab94ea2255ce2dfe84bd60ac56d5c833a1466d002535fda636e1b3aeb6d4b6da01593460f6f338b85130fb3eccba7cccf1137fe07ccf18a42ad2a38c35ce78bd3001bcb8070fff883ecf81d62a93e9efe414dfb517960b5343779a181b4c6e0a5d370333340f2403a4e4118e11ccb49b6413bfa34ccc53a4847fb4c8c88ccdb399981733057b6b452a805371c631875896e5f117ed252bd90b1d2706ee34733534afe6cd2c505f70e6c86b91c3ec8b036563de8916f8a6cdc82ccd2e52f462f64c13e4b36f0ed05bc7383506591dfe8a1ffb99bd4459c801387ad13773645ae6d89c9853a06004735ac2ff239e6dd4b4b25cc45e84a2a865ac89789c01654b944f5bef988ee9aa163c1ba85107fad1f47e947bffb9f892342b03ef5ba82373a896a6af1b668c1cc5d9e00c4dc96fad66bfb29fd5b9deca76e02752f30ebf07eb31e7e6c25c9a2b98e113cc70887941f69dbcfa3bf6122d5e6462aee1730094dc80ad47ddea1a93ac7d8e728832e927bbd125fb50289fbed9859f25caa7079f4857f4064cfdd4dc9a3b736f2a603773736daa5fd53c7fd25ec47f88dd0c74d76c40f48b966cd8024630ab51b215f155fd0f3f2b5bead12752326759aeec6c666a60399ba60e165f355b9f7a09f9a7f97d3fbe440f1933156fb6cd11c864c734924f026aac260aac688b42ea66e2bb30de4cd9cf81fb055b5fd1d7b3265d471c204fddb6d63ad5b21ef3b5396a9bd14f36fc457b89f12466816f68271bca20254bd479b48028934883cdc04769f9ad9adadc16aa61dacada0148f25c35387ac28f1db2cdf430d64ca3ada1762ae4d05439fb602eeda32ddb6d8d8ebf908f3d42461f7d4ad4ae1ba6e4294a0564429ad5b3620fa8253607ffe6ec931ddb673bb12fc6d9a99dd9b97db56f76616a4015c9a967dfc9ee8d66fbd1384e0fa95dda5d885f475cd5c5fae74162cc47dff66d7b79b37bb12eb44dbb0f163fa3d89e62f99cf88bf612e7d780391cd8437b645bf6580ded896e8307afdb537d6fcf74d7b66dc7766dcff6416630963d8f1187c763ef069862e8d05ed84ba02670f6142bba55bd937f96cbcfecc55ec108efa662afed0df033ca44a34c6e55274615e0e4083406754a4dec9dbdb7155bb51bb666376d5d3f002762351cabe8784ced9699da6d90d70ee46fe7e4b36d2346a8e401a2d67560b4a903057706a889d967ac8106a6f7b117fd4bf632b457ceea6be7209ecc536c8fb1503c30ccc216a611d7df5ce67257c08ceb7ae40668b5944f57b0ff7282f8c51cb8a17b708f6e14a36d1c0dc6eda16f331c69e7400b48d93db9b17bc67a7481f9f473c977adf5dfbe155f208b50c76e824fed925f8a76021683f6e25ee273ddd4cddcdc1e47db72affd191eb1c68cd573dea75ecd10e354cced82ba710bf76e5ba6e3966e173517e502f18af30763306b38777bfade35dd3ed4a447585d7fd187fb81bdace7a040b73b5075c82c16e82b3bc94ae66c231da4e4d01db996adb96377e20edca99ebb33d4ed68b1f3943bc4fa3e56d219c6f337d554f7ae0dd474d0766664779441a36f1c459fe8baae67725b03d9bc60b5fdb1b6ca3fdb0b1e94933eb87e9c01f8ae421dd8ba3b77179839aeb214e05ab49b2813c87227ee522df5a17b5bd365a93b629efdecae8092a1de77d7b15ae8cfb8fb3a7637a0bdb7ee2e5203f9c03bc7a6197be8c7c84177ef2a2013b07ae0d0c3daf8d917f6427ac7311ecfbee293ab1021eb6adb6dc47c9e231965f0e2c71ac6ba9adb3447d88d7883fb3efa981357d74f989d6ec0358faae5b6dcb6dbd1bbaae91afa006475e68171187d7a6b791be70bde78eb9df7baa20e809a3c1e31eeadd5a25fc9c521f67aae6a3ee8579f9942ed407d12a3631fe36017eb14f2c01d9fdba9db744db04abfaec3c9de6af0f43ec8057c982ffcc00fcdb97fd057ba03b50a7a5875e31ffdc83fb1a6f5487b25af032ddbf56337078f32f2cfd47beb539f54f2c4757b59e95d406b7d420d83ac01f85dc7a8d2659e75390644ad9efa897ff150d1629f0b3b4bcc89728f1fb20f5581dfeffa999ffb57ec059c5bebdfa0d66fd93d770df71de96bbf70cb186739cef456725133ffee97906d0e40c324beacf2c47f2317b86292f0a369f95d947e47ea77ce8b418ffd9e6ffa7d7dc8bd2eeef2f178abdc76df1d80262dfc813ff4471851a217797177eec1b7fcb1aef80079560b6473e2f7906b7db61b3c50171afed49f41b63976afe5f59b28971fd80bd1dbc4fe6306b20990ddb521a249cdd8e17ae5318e0f1ab1035eb806a3beeadcb7c1b65eb93f1c3ef4f35fc13676fd9befc48a2766291e46f43ddfd757ae0d9ca8b8aa3f572d90cd05663752ddb06ca2c7f197fe0a28bfc67cccb2adacf56b3eca85fdcb84fac2a607fa7d13bd3f669233ae4f204d8cb49885bfd5b7661be24995ebcd917e4e7139875a872263ec9dd56026775126d6f87ba0a50299c254195f051fd65637a0655011fb0d5f3398aba1ec4729e644cfd6f69ba02375b47ea2866a5e27f9d95a7c117b71c8570ffc3a055b78c6917bab5e0a771d1af6ce0d21b69ff82d8ce9867b282f3c56116b501ef35d5ff96db013a024d53694dbbfd80568da0e7021cab6114015b87f20754e4fea9a604015dd9a0ffb54bf7c8aa3312fae20ed6dbda926907529e9ad48561eadd1de071fc2aaee13df82b5fabe3e8e72018d7021b39590636cefa53c9fabaea8a9ee2e146e07e45bd10f611086e101ad739ee2ff0873804e78f4fb9019e51885b98e11b994ec25acc518879960fc7e1646d187a56cbe97783a855cb8e20ab0c44ac967d138735d094f668becc7b5c3d82ed0e2a977b694aa2cc65ea4c886e710d76580dfe1c56c3acc2ab99f26fd9b1ed6002f7aea4e308f18fd582ea2e3bcb2e0c8a785a9de420fba92c923ca680e75dfa1ad8659085fac41eeebaa6f433d089484cc8dc31c2999c6f824b5096792317e4c6d115ec31b64afc04de3752f2c4c1b3d739f7d18710146b1d16752a6bada37f0d15e42d2f1f87d17b48c74b2e3fba8bdc29f3e575c51c38eec86b6ee15f5777d0df2186af413ec06dec1ccded1a3a74a9a7361c98d63e6d50ecbb0abcf30568cc25e68725f64955bcca94b13f621c68c29bf13fb4e3d22918bec4f21dec61a215e39801c6b0746eda69e17c9e509463d0887e08d69edd1acc513f202d10b6f8571a078b2aa4b34e5c258ffe8c8f3d0b26ffa1c72805dd4fb03530fc75827cd52a48cf97f23d20279d9d0676cfdd223fa185f5672c9d15e9e5d5c8570fa309cacf5ea492e9017db853d0ea7509f288ec3ebebf96390ed9d3f349370861e76c4d9e8aada22cb9e9953bbf0037b165ef400b21cef6277af65261fe4d2a72810da6e6ce6b4729b8eec47f60287c3fa3aae750d744fe9558715e3f163d4319b878e1b834f99637d62573a8bf6f6a8a721f383701429095dee6f18d632d219ccb3cc69e8f937a89e15f790632c72c0fb138ca95ce5518f07fe9f9a5ae8bbc8ede8cbe479c32fea9750f663c09f0cb2c53e752a520f92e5a21ae1dc9eb8377706b9ebf843fc0dfa28ecf9c37011bd46e8a2adcf57f2e0efd12f15e112b470007695e926f67ab0e60cd370156351eaf3cc531c005b0ad72897951ffbaaae74124bd977cff500bed8d298e2913ba66d8e751beaf89c471baa1a64a2b462a7205778f347d89f8db5dbaa53f4245dc068296e37dc845bb0b9f8ec26e8fd84c601ca0ef59569f3733b29fb47efed2ec31dead000e79a7faa5f441ed3241bf2110b7d6907eb7acb5e32ae971c81740bc871e15a7f4ef527d62eefb692e2c988fd955af531639f42f5c37da884aaadc62e2bd635919a3713ab35d050b389b4248fac648dc0860d35c28a2ce6e68a7de75772615a396b8ffb262e14adf890a58a5c80163b05ef48757cd4f327904b0572e1a52ff455c8a91f917afd7d96498f7a9d51f7432d6c86ba83fc0ae49f61a536d1e3b015edc61c85ed923ecc1225605fe638468275b9acd98be4612297b8badd8c7a6f5fd85ee66b7201fee8d8ef7a028d8add8809d4ed077165cef8b01176205b99829dee52fe51f65da9d3ba5473b76b17a1117ca6dd75a6dcb5012b06b92cd51ef8b44b940bd9a9746823771aba0e7975e4f49473f12fea17c9a522addce574516fb10a5bb37efc3cb7737d1f7d9dd4ed99864aebc0bf6506b36a8331fec92ce3ac4526b246063876d267e6c12e329b454f53852a3aae50417e0eb1edda76504729779ba57c3946e829cbc5fec05ec4ffb8642f16f7af1c41ede2d7ec85bec7dee4ab3d83da9ef28421e8fbd4ec43a5c573b0641bd2fbef97ee979e7e0fbd024497ccab56d452b2393d527ba69285d0c23ae99db8881519dc9d65901390bda8926d7f968b4bb4e2dea1e0f4bb7b5081abafa7922f03bd8358dd056f7c021a36027e36a3efcaf2e849e37a0c75c8b9472c3e6cae646d997cfb082bbb76b8cc0a15fbc5b1eb01f9023cb7930d62af9cf3a555be305517d990fc5869cdeeabfa6525972718d9417cddd5b7d90366aca9eec6181cabbc8e6deb26f820a01c7cd93344c60baab4b86fdfe3da6396a2c3aabfd251abd5898e2dcc4656e87bf44b316f18b8b1da89fd25be66657553d7710f1c5fcaf5d65775a54d7e6c14d75c60f46ef6489911d65f31f3884f889588331dd7a44a1a34e4de0f5126ef19d5e71df263e493b15b2c729aa7be1755da5dccc8c6d91368d61862d4abe9857eacfa639f9a7433c5ff69f69c4df451796fed0fea7d5fb21792d1d29e652f54a1336f7b69d5e5458d6d136b4888d9d934c3d5225ecb33680b86b57cce1e6dc9155869ed2c5597e7d91c624aecb32ccd912a40c273a99295746566669cbd8266bfa3bdacf5f3d6e3cb87ded824f62ea1deaf676f7609baab793dbec73d32f0b9d9227b87ba33a0576e674bf0a253dff515f23d7668a81ad6e4b1c23df2b7875c794c3d96b9f428d5b9996443d0835d37771750d38c582fbbc88579b617bd58d8f04558ed39a73ecc677b29d7d04ddc21528b39ab9f664deebeaed61fe77185c2f6ed04eafddd787d063eccda2841388319b1352c8ba853e350c90e541b65d043cdfab0fe8ff9e73968da21d84303fb4a587db15ce2d51de0df5bb0196958d956febd5ce27e87107517e47397b5386b2f5113addf1676273b768bd879028a3aee363b092d8c92185da43e518dec343bcbda5927eecd40aee8b49eb9ea81c61d3f8dac9bf5b27e94a1ea82bd3c81749eb8dee982269c6717e0911e925c065ff4c7a4672972910a0b6a18d5ca2ed38a0279d7a5e4b9ea2cbb72efd8bb0fba65b7dc83b5907b507f4b6ac653d0c56b5b75adec06b2b4f65ac495b57ed65ad0a4dbec2ebb4fde4e5610694de6d4df6615b39d5591eb71be94937d5cafcccb7d798e3539d4ec55fde2c6fe926c99b30feca5609d77ee46b615ed4ac5cab565cf20d3bfc1fc784e76a26cb611c6b1fef475bb9159a4a6c375ea6a5502e41c3f2daf21dbf89dd7a171ad3a7eeff84bbb1d3b4aa02f2bb92c3ef593cbbde4d551c96a66cb5f679b5907fd8ae1ce03ae609977177d703be647591db2ca273dcbb6eca9bb858ab340df14b5700111745b2b739ded649048678d70b956a74aff6b1ebd0266d0144f9e56392073a5611739a457b1f64c75ac43b97c692f5fadd1c2f7766ec01aa7e099240e477fcbeb24666167fa1ad74162edd2f43bee36b77600740c2037b8ca1ddb2079d0fbdce741d68dd2ea395394728bd5aa2e69d83b543b4bdbd135ea11c5fe9bb9ce33ac81eda7fed8bfdb0bb3e7e6507f377005ff4cc9ea1b652173f3e03a61accf621755dd466af2dc1fe64578cd0b7de176f4301f60cd18f3ad984fdce7431b57fa67f9431c09d76ce71f7e66bc262d786a8bfc517720371ee37e67de97f355dcffc97aa5f3ad7c943fc59eb239438f3ac79c8b346266f37c6c3bfe512f6c8027eceb51fe9c4ff2977c9acf207b1fc7da249f47bd066a9af9ab6de66f26faef6959db64f6a55ee58c8fe819cff385b9d2afae1afba0e5b5b75fdc0f6383cbdff325ae26d18e84954fa3194cf35d3f024ddbc5950bf035fa31df833a6317f78a7bcc748690819e00356f20e7f7bc692631b67247efa35c5639f99cc7dfb7d15756f3038c00e26fffc4fa3e2866dd2f9d46be3d96e2367a68dcfb31ce0ffd223f522d3d7655ebb16e1f415d72e5fa9cad56f29699e1ea858218719f0d7d1fb3a325f6db3ec946aaebf89bfc383ff10d57cd4fb117baaa5dfec4fabedf32f3fc2c6fa7ae9d64f39c57c55cd316609daffadae4b8feeeb1e68c4f8b1d9f937c90774026201f57c59a27f65a1a7937ef7177f58b1fee6dcea0fe9ce833983dad1b0cd7d6773ed52f3f5bdf071b98e7fdec5aeff09a56bfbc36127d90c5d565bfe73bf979d0612fee61716fdaab235ac1cd5b489d41b9c41ed8c86ce617f9657e8571eb0b7b419b8433f9757e93df86a95404257bc97fdd5edc993b7067603377f9bda9513ce6b58719c750ac35719744ecc6297f05b54d17eabf297618e23a7e8d570e21f7d683bc12776ee5d5bccb31fe4b4b61aaa05acb376c3b4cf31aae70ad7a969fde79fae67efe870c94df17f9a69f8864d866651db3c73a1ebd9376f7793ddfb2ceb55c966fd37b30aa15ac6dbaa16965d6f4f31dbf0779d78c7a66dca3e5ff45e6c96e629c6ca865cc1fb06f67535cc9b11a34dfb7173d2d347c8ef34aa1cc5d5ce9a748873b2464ef7479271b3c5d5933b437766c0f0b53d8b8a73ff7852b7c5e140122efb9dc93fce267c994f69a9b36d4b147660a5ee309bc89f48c547acfe9dbf1450fb2a3108a4c5b0741ab2828a78abb7153964879f43b579f1df4b610e1a0fe7d80cc14324e13a93bc5a88254f07e1aea03947b2df33599509c891c3bcf16c5c0e4295f5cbdff97ff4a7cc92b51ba50cb8174a192857cd7d3feaeceaa5faf569dc08f3d97d52751bd4499aa5437764be70c57f6eb72e96176709e0db289e9adadef97d7bfbfb7df12ac1577509df9cccc8b61f1503cc60c4d7520475baed6e1d3a1a973b1c220b1f7555d2c14a34c70df56c956cc67b9c40a0f57fd4c3102aeaef6c39472c8efda4bf1640edd1ba4a5afd8d7b7c5389bd85d3354ab370f64cd57e423bb3ffac98ed6f6c2727642f5c957d1fed39e73c84741678be762f2e3f72fbe135fc02bbfe94198e18ade89aeda601f8b177b01c1f701ede691a36757a5fdc93273a89687f0437d8c1eea3ef668d25adb135fc7ab4df9f5ca76d6fa01408d392fa621d3cbd27af52fc7976266afccb68dd1ead5548b79f15abc4134bcb5b3624135e79a5c64c5a4b4237e8dc7e2f7a45b245dc0598cf1c53bbe75f2c18f41ec2fecd2765d139ebbeae5add6e3be6f2feb07af69066f5e6dc5edb92e76034b3ba4d63cacac3ab0ccb8e2ed49bdc2fe2feee19de6c77692df1605afdca4ddbfe0e121532e96c56eecfbb8abd2bcd6d6afbff9bed8873ddbd8c11ee823b793efe5c322147bf8ce08e51dbd354ad67a2ed8555a96282699a1fee4fbf9893e0bdeb66d0f3ba043eccecca21f377be602df9c1bf3be832fdf77feeefb626bc718fb9a0bc82a5aa0bfdda2e9ad1fbb0d7e07866a68b8d036e0476a51a62cfe1e7e4cb60776d3c1cca7e196c57ebeb04ddf88556f981607be1375379e233afd4d7e84fbfb2771cfc5c7daf717e2cbea28d70bf89661dc03696b7925abb87161fc6b71684eb19335fb20978fbe8adf1b330d7f691750fd76a0d28a6ba49043e73575658f7c07f7484c43cb2efd8d3e044af64a7bc6bf7a9fecdbef579679c1fb8da75071c5aea9cba02cd01093ad0bd5bcee5fc3a35de2cef0cf6fbf51be36552fa696358ba3a265b78b634dbbb6a03e811a3ed30fb666a6c5897d500a65728276f2cefb6c3cf661d6de49ff95f8f28907f8562eee9d7cc1b7d30edc89f7902bb57dcbb4f2bedfb72f763fec17a7a16d6a10552de62f0dbf9765eac27582c95ec3866b9a695681fc5bc55c1a2aad83ac1673ab980b63b5362946104fa6d177018e32996325365e9b4fbe2e979fda4be96f8cd0de08de0bfe8c3dc4d81f3bf0cff6d1d68b335ff719e408d3a8156ea896a15fb4dd65d8283af9c84ef3ad6ce81eec76dc091fee62050db1eb153e1f78a6588fe2f717bd28ba6e1fbd70c03d0443f23af4fed89fb4972ffe860856c0633d51b8a21d77a7d13a7ffc1ebd2444d4b8b30d321e9787eb70a74676c3b5ed861a853b5b8bab54402d7720788d4bdebec6bd9eb8a3788cbb8097f15335b1371af7342fb97bbfeecbbe1f5f3efcfd971ffa384b33e3fd2ab2cf6b547a3772fdefc394df975cffbdfba0176bf7fd689ebf602f3ffefb2eb8a383726afc8cbc9d970ea1eed367ead9afafa5acf759fedddfc658c3bff43ef217b259eb8508ef429a256910bdb35fbeaf1caf655fe62aa7b069afc1577f0ba8ac2b097f3bbee45fcac77f88bbab73eb7f2b21603f7efae93e1977d5835cf556567b3ecbfb6cdc9a4e7c8a31dfccc7f28fb25993cb0ffe46d257f1794d8683d55e8f8fcff918db4a357e19af8dfb4db9145ff0bf2cb3affe3eccc7fb0b5d5e4f7022aff535948fbee9836d7c96c9afd5fbf1f3447f5ea359f1245b7b3756d610e327fdd588d21bc072be7c7cf25bf4bc75b9969e9be402d7153decf7ff8abdacf3f48b7764b42af9a2c873c76fedacbfcffc950c3ffba7b2dd7c96fd4a4e701d50b22697efe6c8bf92b77dd4f9ef9effd1f3beb4a1b2effb7e7cf97fe2f84d7f7fec6ff1f9ff955cfef7fffcc7ff011f3a1368</data>
- </image>
- <image name="image1">
- <data format="XPM.GZ" length="1085">789c5dd0cd6ee2301000e03b4f11911b5ad1189290a8da0324a5e90f29941e2aadf6e0d84ea10d1020849ad5befb7a3cceaa29e2e06f663c33ce55cf7a9dcfacde55e758d16acd2cb6a207abc74f9b8dfcf5fbe79f4e97f896fabb8145ba3f3addbec5ac74b715704ed5d9769c01cb73e0423368f80224c190e53e70091c389e83d98366e83942679f0c43cc7e0087c4f3307b63c8b1d559337459c6810f48df137aab49436c750f748917320f78418e4cf65993fa04b33572c4313b067a039f333de80e39e238680ff4d5d2581c69d2c0c3ad8e0db1f30619127cd1dcd00c7a4452824c80a321359d73cd8c129c1b1b0acc726030a414b31299f9989d1952a4d0ccc23073819f861c973c2133d3b904aacf6ceeda9a8c12bc5b219929de21f9005900a99bf9f8e9a8a159728a5477f5d77847367719305373b1788b14668d4c9337d95b2437ef5d03b9c84df10a28fc866fc05c9522fbf0b369c6b8d0c7ffb1fc6db57effb0bfc68acd7657ee0fedba63599dea73d18a7dca525ec6ed3aa16293a81d2bf232beb1bfc578d58a416731ad641da95381b1e3f496ca939432c9f3bb7b8c450f8fb39994b18c93493a36fda2a7b9aa8ae3e4b278b69b192aa822499dc2d6cddc68b94ff697f46c7fdd255ad6f5e2dbdbfac7c3cbd8ecf7f7baf30f538f0154</data>
- </image>
-</images>
-<connections>
- <connection>
- <sender>cancelButton</sender>
- <signal>clicked()</signal>
- <receiver>UnpackDlg</receiver>
- <slot>reject()</slot>
- </connection>
- <connection>
- <sender>destButton</sender>
- <signal>clicked()</signal>
- <receiver>UnpackDlg</receiver>
- <slot>clickedDestButton()</slot>
- </connection>
- <connection>
- <sender>unpackButton</sender>
- <signal>clicked()</signal>
- <receiver>UnpackDlg</receiver>
- <slot>clickedUnpack()</slot>
- </connection>
-</connections>
-<slots>
- <slot>clickedDestButton()</slot>
- <slot>clickedUnpack()</slot>
- <slot>destroy()</slot>
- <slot>init()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/mac/unpackdlgimpl.cpp b/util/install/mac/unpackdlgimpl.cpp
deleted file mode 100644
index 5538f4d..0000000
--- a/util/install/mac/unpackdlgimpl.cpp
+++ /dev/null
@@ -1,200 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "unpackdlgimpl.h"
-#include "licensedlgimpl.h"
-#include "keyinfo.h"
-#include <qdir.h>
-#include <qfiledialog.h>
-#include <qlineedit.h>
-#include <qtextview.h>
-#include <qpushbutton.h>
-#include <qarchive.h>
-#include <qmessagebox.h>
-#include <qregexp.h>
-#include <qapplication.h>
-#include <unistd.h>
-#include <stdlib.h>
-
-UnpackDlgImpl::UnpackDlgImpl( QString key, QWidget* pParent, const char* pName, WindowFlags f ) :
- UnpackDlg( pParent, pName, f )
-{
- destPath->setText( QDir::currentDirPath() );
- if(!key.isNull()) {
- srcKey->setText(key);
- } else if(QFile::exists( QDir::homeDirPath() + "/.qt-license")) {
- QFile lic( QDir::homeDirPath() + "/.qt-license");
- if( lic.open( IO_ReadOnly ) ) {
- QString buffer;
- while( lic.readLine( buffer, 1024 ) != -1 ) {
- if( buffer[ 0 ] != '#' ) {
- QStringList components = QStringList::split( '=', buffer );
- QStringList::Iterator it = components.begin();
- QString key = (*it++).stripWhiteSpace().replace( QRegExp( QString( "\"" ) ), QString() );
- if(key.upper() == "LICENSEKEY") {
- QString value = (*it++).stripWhiteSpace().replace( QRegExp( QString( "\"" ) ), QString() );
- srcKey->setText(value);
- }
- }
- }
- lic.close();
- }
- }
- connect( srcKey, SIGNAL( textChanged( const QString& ) ), this, SLOT( licenseKeyChanged() ) );
- licenseKeyChanged();
- logOutput->setWordWrap( QTextView::WidgetWidth );
- logOutput->setWrapPolicy( QTextView::Anywhere );
-}
-
-void UnpackDlgImpl::clickedDestButton()
-{
- QString dest = QFileDialog::getExistingDirectory( destPath->text(), this, NULL, "Select destination directory" );
- if (!dest.isNull())
- destPath->setText( dest );
-}
-
-void UnpackDlgImpl::clickedUnpack()
-{
- QArchive archive;
- connect( &archive, SIGNAL( operationFeedback( const QString& ) ), this, SLOT( updateProgress( const QString& ) ) );
- connect( &archive, SIGNAL( operationFeedback( int ) ), this, SLOT( updateProgress( int ) ) );
-
- archive.setVerbosity( QArchive::Destination | QArchive::Verbose | QArchive::Progress );
-
- QString dest = destPath->text(), src="qt-mac-commercial-3.0.0.app/Contents/Qt/qtmac.arq";
- if(!dest.isEmpty() && dest.right(1) != "/")
- dest += "/";
- archive.setPath( src );
- if( !archive.open( IO_ReadOnly ) ) {
- QMessageBox::critical( NULL, "Failure", "Failed to open input " + src);
- return;
- } else if(!QFile::exists(dest) ) {
- QDir d;
- if(!d.mkdir(dest)) {
- QMessageBox::critical( NULL, "Failure", "Failed to open directory " + dest);
- return;
- }
- }
- unpackButton->setDisabled( true );
- srcKey->setDisabled( true );
- destPath->setDisabled( true );
- destButton->setDisabled( true );
- LicenseDialogImpl licenseDialog( this );
- if((!licenseDialog.showLicense( featuresForKeyOnUnix( srcKey->text() ) & Feature_US )) ||
- (!licenseDialog.exec())) {
- QMessageBox::critical( NULL, "Failure", "The license agreement was rejected." );
- updateProgress( "License rejected" );
- unpackButton->setDisabled( false );
- srcKey->setDisabled( false );
- destPath->setDisabled( false );
- destButton->setDisabled( false );
- return;
- }
-
- QString srcName = "qt-mac-commercial-3.0.0.app/Contents/Qt/LICENSE";
- QString destName = "/qt-mac-commercial-3.0.0/.LICENSE";
- QString srcName2 = srcName;
- if ( featuresForKeyOnUnix( srcKey->text() ) & Feature_US )
- srcName2 = srcName2 + "-US";
- if((!archive.readArchive( dest, srcKey->text() )) ||
- (!copyFile( srcName, dest + destName )) ||
- (!copyFile( srcName + "-US", dest + destName + "-US" )) ||
- (!copyFile( srcName2, dest + "/qt-mac-commercial-3.0.0/LICENSE" )))
- {
- QMessageBox::critical( NULL, "Failure", "Failed to unpack " + src);
- archive.close();
- }
- else {
- QMessageBox::information( NULL, "Archive unpacked", "Qt has been "
- "extracted to " + dest + "qt-mac-commerical-3.0.0\nPlease read "
- "the INSTALL.macosx file for installation instructions." );
- cancelButton->setText( "Quit" );
- }
-}
-
-bool UnpackDlgImpl::copyFile( const QString& src, const QString& dest )
-{
- int len;
- const int buflen = 4096;
- char buf[buflen];
- QFileInfo info( src );
- QFile srcFile( src ), destFile( dest );
- if (!srcFile.open( IO_ReadOnly ))
- return false;
- destFile.remove();
- if (!destFile.open( IO_WriteOnly )) {
- srcFile.close();
- return false;
- }
- while (!srcFile.atEnd()) {
- len = srcFile.readBlock( buf, buflen );
- if (len <= 0)
- break;
- if (destFile.writeBlock( buf, len ) != len)
- return false;
- }
- destFile.flush();
- return true;
-}
-
-void UnpackDlgImpl::updateProgress( const QString& message )
-{
- logOutput->append( message );
-}
-
-void UnpackDlgImpl::updateProgress( int )
-{
- qApp->processEvents();
-}
-
-void UnpackDlgImpl::licenseKeyChanged()
-{
- QRegExp keyExpr("^....-....-....");
- if ((keyExpr.search( srcKey->text() ) != -1) &&
- (featuresForKey( srcKey->text() ) & Feature_Mac))
- unpackButton->setEnabled( true );
- else
- unpackButton->setEnabled( false );
-}
-
-void UnpackDlgImpl::reject()
-{
- exit( 0 );
-}
diff --git a/util/install/mac/unpackdlgimpl.h b/util/install/mac/unpackdlgimpl.h
deleted file mode 100644
index 11585d7..0000000
--- a/util/install/mac/unpackdlgimpl.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef UNPACKDLGIMPL_H
-#define UNPACKDLGIMPL_H
-
-#include "unpackdlg.h"
-
-class UnpackDlgImpl : public UnpackDlg
-{
- Q_OBJECT;
-public:
- UnpackDlgImpl( QString key = QString(),
- QWidget* pParent = NULL, const char* pName = NULL, WindowFlags f = 0 );
-
- virtual void clickedDestButton();
- virtual void clickedUnpack();
- virtual bool copyFile( const QString& src, const QString& dest );
-public slots:
- virtual void updateProgress( const QString& );
- virtual void updateProgress( int );
- virtual void licenseKeyChanged();
- virtual void reject();
-};
-
-#endif
diff --git a/util/install/package/main.cpp b/util/install/package/main.cpp
deleted file mode 100644
index 39c71db..0000000
--- a/util/install/package/main.cpp
+++ /dev/null
@@ -1,397 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "qarchive.h"
-#include <qapplication.h>
-#include <qfileinfo.h>
-#include "keyinfo.h"
-#if defined(Q_OS_WIN32)
-#include <windows.h>
-#endif
-
-class ConsoleOutput : public QObject
-{
- Q_OBJECT
-public:
- ConsoleOutput() : QObject() { }
- ~ConsoleOutput() { }
-public slots:
- void updateProgress( const QString& str) { qDebug("%s", str.latin1()); }
-};
-
-static int usage(const char *argv0, const char *un=NULL) {
- if(un)
- fprintf(stderr, "Unknown command: %s\n", un);
- else
- fprintf(stderr, "Usage:\n");
- fprintf(stderr, "%s [options] [keyinfo] files...\n", argv0);
-
- fprintf(stderr, "\nOptions:\n");
- fprintf(stderr, " -o file : Outputs archive to file\n");
- fprintf(stderr, " -n : Follow symbolic links, do not archive the link\n");
- fprintf(stderr, " -s : Quiet mode, will not output process\n");
- fprintf(stderr, " -desc text : Add the description text to the archive (e.g. \"Qt 3.0.0\")\n");
- fprintf(stderr, " -extra k v : Adds the extra value v with the key k to the archive\n");
- fprintf(stderr, " -h : This help\n");
-
- fprintf(stderr, "\nKey Info:\n");
- fprintf(stderr, " -win : Windows Archive\n");
- fprintf(stderr, " -unix : Unix Archive\n");
- fprintf(stderr, " -mac : Mac OS X Archive\n");
- fprintf(stderr, " -embedded : Embedded Archive\n");
-
- fprintf(stderr, "\nThe following options are not for packaging and can't be\n" );
- fprintf(stderr, "combined with the options above or any other option:\n\n" );
- fprintf(stderr, " -unpack file : Unpack the archive file to the current directory\n");
- fprintf(stderr, " -getdesc file : Print the description text of the archive file\n");
- fprintf(stderr, " -getextra k file : Print the extra value for the key k of the archive file\n");
-#if defined(Q_OS_WIN32)
- fprintf(stderr, " -res file1 file2 : Add the archive file1 as the binary resource\n");
- fprintf(stderr, " QT_ARQ to the excutable file2\n");
- fprintf(stderr, " -getres file : Get the binary resource QT_ARQ from the executable\n" );
- fprintf(stderr, " file and store it under qt.arq\n");
- fprintf(stderr, " -namedres RES_NAME file1 file2:\n");
- fprintf(stderr, " Add the file1 as the binary resource\n");
- fprintf(stderr, " RES_NAME to the excutable file2\n");
- fprintf(stderr, " -license LICENSE file2:\n");
- fprintf(stderr, " Add the license LICENSE as the binary resource\n");
- fprintf(stderr, " LICENSE to the excutable file2\n");
- fprintf(stderr, " -license-us LICENSE-US file2:\n");
- fprintf(stderr, " Add the license LICENSE-US as the binary resource\n");
- fprintf(stderr, " LICENSE-US to the excutable file2\n");
-#endif
- return 665;
-}
-
-static int unpack( const char *filename, bool verbose )
-{
- QArchive arq( filename );
- ConsoleOutput output;
- if ( verbose )
- output.connect( &arq, SIGNAL(operationFeedback(const QString&)), SLOT(updateProgress(const QString&)) );
- if ( !arq.open( IO_ReadOnly ) ) {
- fprintf(stderr, "Can't open the archive %s file to unpack", filename);
- return 42;
- }
- if ( !arq.readArchive( ".", "G87A-QJFE-DQF9" ) ) {
- fprintf(stderr, "Couldn't unpack the archive %s", filename);
- return 42;
- }
- return 0;
-}
-
-static int getdesc( const char *filename )
-{
- QArchive arq( filename );
- ConsoleOutput output;
- output.connect( &arq, SIGNAL(operationFeedback(const QString&)), SLOT(updateProgress(const QString&)) );
- if ( !arq.open( IO_ReadOnly ) ) {
- fprintf(stderr, "Can't open the archive %s file to get description", filename);
- return 42;
- }
- QArchiveHeader *header = arq.readArchiveHeader();
- if ( !header ) {
- fprintf(stderr, "Can't find the header in the archive %s file", filename);
- return 42;
- }
- if ( !header->description().isNull() ) {
- fprintf(stdout, header->description().latin1() );
- }
- return 0;
-}
-
-static int getextra( const char *key, const char *filename )
-{
- QArchive arq( filename );
- ConsoleOutput output;
- output.connect( &arq, SIGNAL(operationFeedback(const QString&)), SLOT(updateProgress(const QString&)) );
- if ( !arq.open( IO_ReadOnly ) ) {
- fprintf(stderr, "Can't open the archive %s file to get description", filename);
- return 42;
- }
- QArchiveHeader *header = arq.readArchiveHeader();
- if ( !header ) {
- fprintf(stderr, "Can't find the header in the archive %s file", filename);
- return 42;
- }
- QString extraData = header->findExtraData(key);
- if ( !extraData.isNull() ) {
- fprintf(stdout, extraData.latin1() );
- }
- return 0;
-}
-
-
-int main( int argc, char** argv )
-{
- uint features = 0;
- bool output = true, doSyms = true;
- QString desc;
- QString dest;
- QMap<QString,QString> extra;
-#if defined(Q_OS_WIN32)
- QString arq, exe;
- QString resName;
- bool doRes = false;
- bool doLicense = false;
- bool doLicenseUs = false;
- bool getRes = false;
-#endif
- QStringList files;
- int i;
- for( i = 1; i < argc; i++ ) {
- //options
- if(!strcmp(argv[i], "-o")) {
- if ( ++i < argc )
- dest = argv[i];
- else
- return usage(argv[0]);
- } else if(!strcmp(argv[i], "-n")) {
- doSyms = false;
- } else if(!strcmp(argv[i], "-s")) {
- output = false;
- } else if(!strcmp(argv[i], "-desc")) {
- if ( ++i < argc )
- desc = argv[i];
- else
- return usage(argv[0]);
- } else if(!strcmp(argv[i], "-extra")) {
- QString key, value;
- if ( ++i < argc )
- key = argv[i];
- else
- return usage(argv[0]);
- if ( ++i < argc )
- value = argv[i];
- else
- return usage(argv[0]);
- extra.insert( key, value );
- } else if(!strcmp(argv[i], "-h")) {
- return usage(argv[0]);
- //keyinfo
- } else if(!strcmp(argv[i], "-unix")) {
- features |= Feature_Unix;
- } else if(!strcmp(argv[i], "-win")) {
- features |= Feature_Windows;
- } else if(!strcmp(argv[i], "-mac")) {
- features |= Feature_Mac;
- } else if(!strcmp(argv[i], "-embedded")) {
- features |= Feature_Embedded;
- //unpack
- } else if(!strcmp(argv[i], "-unpack")) {
- if ( ++i < argc )
- return unpack( argv[i], output );
- //getdesc
- } else if(!strcmp(argv[i], "-getdesc")) {
- if ( ++i < argc )
- return getdesc( argv[i] );
- //getextra
- } else if(!strcmp(argv[i], "-getextra")) {
- if ( ++i < argc ) {
- if ( ++i < argc )
- return getextra( argv[i-1], argv[i] );
- }
-#if defined(Q_OS_WIN32)
- //res (Windows only)
- } else if(!strcmp(argv[i], "-res")) {
- doRes = true;
- if ( ++i < argc )
- arq = argv[i];
- if ( ++i < argc )
- exe = argv[i];
- //getres (Windows only)
- } else if(!strcmp(argv[i], "-getres")) {
- getRes = true;
- if ( ++i < argc )
- exe = argv[i];
- //res (Windows only)
- } else if(!strcmp(argv[i], "-namedres")) {
- doRes = true;
- if ( ++i < argc )
- resName = argv[i];
- if ( ++i < argc )
- arq = argv[i];
- if ( ++i < argc )
- exe = argv[i];
- //license (Windows only)
- } else if(!strcmp(argv[i], "-license")) {
- doLicense = true;
- if ( ++i < argc )
- arq = argv[i];
- if ( ++i < argc )
- exe = argv[i];
- //licenseUs (Windows only)
- } else if(!strcmp(argv[i], "-license-us")) {
- doLicenseUs = true;
- if ( ++i < argc )
- arq = argv[i];
- if ( ++i < argc )
- exe = argv[i];
-#endif
- //files
- } else if(*(argv[i]) != '-') {
- files.append(argv[i]);
- //unknown
- } else {
- return usage(argv[0], argv[i]);
- }
- }
-#if defined(Q_OS_WIN32)
- if ( doRes || doLicense || doLicenseUs ) {
- if ( arq.isEmpty() || exe.isEmpty() )
- return usage(argv[0], argv[i]);
- QFile fArq( arq );
- if ( !fArq.open( IO_ReadOnly ) ) {
- if ( doRes ) {
- fprintf(stderr, "Could not open archive %s", arq.latin1() );
- } else {
- fprintf(stderr, "Could not open license %s", arq.latin1() );
- }
- return -1;
- }
- QByteArray ba = fArq.readAll();
- // ignore wide character versions (this is for internal use only)
- HANDLE hExe = BeginUpdateResourceA( exe.latin1(), false );
- if ( hExe == 0 ) {
- fprintf(stderr, "Could not load executable %s\n", exe.latin1() );
- qSystemWarning( "" );
- return -1;
- }
- if ( resName.isEmpty() ) {
- if ( doRes ) {
- resName = "QT_ARQ";
- } else if ( doLicense ){
- resName = "LICENSE";
- } else {
- resName = "LICENSE-US";
- }
- }
- if ( !UpdateResourceA(hExe,RT_RCDATA,resName.latin1(),0,ba.data(),ba.count()) ) {
- EndUpdateResource( hExe, true );
- fprintf(stderr, "Could not update executable %s\n", exe.latin1() );
- qSystemWarning( "" );
- return -1;
- }
- if ( !EndUpdateResource(hExe,false) ) {
- fprintf(stderr, "Could not update executable %s\n", exe.latin1() );
- qSystemWarning( "" );
- return -1;
- }
- return 0;
- }
- if ( getRes ) {
- if ( exe.isEmpty() )
- return usage(argv[0], argv[i]);
- arq = "qt.arq";
- QFile fArq( arq );
- if ( !fArq.open( IO_WriteOnly ) ) {
- fprintf(stderr, "Could not open archive %s\n", arq.latin1() );
- return -1;
- }
- // ignore wide character versions (this is for internal use only)
- HMODULE hExe = LoadLibraryA( exe.latin1() );
- if ( hExe == NULL ) {
- fprintf(stderr, "Could not load executable %s\n", exe.latin1() );
- qSystemWarning( "" );
- return -1;
- }
- HRSRC resource = FindResource( hExe, "QT_ARQ", RT_RCDATA );
- HGLOBAL hglobal = LoadResource( hExe, resource );
- int arSize = SizeofResource( hExe, resource );
- if ( arSize == 0 ) {
- fprintf(stderr, "Could not get size of resource\n" );
- qSystemWarning( "" );
- return -1;
- }
- char *arData = (char*)LockResource( hglobal );
- if ( arData == 0 ) {
- fprintf(stderr, "Could not lock resource\n" );
- qSystemWarning( "" );
- return -1;
- }
- fArq.writeBlock( arData, arSize );
- FreeLibrary( hExe );
- return 0;
- }
-#endif
- if(!files.isEmpty()) {
- if(dest.isEmpty()) {
- qDebug("Please specify an output package");
- return 666;
- }
-
- QArchive archive;
- ConsoleOutput out;
- if(output) {
- QObject::connect( &archive, SIGNAL( operationFeedback( const QString& ) ),
- &out, SLOT( updateProgress( const QString& ) ) );
- archive.setVerbosity( QArchive::Destination | QArchive::Verbose );
- }
- archive.setSymbolicLinks(doSyms);
- archive.setPath( dest );
- if( !archive.open( IO_WriteOnly ) ) {
- qDebug("Failed to open output %s", dest.latin1());
- return 666;
- }
- QArchiveHeader header( features, desc );
- QMap<QString,QString>::Iterator exIt;
- for ( exIt = extra.begin(); exIt != extra.end(); ++exIt ) {
- header.addExtraData( exIt.key(), exIt.data() );
- }
- archive.writeHeader( header );
- for(QStringList::Iterator it = files.begin(); it != files.end(); ++it) {
- QFileInfo f((*it));
- if(!f.exists()) {
- qDebug("Failed to open %s", (*it).latin1());
- continue;
- }
- if(f.isDir())
- archive.writeDir( (*it), true, (*it) );
- else
- archive.writeFile( (*it), (*it) );
- }
- archive.close();
- } else {
- return usage(argv[0]);
- }
- return 0;
-}
-
-#include "main.moc"
diff --git a/util/install/package/package.pro b/util/install/package/package.pro
deleted file mode 100644
index 4edc96e..0000000
--- a/util/install/package/package.pro
+++ /dev/null
@@ -1,25 +0,0 @@
-TEMPLATE = app
-SOURCES = main.cpp
-INCLUDEPATH += ../archive $$QT_SOURCE_TREE/include ../keygen
-CONFIG += qt console
-TARGET = package
-win32:DESTDIR = ../../../bin
-unix:LIBS += -L$$QT_BUILD_TREE/util/install/archive -larq
-win32:LIBS += ../archive/arq.lib
-DEFINES -= UNICODE
-
-win32:!shared:SOURCES += \
- ../../../src/3rdparty/zlib/adler32.c \
- ../../../src/3rdparty/zlib/compress.c \
- ../../../src/3rdparty/zlib/crc32.c \
- ../../../src/3rdparty/zlib/deflate.c \
- ../../../src/3rdparty/zlib/gzio.c \
- ../../../src/3rdparty/zlib/infblock.c \
- ../../../src/3rdparty/zlib/infcodes.c \
- ../../../src/3rdparty/zlib/inffast.c \
- ../../../src/3rdparty/zlib/inflate.c \
- ../../../src/3rdparty/zlib/inftrees.c \
- ../../../src/3rdparty/zlib/infutil.c \
- ../../../src/3rdparty/zlib/trees.c \
- ../../../src/3rdparty/zlib/uncompr.c \
- ../../../src/3rdparty/zlib/zutil.c
diff --git a/util/install/win/archive.cpp b/util/install/win/archive.cpp
deleted file mode 100644
index 81f8e53..0000000
--- a/util/install/win/archive.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "archive.h"
-#include "resource.h"
-#include <qfile.h>
-#include <qmessagebox.h>
-#include <windows.h>
-
-bool addArchive( const QString& name )
-{
- QByteArray ba ;
-
- // Copy the install.exe first, since we can't update our own application
- char aName[512];
- if ( GetModuleFileNameA( 0, aName, 512 ) == 0 ) { // we don't need wide character versions
- QMessageBox::critical( 0,
- "Could not add archive",
- QString( "Could not add archive %1.\n"
- "Could not get the name of the application.").arg(name)
- );
- return false;
- }
- QFile fromFile( aName );
- if ( !fromFile.open( IO_ReadOnly ) ) {
- QMessageBox::critical( 0,
- "Could not add archive",
- QString("Could not copy executable %1.\n").arg(aName)
- );
- return false;
- }
- QString destinationName = name;
- if ( destinationName.right(4) == ".arq" ) {
- destinationName =destinationName.left( destinationName.length()-4 );
- }
- destinationName += ".exe";
- QFile toFile( destinationName );
- if ( !toFile.open( IO_WriteOnly ) ) {
- QMessageBox::critical( 0,
- "Could not add archive",
- QString("Could not copy executable %1 to %2.\n").arg(aName).arg(destinationName)
- );
- return false;
- }
- ba = fromFile.readAll();
- toFile.writeBlock( ba );
- toFile.close();
-
- // load the .arq file
- QFile fArq( name );
- if ( !fArq.open( IO_ReadOnly ) ) {
- QMessageBox::critical( 0,
- "Could not add archive",
- QString("Could not open archive %1.\n").arg(name)
- );
- return false;
- }
- ba = fArq.readAll();
-
- // update the binary res
- ResourceSaver res( destinationName );
- QString errorMsg;
- if ( !res.setData( "QT_ARQ", ba, &errorMsg ) ) {
- QMessageBox::critical( 0,
- "Could not add archive",
- QString("Could not add archive %1.\n").arg(name) + errorMsg
- );
- return false;
- }
-
-#if 0
- QMessageBox::information( 0,
- "Archive added",
- QString("Added the archive %1.\n").arg(name) + errorMsg
- );
-#endif
- return true;
-}
diff --git a/util/install/win/archive.h b/util/install/win/archive.h
deleted file mode 100644
index d470a27..0000000
--- a/util/install/win/archive.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef ARCHIVE_H
-#define ARCHIVE_H
-
-#include <qstring.h>
-#include "resource.h"
-
-bool addArchive( const QString &name );
-
-#endif
diff --git a/util/install/win/dialogs/folderdlg.ui b/util/install/win/dialogs/folderdlg.ui
deleted file mode 100644
index c5427e2..0000000
--- a/util/install/win/dialogs/folderdlg.ui
+++ /dev/null
@@ -1,184 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>FolderDlg</class>
-<widget class="QDialog">
- <property name="name">
- <cstring>FolderDlg</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>323</width>
- <height>369</height>
- </rect>
- </property>
- <property name="caption">
- <string>Select installation folder</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QListView">
- <column>
- <property name="text">
- <string>Start menu folder tree</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <property name="name">
- <cstring>folderTree</cstring>
- </property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout2</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLabel">
- <property name="name">
- <cstring>nameLabel</cstring>
- </property>
- <property name="text">
- <string>Folder name</string>
- </property>
- </widget>
- <widget class="QLineEdit">
- <property name="name">
- <cstring>folderName</cstring>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout1</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer>
- <property name="name" stdset="0">
- <cstring>Spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="QPushButton">
- <property name="name">
- <cstring>okButton</cstring>
- </property>
- <property name="text">
- <string>Ok</string>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>cancelButton</cstring>
- </property>
- <property name="text">
- <string>Cancel</string>
- </property>
- </widget>
- <spacer>
- <property name="name" stdset="0">
- <cstring>Spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- </vbox>
-</widget>
-<connections>
- <connection>
- <sender>okButton</sender>
- <signal>clicked()</signal>
- <receiver>FolderDlg</receiver>
- <slot>accept()</slot>
- </connection>
- <connection>
- <sender>cancelButton</sender>
- <signal>clicked()</signal>
- <receiver>FolderDlg</receiver>
- <slot>reject()</slot>
- </connection>
- <connection>
- <sender>folderTree</sender>
- <signal>expanded(QListViewItem*)</signal>
- <receiver>FolderDlg</receiver>
- <slot>expandedDir(QListViewItem*)</slot>
- </connection>
- <connection>
- <sender>folderTree</sender>
- <signal>collapsed(QListViewItem*)</signal>
- <receiver>FolderDlg</receiver>
- <slot>collapsedDir(QListViewItem*)</slot>
- </connection>
- <connection>
- <sender>folderTree</sender>
- <signal>selectionChanged(QListViewItem*)</signal>
- <receiver>FolderDlg</receiver>
- <slot>selectedDir(QListViewItem*)</slot>
- </connection>
- <slot access="public" language="C++">collapsedDir( QListViewItem* )</slot>
- <slot access="protected" language="C++">destroy()</slot>
- <slot access="public" language="C++">expandedDir( QListViewItem* )</slot>
- <slot access="public" language="C++">selectedDir( QListViewItem* )</slot>
- <slot access="protected" language="C++">init()</slot>
-</connections>
-<tabstops>
- <tabstop>folderTree</tabstop>
- <tabstop>folderName</tabstop>
- <tabstop>okButton</tabstop>
- <tabstop>cancelButton</tabstop>
-</tabstops>
-</UI>
diff --git a/util/install/win/dialogs/folderdlgimpl.cpp b/util/install/win/dialogs/folderdlgimpl.cpp
deleted file mode 100644
index 8c3c27f..0000000
--- a/util/install/win/dialogs/folderdlgimpl.cpp
+++ /dev/null
@@ -1,119 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "folderdlgimpl.h"
-#include "../shell.h"
-#include <qlineedit.h>
-#include <qlistview.h>
-#include <qpixmap.h>
-#include <qdir.h>
-
-FolderDlgImpl::FolderDlgImpl( QWidget* parent, const char* name, bool modal, WindowFlags f ) :
- FolderDlg( parent, name, modal, f )
-{
-}
-
-void FolderDlgImpl::setup( QString programsFolder, QString folder )
-{
- folderName->setText( folder );
- if( programsFolder.length() ) {
- QString topLevel = programsFolder.mid( programsFolder.findRev( '\\' ) + 1 );
- QListViewItem* topItem = new QListViewItem( folderTree, topLevel );
- topItem->setOpen( true );
- topItem->setPixmap( 0, *WinShell::getOpenFolderImage() );
-
- ScanFolder( programsFolder, topItem );
-
- }
-}
-
-void FolderDlgImpl::ScanFolder( QString folderPath, QListViewItem* parent )
-{
- QDir folderDir( folderPath );
- folderDir.setFilter( QDir::Dirs );
- folderDir.setSorting( QDir::Name | QDir::IgnoreCase );
- const QFileInfoList* fiList = folderDir.entryInfoList();
- QFileInfoListIterator it( *fiList );
- QFileInfo* fi;
-
- while( ( fi = it.current() ) ) {
- if( fi->fileName()[0] != '.' ) { // Exclude dot-dirs
- QListViewItem* item = new QListViewItem( parent, fi->fileName() );
- item->setOpen( false );
- item->setPixmap( 0, *WinShell::getClosedFolderImage() );
- ScanFolder( fi->absFilePath(), item );
- }
- ++it;
- }
-}
-
-void FolderDlgImpl::expandedDir( QListViewItem* item )
-{
- item->setPixmap( 0, *WinShell::getOpenFolderImage() );
-}
-
-void FolderDlgImpl::collapsedDir( QListViewItem* item )
-{
- item->setPixmap( 0, *WinShell::getClosedFolderImage() );
-}
-
-QString FolderDlgImpl::getFolderName()
-{
- return folderName->text();
-}
-
-/*
-** This will replace the contents of the folderName lineedit widget.
-**
-** The algoritm will traverse the item tree until it gets to the toplevel
-** item, prepending each name to the folder name as it goes
-*/
-void FolderDlgImpl::selectedDir( QListViewItem* item )
-{
- QListViewItem* currentItem = item;
- QString newFolder;
-
- while( currentItem->parent() ) {
- newFolder = currentItem->text( 0 ) + QString( "\\" ) + newFolder;
- currentItem = currentItem->parent();
- }
- newFolder.truncate( newFolder.length() - 1 );
- folderName->setText( newFolder );
-}
diff --git a/util/install/win/dialogs/folderdlgimpl.h b/util/install/win/dialogs/folderdlgimpl.h
deleted file mode 100644
index 25e13b5..0000000
--- a/util/install/win/dialogs/folderdlgimpl.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef FOLDERDLGIMPL_H
-#define FOLDERDLGIMPL_H
-
-#include "folderdlg.h"
-
-class WinShell;
-
-class FolderDlgImpl : public FolderDlg
-{
- Q_OBJECT
-public:
- FolderDlgImpl( QWidget* parent = NULL, const char* name = NULL, bool modal = false, WindowFlags f = 0 );
-
- void setup( QString, QString );
-
- virtual void expandedDir( QListViewItem* );
- virtual void collapsedDir( QListViewItem* );
- virtual void selectedDir( QListViewItem* );
-
- QString getFolderName();
-private:
- void ScanFolder( QString folderPath, QListViewItem* parent );
-};
-
-#endif // FOLDERDLGIMPL_H
diff --git a/util/install/win/environment.cpp b/util/install/win/environment.cpp
deleted file mode 100644
index bbf5719..0000000
--- a/util/install/win/environment.cpp
+++ /dev/null
@@ -1,362 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "environment.h"
-#include <qnamespace.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qfileinfo.h>
-#include <qdir.h>
-#include <qsettings.h>
-#if defined(Q_OS_WIN32)
-#include <windows.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
-
-QString QEnvironment::getEnv( const QString &varName, int envBlock )
-{
-#if defined(Q_OS_WIN32)
- OSVERSIONINFOA osvi;
- HKEY hkKey;
- bool isWinMe = false;
-
- if( envBlock & GlobalEnv )
- hkKey = HKEY_LOCAL_MACHINE;
- else
- hkKey = HKEY_CURRENT_USER;
-
- osvi.dwOSVersionInfoSize = sizeof( OSVERSIONINFOA );
- GetVersionExA( &osvi );
- if( int( qWinVersion() ) & int( Qt::WV_98 ) ) {
- if( osvi.dwMinorVersion == 90 )
- isWinMe = true;
- }
-
- if( envBlock & PersistentEnv ) {
- if( int( qWinVersion() ) & int( Qt::WV_NT_based ) ) {
- HKEY env;
- QByteArray buffer;
- DWORD size( 0 );
- QString value;
-
- if( RegOpenKeyExW( hkKey, L"Environment", 0, KEY_READ, &env ) == ERROR_SUCCESS ) {
- RegQueryValueExW( env, (const wchar_t*) varName.ucs2(), 0, NULL, NULL, &size );
- buffer.resize( size );
- RegQueryValueExW( env, (const wchar_t*) varName.ucs2(), 0, NULL, (unsigned char*)buffer.data(), &size );
- for( int i = 0; i < ( int )buffer.size(); i += 2 ) {
- QChar c( buffer[ i ], buffer[ i + 1 ] );
- if( !c.isNull() )
- value += c;
- }
- RegCloseKey( env );
- return value;
- }
- else {
- return QString();
- }
- }
- else { // Win 9x
- // Persistent environment on Windows 9x is not fully supported yet.
- return QString( getenv( varName ) );
- }
- }
- if( envBlock & LocalEnv ) {
- if( int( qWinVersion() ) & int( Qt::WV_NT_based ) ) {
- int size = GetEnvironmentVariableW( (TCHAR*)varName.ucs2(), 0, 0 );
- if ( size == 0 )
- return QString();
- TCHAR *data = new TCHAR[ size ];
- GetEnvironmentVariableW( (TCHAR*)varName.ucs2(), data, size );
- QString ret = QString::fromUcs2( data );
- delete[] data;
- return ret;
- } else {
- QCString varNameL = varName.local8Bit();
- int size = GetEnvironmentVariableA( varNameL.data(), 0, 0 );
- if ( size == 0 )
- return QString();
- char *data = new char[ size ];
- GetEnvironmentVariableA( varNameL.data(), data, size );
- QString ret = QString::fromLocal8Bit( data );
- delete[] data;
- return ret;
- }
- }
-#elif defined(Q_OS_UNIX)
-// Persistent environment on Unix is not supported yet.
- if( envBlock & LocalEnv ) {
- return QString( getenv( varName ) );
- }
-#endif
- return QString();
-}
-
-void QEnvironment::putEnv( const QString &varName, const QString &varValue, int envBlock )
-{
-#if defined(Q_OS_WIN32)
- OSVERSIONINFOA osvi;
- HKEY hkKey;
- bool isWinMe = false;
-
- if( envBlock & GlobalEnv )
- hkKey = HKEY_LOCAL_MACHINE;
- else
- hkKey = HKEY_CURRENT_USER;
-
- osvi.dwOSVersionInfoSize = sizeof( OSVERSIONINFOA );
- GetVersionExA( &osvi );
- if( int( qWinVersion() ) & int( Qt::WV_98 ) ) {
- if( osvi.dwMinorVersion == 90 )
- isWinMe = true;
- }
-
- if( envBlock & PersistentEnv ) {
- if( int( qWinVersion() ) & int( Qt::WV_NT_based ) ) {
-
- HKEY env;
- QByteArray buffer;
-
- buffer.resize( varValue.length() * 2 + 2 );
- const QChar *data = varValue.unicode();
- int i;
- for ( i = 0; i < (int)varValue.length(); ++i ) {
- buffer[ 2*i ] = data[ i ].cell();
- buffer[ (2*i)+1 ] = data[ i ].row();
- }
- buffer[ (2*i) ] = 0;
- buffer[ (2*i)+1 ] = 0;
-
- if( RegOpenKeyExW( hkKey, L"Environment", 0, KEY_WRITE, &env ) == ERROR_SUCCESS ) {
- RegSetValueExW( env, (const wchar_t*) varName.ucs2(), 0, REG_EXPAND_SZ, (const unsigned char*)buffer.data(), buffer.size() );
- RegCloseKey( env );
- }
- DWORD res;
- SendMessageTimeout(HWND_BROADCAST, WM_SETTINGCHANGE, 0, LPARAM("Environment"), SMTO_ABORTIFHUNG | SMTO_BLOCK, 1, &res);
- }
- else { // Win 9x
- QFile autoexec( "c:\\autoexec.bat" );
- QTextStream ostream( &autoexec );
- ostream.setEncoding( QTextStream::Locale );
-
- if( autoexec.open( IO_Append | IO_ReadWrite | IO_Translate ) ) {
- ostream << "set " << varName << "=" << varValue << endl;
- autoexec.close();
- }
- }
- }
- if( envBlock & LocalEnv ) {
- if( int( qWinVersion() ) & int( Qt::WV_NT_based ) ) {
- SetEnvironmentVariableW( (TCHAR*)varName.ucs2(), (const wchar_t*) varValue.ucs2() );
- } else {
- SetEnvironmentVariableA( varName.local8Bit(), varValue.local8Bit() );
- }
- }
-#else
- if( envBlock & LocalEnv )
- setenv( varName, varValue, 1 );
-#endif
-}
-
-void QEnvironment::removeEnv( const QString &varName, int envBlock )
-{
-#if defined(Q_OS_WIN32)
- HKEY hkKey;
- if( envBlock & GlobalEnv )
- hkKey = HKEY_LOCAL_MACHINE;
- else
- hkKey = HKEY_CURRENT_USER;
-
- if( envBlock & PersistentEnv ) {
- if( int( qWinVersion() ) & int( Qt::WV_NT_based ) ) {
- HKEY env;
- if( RegOpenKeyExW( hkKey, L"Environment", 0, KEY_WRITE, &env ) == ERROR_SUCCESS ) {
- RegDeleteValue( env, (const wchar_t*) varName.ucs2() );
- RegCloseKey( env );
- }
- }
- else { // Win 9x
- QFile autoexec( "c:\\autoexec.bat" );
- QTextStream ostream( &autoexec );
- ostream.setEncoding( QTextStream::Locale );
-
- if( autoexec.open( IO_Append | IO_ReadWrite | IO_Translate ) ) {
- ostream << "set " << varName << "=" << endl;
- autoexec.close();
- }
- }
- }
-
- if( envBlock & LocalEnv ) {
- if( int( qWinVersion() ) & int( Qt::WV_NT_based ) ) {
- SetEnvironmentVariableW( (TCHAR*)varName.ucs2(), 0 );
- } else {
- SetEnvironmentVariableA( varName.local8Bit(), 0 );
- }
- }
-#endif
-}
-
-#if defined(Q_OS_WIN32)
-void QEnvironment::recordUninstall( const QString &displayName, const QString &cmdString )
-{
- QSettings settings;
- settings.insertSearchPath(QSettings::Windows, "/Microsoft/Windows/CurrentVersion/Uninstall");
- settings.beginGroup("/" + displayName);
- settings.writeEntry("/DisplayName", displayName);
- settings.writeEntry("/Publisher", "Nokia Corporation and/or its subsidiary(-ies)");
- settings.writeEntry("/URLInfoAbout", "http://qtsoftware.com");
- settings.writeEntry("/HelpLink", "http://qtsoftware.com/support");
- settings.writeEntry("/UninstallString", cmdString);
- settings.endGroup();
-}
-
-void QEnvironment::removeUninstall( const QString &displayName )
-{
- QSettings settings;
- settings.insertSearchPath(QSettings::Windows, "/Microsoft/Windows/CurrentVersion/Uninstall");
- settings.beginGroup("/" + displayName);
- settings.removeEntry("/DisplayName");
- settings.removeEntry("/Publisher");
- settings.removeEntry("/URLInfoAbout");
- settings.removeEntry("/DisplayVersion");
- settings.removeEntry("/HelpLink");
- settings.removeEntry("/UninstallString");
- settings.removeEntry("/.");
- settings.endGroup();
-}
-
-QString QEnvironment::getRegistryString( const QString &keyName, const QString &valueName, int scope )
-{
- QString value;
- HKEY scopeKeys[] = { HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE };
- HKEY key;
- DWORD valueSize( 0 );
- QByteArray buffer, expBuffer;
-
- if( int( qWinVersion() ) & int(Qt::WV_NT_based) ) {
- if( RegOpenKeyExW( scopeKeys[ scope ], (const wchar_t*) keyName.ucs2(), 0, KEY_READ, &key ) == ERROR_SUCCESS ) {
- if( RegQueryValueExW( key, (const wchar_t*) valueName.ucs2(), NULL, NULL, NULL, &valueSize ) == ERROR_SUCCESS ) {
- buffer.resize( valueSize );
- if( RegQueryValueExW( key, (const wchar_t*) valueName.ucs2(), NULL, NULL, (unsigned char*)buffer.data(), &valueSize ) == ERROR_SUCCESS ) {
- valueSize = ExpandEnvironmentStringsW( (WCHAR*)buffer.data(), NULL, 0 );
- expBuffer.resize( valueSize * 2 );
- ExpandEnvironmentStringsW( (WCHAR*)buffer.data(), (WCHAR*)expBuffer.data(), valueSize );
- for( int i = 0; i < ( int )expBuffer.size(); i += 2 ) {
- QChar c( expBuffer[ i ], expBuffer[ i + 1 ] );
- if ( !c.isNull() )
- value += c;
- }
- }
- }
- RegCloseKey( key );
- }
- }
- else {
- if( RegOpenKeyExA( scopeKeys[ scope ], keyName.local8Bit(), 0, KEY_READ, &key ) == ERROR_SUCCESS ) {
- if( RegQueryValueExA( key, valueName.local8Bit(), NULL, NULL, NULL, &valueSize ) == ERROR_SUCCESS ) {
- buffer.resize( valueSize );
- if( RegQueryValueExA( key, valueName.local8Bit(), NULL, NULL, (unsigned char*)buffer.data(), &valueSize ) == ERROR_SUCCESS ) {
- valueSize = ExpandEnvironmentStringsA( buffer.data(), NULL, 0 );
- expBuffer.resize( valueSize );
- ExpandEnvironmentStringsA( buffer.data(), expBuffer.data(), valueSize );
- value = expBuffer.data();
- }
- }
- RegCloseKey( key );
- }
- }
- return value;
-}
-#endif
-
-QString QEnvironment::getTempPath()
-{
-#if defined(Q_OS_WIN32)
- DWORD tmpSize;
- QByteArray tmp;
- QString tmpPath;
-
- if( int( qWinVersion() ) & int( Qt::WV_NT_based ) ) {
- tmpSize = GetTempPathW( 0, NULL );
- tmp.resize( tmpSize * 2 );
- GetTempPathW( tmpSize, (WCHAR*)tmp.data() );
- for( int i = 0; i < ( int )tmp.size(); i += 2 ) {
- QChar c( tmp[ i ], tmp[ i + 1 ] );
- if( !c.isNull() )
- tmpPath += c;
- }
- }
- else {
- tmpSize = GetTempPathA( 0, NULL );
- tmp.resize( tmpSize * 2 );
- GetTempPathA( tmpSize, tmp.data() );
- tmpPath = tmp.data();
- }
-#elif defined(Q_OS_UNIX)
- QString tmpPath = "/tmp";
-#endif
- return tmpPath;
-}
-
-QString QEnvironment::getLastError()
-{
- return strerror( errno );
-}
-
-QString QEnvironment::getFSFileName( const QString& fileName )
-{
-#if defined(Q_OS_WIN32)
- QByteArray buffer( MAX_PATH );
- QString tmp( fileName );
-
- GetVolumeInformationA( fileName.left( fileName.find( '\\' ) + 1 ).local8Bit(), NULL, NULL, NULL, NULL, NULL, buffer.data(), buffer.size() );
- if( QString( buffer.data() ) != "NTFS" ) {
- DWORD dw;
- dw = GetShortPathNameA( fileName.local8Bit(), (char*)buffer.data(), buffer.size() );
- if( dw > 0 )
- tmp = buffer.data();
- }
-#elif defined(Q_OS_UNIX)
- QString tmp( fileName );
-#endif
- return tmp;
-}
diff --git a/util/install/win/environment.h b/util/install/win/environment.h
deleted file mode 100644
index d0f45e4..0000000
--- a/util/install/win/environment.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef ENVIRONMENT_H
-#define ENVIRONMENT_H
-
-#include <qstring.h>
-
-class QEnvironment
-{
-public:
- static QString getEnv( const QString &varName, int envBlock = LocalEnv );
- static void putEnv( const QString &varName, const QString &varValue, int envBlock = LocalEnv );
- static void removeEnv( const QString &varName, int envBlock = LocalEnv );
-#if defined(Q_OS_WIN32)
- static QString getRegistryString( const QString &keyName, const QString &valueName, int scope = CurrentUser );
- static void recordUninstall( const QString &displayName, const QString &cmdString );
- static void removeUninstall( const QString &displayName );
-#endif
- static QString getTempPath();
- static QString getLastError();
- static QString getFSFileName( const QString& fileName );
-
- enum {
- LocalEnv = 1,
- PersistentEnv = 2,
- GlobalEnv = 4
- };
-
- enum {
- CurrentUser = 0,
- LocalMachine = 1
- };
-};
-
-#endif
diff --git a/util/install/win/globalinformation.cpp b/util/install/win/globalinformation.cpp
deleted file mode 100644
index a05db1e..0000000
--- a/util/install/win/globalinformation.cpp
+++ /dev/null
@@ -1,168 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "globalinformation.h"
-
-GlobalInformation::GlobalInformation() :
- _qtVersionStr( QT_VERSION_STR ),
- _reconfig( false )
-{
-#if defined(Q_OS_WIN32)
- _sysId = Other;
-#elif defined(Q_OS_MACX)
- _sysId = MACX;
-#else
- _sysId = MingW32;
-#endif
-}
-
-GlobalInformation::~GlobalInformation()
-{
-}
-
-void GlobalInformation::setReconfig( bool r )
-{
- _reconfig = r;
-}
-
-bool GlobalInformation::reconfig() const
-{
- return _reconfig;
-}
-
-void GlobalInformation::setQtVersionStr( const QString& qvs )
-{
- _qtVersionStr = qvs;
-}
-
-QString GlobalInformation::qtVersionStr() const
-{
- return _qtVersionStr;
-}
-
-#if defined(QSA)
-void GlobalInformation::setQsaVersionStr( const QString& qvs )
-{
- _qsaVersionStr = qvs;
-}
-
-QString GlobalInformation::qsaVersionStr() const
-{
- return _qsaVersionStr;
-}
-#endif
-
-void GlobalInformation::setSysId( SysId s )
-{
- _sysId = s;
-}
-
-GlobalInformation::SysId GlobalInformation::sysId() const
-{
- return _sysId;
-}
-
-QString GlobalInformation::text(Text t) const
-{
- QString str;
-
- switch (_sysId) {
- case MSVC:
- if (t == IDE)
- str = "Microsoft Visual Studio 6.0";
- else if (t == Mkspec)
- str = "win32-msvc";
- else if (t == MakeTool)
- str = "nmake.exe";
- break;
- case MSVCNET:
- if (t == IDE)
- str = "Microsoft Visual Studio .NET";
- else if (t == Mkspec)
- str = "win32-msvc.net";
- else if (t == MakeTool)
- str = "nmake.exe";
- break;
- case Watcom:
- if (t == Mkspec)
- str = "win32-watcom";
- else if (t == MakeTool)
- str = "wmake.exe";
- break;
- case Intel:
- if (t == Mkspec)
- str = "win32-icc";
- else if (t == MakeTool)
- str = "nmake.exe";
- break;
- case GCC:
- if (t == Mkspec)
- str = "win32-g++";
- else if (t == MakeTool)
- str = "gmake.exe";
- break;
- case MACX:
- if (t == Mkspec)
- str = "mac-g++";
- else if (t == MakeTool)
- str = "make";
- break;
- case MinGW:
- if (t == Mkspec)
- str = "win32-g++";
- else if (t == MakeTool)
- str = "mingw32-make.exe";
- break;
- case Borland:
- if (t == Mkspec)
- str = "win32-borland";
- else if (t == MakeTool)
- str = "make.exe";
- break;
- default:
- if (t == Mkspec)
- str = "Custom";
- else if (t == MakeTool)
- str = "make.exe";
- break;
- }
-
- return str;
-}
diff --git a/util/install/win/globalinformation.h b/util/install/win/globalinformation.h
deleted file mode 100644
index 843dac6..0000000
--- a/util/install/win/globalinformation.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef GLOBALINFORMATION_H
-#define GLOBALINFORMATION_H
-#include <qstring.h>
-
-class GlobalInformation
-{
-public:
- GlobalInformation();
- ~GlobalInformation();
-
- void setReconfig( bool );
- bool reconfig() const;
- void setQtVersionStr( const QString& );
- QString qtVersionStr() const;
-#if defined(QSA)
- void setQsaVersionStr( const QString& );
- QString qsaVersionStr() const;
-#endif
-
- enum SysId {
- MSVCNET = 0,
- MSVC = 1,
- Borland = 2,
- MinGW = 3,
- Other = 4,
- Watcom = 5,
- Intel = 6,
- GCC = 7,
- MACX = 8
- };
- void setSysId( SysId );
- SysId sysId() const;
-
- enum Text {
- MakeTool,
- IDE,
- Mkspec
- };
-
- QString text(Text t) const;
-
-private:
- bool _reconfig;
- QString _qtVersionStr;
-#if defined(QSA)
- QString _qsaVersionStr;
-#endif
- SysId _sysId;
-};
-
-extern GlobalInformation globalInformation;
-
-#endif // GLOBALINFORMATION_H
diff --git a/util/install/win/install-edu.rc b/util/install/win/install-edu.rc
deleted file mode 100644
index 3e50c1c..0000000
--- a/util/install/win/install-edu.rc
+++ /dev/null
@@ -1,3 +0,0 @@
-IDI_ICON1 ICON DISCARDABLE "install.ico"
-LICENSE RCDATA "../../../dist/edu/LICENSE"
-QT_ARQ RCDATA "qt.arq"
diff --git a/util/install/win/install-eval.rc b/util/install/win/install-eval.rc
deleted file mode 100644
index 78f0477..0000000
--- a/util/install/win/install-eval.rc
+++ /dev/null
@@ -1,3 +0,0 @@
-IDI_ICON1 ICON DISCARDABLE "install.ico"
-LICENSE RCDATA "../../../dist/trial/LICENSE"
-QT_ARQ RCDATA "qt.arq"
diff --git a/util/install/win/install-noncommercial.rc b/util/install/win/install-noncommercial.rc
deleted file mode 100644
index b7d5b7c..0000000
--- a/util/install/win/install-noncommercial.rc
+++ /dev/null
@@ -1,4 +0,0 @@
-IDI_ICON1 ICON DISCARDABLE "install.ico"
-LICENSE RCDATA "../../../dist/noncommercial/LICENSE"
-LICENSE-US RCDATA "../../../dist/noncommercial/LICENSE-US"
-QT_ARQ RCDATA "qt.arq"
diff --git a/util/install/win/install-qsa.rc b/util/install/win/install-qsa.rc
deleted file mode 100644
index f971c3f..0000000
--- a/util/install/win/install-qsa.rc
+++ /dev/null
@@ -1,5 +0,0 @@
-IDI_ICON1 ICON DISCARDABLE "install.ico"
-LICENSE RCDATA "../../../dist/trial/LICENSE"
-LICENSE_QSA RCDATA "../../../../qsa/dist/eval/LICENSE.EVAL"
-QT_ARQ RCDATA "qt.arq"
-QSA_ARQ RCDATA "qt.arq"
diff --git a/util/install/win/install.ico b/util/install/win/install.ico
deleted file mode 100644
index b996fb7..0000000
--- a/util/install/win/install.ico
+++ /dev/null
Binary files differ
diff --git a/util/install/win/install.rc b/util/install/win/install.rc
deleted file mode 100644
index 321c245..0000000
--- a/util/install/win/install.rc
+++ /dev/null
@@ -1,4 +0,0 @@
-IDI_ICON1 ICON DISCARDABLE "install.ico"
-LICENSE RCDATA "../../../dist/commercial/LICENSE"
-LICENSE-US RCDATA "../../../dist/commercial/LICENSE-US"
-QT_ARQ RCDATA "qt.arq"
diff --git a/util/install/win/main.cpp b/util/install/win/main.cpp
deleted file mode 100644
index 0c21523..0000000
--- a/util/install/win/main.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <qapplication.h>
-#include <qmessagebox.h>
-#include "setupwizardimpl.h"
-#include "resource.h"
-#include "globalinformation.h"
-#include "environment.h"
-
-#if defined Q_OS_WIN32
-#include "archive.h"
-#endif
-
-GlobalInformation globalInformation;
-SetupWizardImpl *wizard = 0;
-
-int main( int argc, char** argv )
-{
- QApplication app( argc, argv );
- int res( -1 );
-
- for( int i = 0; i < app.argc(); i++ ) {
- if( QString( app.argv()[i] ) == "-reconfig" ) {
- globalInformation.setReconfig( true );
-
- QString qmakespec = QEnvironment::getEnv( "QMAKESPEC" );
- for (int mks = 0; mks <= GlobalInformation::MACX; ++mks) {
- if (globalInformation.text(GlobalInformation::Mkspec) == qmakespec) {
- globalInformation.setSysId((GlobalInformation::SysId)mks);
- break;
- }
- }
-
- if ( ++i < app.argc() ) {
- globalInformation.setQtVersionStr( app.argv()[i] );
- }
- break;
-#if defined(Q_OS_WIN32)
- } else if ( QString( app.argv()[i] ) == "-add-archive" ) {
- // -add-archive is an internal option to add the
- // binary resource QT_ARQ
- if ( ++i < app.argc() ) {
- if ( addArchive( app.argv()[i] ) )
- return 0;
- }
- return res;
-#endif
- }
- }
-
- wizard = new SetupWizardImpl( 0, 0, false, Qt::WStyle_NormalBorder | Qt::WStyle_Customize | Qt::WStyle_MinMax | Qt::WStyle_SysMenu | Qt::WStyle_Title );
- wizard->show();
-
- app.setMainWidget( wizard );
- res = app.exec();
-
- wizard->stopProcesses();
-
- //### memory leak
-
- return res;
-}
diff --git a/util/install/win/pages/buildpage.ui b/util/install/win/pages/buildpage.ui
deleted file mode 100644
index 0ab4965..0000000
--- a/util/install/win/pages/buildpage.ui
+++ /dev/null
@@ -1,92 +0,0 @@
-<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
-<class>BuildPage</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>BuildPage</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>462</width>
- <height>276</height>
- </rect>
- </property>
- <property name="caption">
- <string>Form11</string>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>layout13</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QTextView">
- <property name="name">
- <cstring>outputDisplay</cstring>
- </property>
- <property name="font">
- <font>
- <family>Courier</family>
- </font>
- </property>
- <property name="vScrollBarMode">
- <enum>AlwaysOn</enum>
- </property>
- <property name="hScrollBarMode">
- <enum>AlwaysOn</enum>
- </property>
- <property name="textFormat">
- <enum>LogText</enum>
- </property>
- <property name="wordWrap">
- <enum>NoWrap</enum>
- </property>
- <property name="autoFormatting">
- <set>AutoNone</set>
- </property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>layout12</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QProgressBar">
- <property name="name">
- <cstring>compileProgress</cstring>
- </property>
- <property name="percentageVisible">
- <bool>false</bool>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>restartBuild</cstring>
- </property>
- <property name="text">
- <string>&lt;Replace&gt;</string>
- </property>
- </widget>
- </hbox>
- </widget>
- </vbox>
- </widget>
- </hbox>
-</widget>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/win/pages/configpage.ui b/util/install/win/pages/configpage.ui
deleted file mode 100644
index 8223d8e..0000000
--- a/util/install/win/pages/configpage.ui
+++ /dev/null
@@ -1,474 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>ConfigPage</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>ConfigPage</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>460</width>
- <height>284</height>
- </rect>
- </property>
- <property name="caption">
- <string>Form9</string>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout3</cstring>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QCheckBox" row="1" column="3">
- <property name="name">
- <cstring>rebuildInstallation</cstring>
- </property>
- <property name="text">
- <string>Rebuild Qt after reconfiguration</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QTextView" row="0" column="2" rowspan="1" colspan="2">
- <property name="name">
- <cstring>explainOption</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>5</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>200</width>
- <height>0</height>
- </size>
- </property>
- <property name="palette">
- <palette>
- <active>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- <color>
- <red>212</red>
- <green>208</green>
- <blue>200</blue>
- </color>
- <color>
- <red>255</red>
- <green>255</green>
- <blue>255</blue>
- </color>
- <color>
- <red>233</red>
- <green>231</green>
- <blue>227</blue>
- </color>
- <color>
- <red>106</red>
- <green>104</green>
- <blue>100</blue>
- </color>
- <color>
- <red>141</red>
- <green>138</green>
- <blue>133</blue>
- </color>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- <color>
- <red>255</red>
- <green>255</green>
- <blue>255</blue>
- </color>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- <color>
- <red>212</red>
- <green>208</green>
- <blue>200</blue>
- </color>
- <color>
- <red>212</red>
- <green>208</green>
- <blue>200</blue>
- </color>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- <color>
- <red>10</red>
- <green>36</green>
- <blue>106</blue>
- </color>
- <color>
- <red>255</red>
- <green>255</green>
- <blue>255</blue>
- </color>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>255</blue>
- </color>
- <color>
- <red>255</red>
- <green>0</green>
- <blue>255</blue>
- </color>
- </active>
- <disabled>
- <color>
- <red>128</red>
- <green>128</green>
- <blue>128</blue>
- </color>
- <color>
- <red>212</red>
- <green>208</green>
- <blue>200</blue>
- </color>
- <color>
- <red>255</red>
- <green>255</green>
- <blue>255</blue>
- </color>
- <color>
- <red>243</red>
- <green>239</green>
- <blue>230</blue>
- </color>
- <color>
- <red>106</red>
- <green>104</green>
- <blue>100</blue>
- </color>
- <color>
- <red>141</red>
- <green>138</green>
- <blue>133</blue>
- </color>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- <color>
- <red>255</red>
- <green>255</green>
- <blue>255</blue>
- </color>
- <color>
- <red>128</red>
- <green>128</green>
- <blue>128</blue>
- </color>
- <color>
- <red>212</red>
- <green>208</green>
- <blue>200</blue>
- </color>
- <color>
- <red>212</red>
- <green>208</green>
- <blue>200</blue>
- </color>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- <color>
- <red>10</red>
- <green>36</green>
- <blue>106</blue>
- </color>
- <color>
- <red>255</red>
- <green>255</green>
- <blue>255</blue>
- </color>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>255</blue>
- </color>
- <color>
- <red>255</red>
- <green>0</green>
- <blue>255</blue>
- </color>
- </disabled>
- <inactive>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- <color>
- <red>212</red>
- <green>208</green>
- <blue>200</blue>
- </color>
- <color>
- <red>255</red>
- <green>255</green>
- <blue>255</blue>
- </color>
- <color>
- <red>243</red>
- <green>239</green>
- <blue>230</blue>
- </color>
- <color>
- <red>106</red>
- <green>104</green>
- <blue>100</blue>
- </color>
- <color>
- <red>141</red>
- <green>138</green>
- <blue>133</blue>
- </color>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- <color>
- <red>255</red>
- <green>255</green>
- <blue>255</blue>
- </color>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- <color>
- <red>212</red>
- <green>208</green>
- <blue>200</blue>
- </color>
- <color>
- <red>212</red>
- <green>208</green>
- <blue>200</blue>
- </color>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>0</blue>
- </color>
- <color>
- <red>10</red>
- <green>36</green>
- <blue>106</blue>
- </color>
- <color>
- <red>255</red>
- <green>255</green>
- <blue>255</blue>
- </color>
- <color>
- <red>0</red>
- <green>0</green>
- <blue>255</blue>
- </color>
- <color>
- <red>255</red>
- <green>0</green>
- <blue>255</blue>
- </color>
- </inactive>
- </palette>
- </property>
- </widget>
- <widget class="QLabel" row="1" column="0">
- <property name="name">
- <cstring>currentInstLabel</cstring>
- </property>
- <property name="text">
- <string>Active Qt installation</string>
- </property>
- </widget>
- <widget class="QLabel" row="1" column="1" rowspan="1" colspan="2">
- <property name="name">
- <cstring>currentInstallation</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="frameShape">
- <enum>StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>Sunken</enum>
- </property>
- <property name="text">
- <string></string>
- </property>
- </widget>
- <widget class="QTabWidget" row="0" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>configTabs</cstring>
- </property>
- <widget class="QWidget">
- <property name="name">
- <cstring>installTab</cstring>
- </property>
- <attribute name="title">
- <string>Install</string>
- </attribute>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QListView">
- <column>
- <property name="text">
- <string>Installation options</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>false</bool>
- </property>
- </column>
- <property name="name">
- <cstring>installList</cstring>
- </property>
- </widget>
- </vbox>
- </widget>
- <widget class="QWidget">
- <property name="name">
- <cstring>generalTab</cstring>
- </property>
- <attribute name="title">
- <string>General</string>
- </attribute>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QListView" row="0" column="0">
- <column>
- <property name="text">
- <string>Qt Library configuration</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>false</bool>
- </property>
- </column>
- <property name="name">
- <cstring>configList</cstring>
- </property>
- </widget>
- </grid>
- </widget>
- <widget class="QWidget">
- <property name="name">
- <cstring>advancedTab</cstring>
- </property>
- <attribute name="title">
- <string>Advanced</string>
- </attribute>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QListView">
- <column>
- <property name="text">
- <string>Advanced options</string>
- </property>
- <property name="clickable">
- <bool>true</bool>
- </property>
- <property name="resizeable">
- <bool>true</bool>
- </property>
- </column>
- <property name="name">
- <cstring>advancedList</cstring>
- </property>
- </widget>
- </hbox>
- </widget>
- </widget>
- </grid>
- </widget>
- </hbox>
-</widget>
-<tabstops>
- <tabstop>configTabs</tabstop>
- <tabstop>configList</tabstop>
- <tabstop>explainOption</tabstop>
- <tabstop>rebuildInstallation</tabstop>
- <tabstop>advancedList</tabstop>
-</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/win/pages/finishpage.ui b/util/install/win/pages/finishpage.ui
deleted file mode 100644
index de6b5f7..0000000
--- a/util/install/win/pages/finishpage.ui
+++ /dev/null
@@ -1,63 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>FinishPage</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>FinishPage</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>444</width>
- <height>284</height>
- </rect>
- </property>
- <property name="caption">
- <string>Form12</string>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout1</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QTextView">
- <property name="name">
- <cstring>finishText</cstring>
- </property>
- </widget>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>showReadmeCheck</cstring>
- </property>
- <property name="text">
- <string>Show README file</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </vbox>
- </widget>
- </hbox>
-</widget>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/win/pages/folderspage.ui b/util/install/win/pages/folderspage.ui
deleted file mode 100644
index ada15f7..0000000
--- a/util/install/win/pages/folderspage.ui
+++ /dev/null
@@ -1,259 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>FoldersPage</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>FoldersPage</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>443</width>
- <height>284</height>
- </rect>
- </property>
- <property name="caption">
- <string>Form8</string>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout15</cstring>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QGroupBox" row="0" column="0">
- <property name="name">
- <cstring>folderBox</cstring>
- </property>
- <property name="title">
- <string>Folders and paths</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLabel" row="0" column="0">
- <property name="name">
- <cstring>folderLabel</cstring>
- </property>
- <property name="text">
- <string>Program &amp;folder</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>folderPath</cstring>
- </property>
- </widget>
- <widget class="QLayoutWidget" row="0" column="1" rowspan="1" colspan="2">
- <property name="name">
- <cstring>Layout2</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLineEdit">
- <property name="name">
- <cstring>folderPath</cstring>
- </property>
- <property name="frameShape">
- <enum>StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>Sunken</enum>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>folderPathButton</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="pixmap">
- <pixmap>image0</pixmap>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLabel" row="1" column="0">
- <property name="name">
- <cstring>qtDirLabel</cstring>
- </property>
- <property name="text">
- <string>Set &amp;QTDIR</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>qtDirCheck</cstring>
- </property>
- </widget>
- <widget class="QLabel" row="2" column="0">
- <property name="name">
- <cstring>devSysLabel</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>&amp;Path</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>devSysPath</cstring>
- </property>
- </widget>
- <widget class="QLayoutWidget" row="2" column="1" rowspan="1" colspan="2">
- <property name="name">
- <cstring>Layout3</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLineEdit">
- <property name="name">
- <cstring>devSysPath</cstring>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>devSysPathButton</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="pixmap">
- <pixmap>image0</pixmap>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QLabel" row="3" column="0">
- <property name="name">
- <cstring>groupLabel</cstring>
- </property>
- <property name="text">
- <string>Folder &amp;group</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>folderGroups</cstring>
- </property>
- </widget>
- <widget class="QComboBox" row="3" column="1" rowspan="1" colspan="2">
- <property name="name">
- <cstring>folderGroups</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- <widget class="QCheckBox" row="1" column="1">
- <property name="name">
- <cstring>qtDirCheck</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- <spacer row="1" column="2">
- <property name="name" stdset="0">
- <cstring>Spacer8</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </grid>
- </widget>
- <spacer row="1" column="0">
- <property name="name" stdset="0">
- <cstring>Spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </grid>
- </widget>
- </hbox>
-</widget>
-<images>
- <image name="image0">
- <data format="XPM.GZ" length="379">789c5d8ecb0a02310c45f7fd8ad0ec069907f531207e82e252101769b5388b51d07121e2bf6b1f195b6f28cd3d24b7ad0ad86dd75054e23ed0d0193067ba41717cf4fd737f58bd846ce6d028984123274296606073bd9c5c8fdf1eeba92b678db36dddaa60c959abec2258cdd62a9fc3424477a50cfdc18cc5d9c0e20eaffbbf90260c2a390f35c54a1823fa9bc39fc63cc3429e4b51cccb5060398a6c5478f7bd141fb90a5251</data>
- </image>
-</images>
-<tabstops>
- <tabstop>folderPath</tabstop>
- <tabstop>folderPathButton</tabstop>
- <tabstop>qtDirCheck</tabstop>
- <tabstop>devSysPath</tabstop>
- <tabstop>devSysPathButton</tabstop>
- <tabstop>folderGroups</tabstop>
-</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/win/pages/licenseagreementpage.ui b/util/install/win/pages/licenseagreementpage.ui
deleted file mode 100644
index 5349e1f..0000000
--- a/util/install/win/pages/licenseagreementpage.ui
+++ /dev/null
@@ -1,202 +0,0 @@
-<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
-<class>LicenseAgreementPage</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>LicenseAgreementPage</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>440</width>
- <height>284</height>
- </rect>
- </property>
- <property name="caption">
- <string>Form3</string>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>layout4</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>countryLayout</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <spacer>
- <property name="name">
- <cstring>spacer4</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>31</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- <widget class="QLabel">
- <property name="name">
- <cstring>countryLabel</cstring>
- </property>
- <property name="text">
- <string>Please choose your region:</string>
- </property>
- </widget>
- <widget class="QComboBox">
- <item>
- <property name="text">
- <string>North or South America</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Anywhere outside North and South America</string>
- </property>
- </item>
- <property name="name">
- <cstring>countryCombo</cstring>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>spacer3</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>51</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- <widget class="QTextView">
- <property name="name">
- <cstring>introText</cstring>
- </property>
- <property name="text">
- <string>The license could not be found in the package. The package might be corrupted.
-Please contact support@trolltech.com to resolve the problem.</string>
- </property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout3</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer>
- <property name="name">
- <cstring>Spacer1_3</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>156</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="QButtonGroup">
- <property name="name">
- <cstring>licenceButtons</cstring>
- </property>
- <property name="frameShape">
- <enum>NoFrame</enum>
- </property>
- <property name="title">
- <string></string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>acceptLicense</cstring>
- </property>
- <property name="text">
- <string>I agree</string>
- </property>
- </widget>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>rejectLicense</cstring>
- </property>
- <property name="text">
- <string>I disagree</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </vbox>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer3</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>155</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- </vbox>
- </widget>
- </hbox>
-</widget>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/win/pages/licensepage.ui b/util/install/win/pages/licensepage.ui
deleted file mode 100644
index 9c7b98c..0000000
--- a/util/install/win/pages/licensepage.ui
+++ /dev/null
@@ -1,264 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>LicensePage</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>LicensePage</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>445</width>
- <height>284</height>
- </rect>
- </property>
- <property name="caption">
- <string>Form2</string>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout6</cstring>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLabel" row="3" column="0">
- <property name="name">
- <cstring>licenseeLabel</cstring>
- </property>
- <property name="text">
- <string>Licensee</string>
- </property>
- </widget>
- <widget class="QLabel" row="5" column="0">
- <property name="name">
- <cstring>expiryLabel</cstring>
- </property>
- <property name="text">
- <string>Support and upgrade expiry</string>
- </property>
- </widget>
- <widget class="QLineEdit" row="5" column="1">
- <property name="name">
- <cstring>expiryDate</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- <widget class="QLineEdit" row="2" column="1">
- <property name="name">
- <cstring>licenseID</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- <widget class="QLabel" row="1" column="0">
- <property name="name">
- <cstring>customerIDLabel</cstring>
- </property>
- <property name="text">
- <string>Customer ID</string>
- </property>
- </widget>
- <widget class="QLineEdit" row="6" column="1">
- <property name="name">
- <cstring>key</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- <widget class="QLabel" row="4" column="0">
- <property name="name">
- <cstring>productsLabel</cstring>
- </property>
- <property name="text">
- <string>Products</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>productsString</cstring>
- </property>
- </widget>
- <widget class="QLineEdit" row="3" column="1">
- <property name="name">
- <cstring>licenseeName</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>licenseInfoHeader</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>1</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Enter the supplied license information here, all fields except Licensee are mandatory.
-Alternatively, the installation wizard may read them from a license file.</string>
- </property>
- <property name="alignment">
- <set>WordBreak|AlignVCenter</set>
- </property>
- </widget>
- <widget class="QComboBox" row="4" column="1">
- <item>
- <property name="text">
- <string>qt-professional</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>qt-enterprise</string>
- </property>
- </item>
- <property name="name">
- <cstring>productsString</cstring>
- </property>
- </widget>
- <spacer row="8" column="1">
- <property name="name">
- <cstring>Spacer7</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- </spacer>
- <widget class="QLabel" row="2" column="0">
- <property name="name">
- <cstring>licenseIDLabel</cstring>
- </property>
- <property name="text">
- <string>License ID</string>
- </property>
- </widget>
- <widget class="QLayoutWidget" row="7" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>Layout5</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <spacer>
- <property name="name">
- <cstring>Spacer5</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- </spacer>
- <widget class="QPushButton">
- <property name="name">
- <cstring>readLicenseButton</cstring>
- </property>
- <property name="text">
- <string>Read from file...</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer6</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- </spacer>
- </hbox>
- </widget>
- <widget class="QLineEdit" row="1" column="1">
- <property name="name">
- <cstring>customerID</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>7</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- </widget>
- <widget class="QLabel" row="6" column="0">
- <property name="name">
- <cstring>keyLabel</cstring>
- </property>
- <property name="text">
- <string>Product key</string>
- </property>
- </widget>
- </grid>
- </widget>
- </hbox>
-</widget>
-<tabstops>
- <tabstop>customerID</tabstop>
- <tabstop>licenseID</tabstop>
- <tabstop>licenseeName</tabstop>
- <tabstop>productsString</tabstop>
- <tabstop>expiryDate</tabstop>
- <tabstop>key</tabstop>
- <tabstop>readLicenseButton</tabstop>
-</tabstops>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/win/pages/optionspage.ui b/util/install/win/pages/optionspage.ui
deleted file mode 100644
index 01033d2..0000000
--- a/util/install/win/pages/optionspage.ui
+++ /dev/null
@@ -1,503 +0,0 @@
-<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
-<class>OptionsPage</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>OptionsPage</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>413</width>
- <height>372</height>
- </rect>
- </property>
- <property name="caption">
- <string>Form7</string>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>layout8</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QGroupBox">
- <property name="name">
- <cstring>optionsGroup</cstring>
- </property>
- <property name="title">
- <string>Installation options</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLabel" row="0" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>pathLabel</cstring>
- </property>
- <property name="text">
- <string>Destination &amp;path (appr. 1Gb free space required)</string>
- </property>
- <property name="buddy" stdset="0">
- <cstring>installPath</cstring>
- </property>
- </widget>
- <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>pathLayout</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLineEdit">
- <property name="name">
- <cstring>installPath</cstring>
- </property>
- <property name="frameShape">
- <enum>LineEditPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>Sunken</enum>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>installPathButton</cstring>
- </property>
- <property name="text">
- <string></string>
- </property>
- <property name="pixmap">
- <pixmap>image0</pixmap>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget class="QCheckBox" row="2" column="1">
- <property name="name">
- <cstring>installExamples</cstring>
- </property>
- <property name="text">
- <string>Build &amp;Examples</string>
- </property>
- <property name="accel">
- <string>Alt+E</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QCheckBox" row="2" column="0">
- <property name="name">
- <cstring>installTools</cstring>
- </property>
- <property name="text">
- <string>Build &amp;Tools</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QCheckBox" row="3" column="0">
- <property name="name">
- <cstring>installExtensions</cstring>
- </property>
- <property name="text">
- <string>Build E&amp;xtensions</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QCheckBox" row="3" column="1">
- <property name="name">
- <cstring>installTutorials</cstring>
- </property>
- <property name="text">
- <string>Build T&amp;utorials</string>
- </property>
- <property name="accel">
- <string>Alt+U</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- <widget class="QCheckBox" row="4" column="1">
- <property name="name">
- <cstring>skipBuild</cstring>
- </property>
- <property name="text">
- <string>&amp;Skip Build Step</string>
- </property>
- <property name="accel">
- <string>Alt+S</string>
- </property>
- </widget>
- <widget class="QCheckBox" row="4" column="0">
- <property name="name">
- <cstring>installDocs</cstring>
- </property>
- <property name="text">
- <string>Install &amp;documentation</string>
- </property>
- <property name="accel">
- <string>Alt+D</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </grid>
- </widget>
- <widget class="QButtonGroup">
- <property name="name">
- <cstring>sysGroup</cstring>
- </property>
- <property name="title">
- <string>Compiler options</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget" row="0" column="1">
- <property name="name">
- <cstring>layout13</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QCheckBox">
- <property name="name">
- <cstring>installIDEIntegration</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>&amp;Integrate with IDE</string>
- </property>
- <property name="accel">
- <string></string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- <property name="buttonGroupId">
- <number>99</number>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>spacer7_2</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>40</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </vbox>
- </widget>
- <widget class="QLayoutWidget" row="1" column="0" rowspan="1" colspan="2">
- <property name="name">
- <cstring>layout21</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>layout20</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>sysOther</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Other</string>
- </property>
- <property name="buttonGroupId">
- <number>4</number>
- </property>
- </widget>
- <widget class="QComboBox">
- <item>
- <property name="text">
- <string>win32-watcom</string>
- </property>
- </item>
- <property name="name">
- <cstring>sysOtherCombo</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>5</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="duplicatesEnabled">
- <bool>false</bool>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>spacer9</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>121</width>
- <height>21</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- <widget class="QLabel">
- <property name="name">
- <cstring>noteLabel</cstring>
- </property>
- <property name="text">
- <string>Note: The compilers specified in the 'Other' section are not officially supported.</string>
- </property>
- </widget>
- </vbox>
- </widget>
- <widget class="QLayoutWidget" row="0" column="0">
- <property name="name">
- <cstring>layout7</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>sysMsvcNet</cstring>
- </property>
- <property name="text">
- <string>Microsoft Visual C++ .&amp;NET</string>
- </property>
- <property name="accel">
- <string>Alt+N</string>
- </property>
- <property name="buttonGroupId">
- <number>0</number>
- </property>
- </widget>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>sysMsvc</cstring>
- </property>
- <property name="text">
- <string>Microsoft &amp;Visual C++</string>
- </property>
- <property name="accel">
- <string>Alt+V</string>
- </property>
- <property name="buttonGroupId">
- <number>1</number>
- </property>
- </widget>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>sysBorland</cstring>
- </property>
- <property name="text">
- <string>&amp;Borland C++</string>
- </property>
- <property name="accel">
- <string>Alt+V</string>
- </property>
- <property name="buttonGroupId">
- <number>2</number>
- </property>
- </widget>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>sysMinGW</cstring>
- </property>
- <property name="text">
- <string>MinGW32</string>
- </property>
- <property name="buttonGroupId">
- <number>3</number>
- </property>
- </widget>
- <widget class="QRadioButton">
- <property name="name">
- <cstring>sysIntel</cstring>
- </property>
- <property name="text">
- <string>Intel C++</string>
- </property>
- <property name="buttonGroupId">
- <number>6</number>
- </property>
- </widget>
- </vbox>
- </widget>
-
- </grid>
- </widget>
- <spacer>
- <property name="name">
- <cstring>spacer6</cstring>
- </property>
- <property name="orientation">
- <enum>Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>20</width>
- <height>64</height>
- </size>
- </property>
- </spacer>
- </vbox>
- </widget>
- </hbox>
-</widget>
-<images>
- <image name="image0">
- <data format="XPM.GZ" length="379">789c5d8ec10ac2300c86ef7d8ad0dc8a6cad4e3b101f41f1288887b43ae6610a3a0f22bebb766de6e65f4af27f247f9b2bd86dd7a072716fa93d7bf035dd401d1f4df3dc1f562f21cd02cc0ce660e444c80c3c6cae9753e8f1dba3d6bad03a581f6c5994d36829d8ca56365ac7b6b25d0e0b11431932ec2e8e589a8d2cedf07af71772845119e7a1a374068c11fdcde14f7d9e6721cf0d51ca1ba1c8c628b15ef1ddf7527c00b6995250</data>
- </image>
-</images>
-<connections>
- <connection>
- <sender>sysOther</sender>
- <signal>toggled(bool)</signal>
- <receiver>sysOtherCombo</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>sysBorland</sender>
- <signal>toggled(bool)</signal>
- <receiver>installIDEIntegration</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
- <connection>
- <sender>sysMsvcNet</sender>
- <signal>toggled(bool)</signal>
- <receiver>installIDEIntegration</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>sysMsvc</sender>
- <signal>toggled(bool)</signal>
- <receiver>installIDEIntegration</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>sysOther</sender>
- <signal>toggled(bool)</signal>
- <receiver>installIDEIntegration</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
- <connection>
- <sender>sysMinGW</sender>
- <signal>toggled(bool)</signal>
- <receiver>installIDEIntegration</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
- <connection>
- <sender>sysIntel</sender>
- <signal>toggled(bool)</signal>
- <receiver>installIDEIntegration</receiver>
- <slot>setEnabled(bool)</slot>
- </connection>
- <connection>
- <sender>skipBuild</sender>
- <signal>toggled(bool)</signal>
- <receiver>installTools</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
- <connection>
- <sender>skipBuild</sender>
- <signal>toggled(bool)</signal>
- <receiver>installTutorials</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
- <connection>
- <sender>skipBuild</sender>
- <signal>toggled(bool)</signal>
- <receiver>installExtensions</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
- <connection>
- <sender>skipBuild</sender>
- <signal>toggled(bool)</signal>
- <receiver>installExamples</receiver>
- <slot>setDisabled(bool)</slot>
- </connection>
-</connections>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/win/pages/pages.cpp b/util/install/win/pages/pages.cpp
deleted file mode 100644
index 3ee4093..0000000
--- a/util/install/win/pages/pages.cpp
+++ /dev/null
@@ -1,349 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "pages.h"
-#include "resource.h"
-#include "../environment.h"
-#include <qcombobox.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qvalidator.h>
-#include <qdir.h>
-#include <qbuttongroup.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qmultilineedit.h>
-#include <qfiledialog.h>
-#include <qtabwidget.h>
-#include <qmessagebox.h>
-#include <setupwizardimpl.h>
-#include <qtextbrowser.h>
-#include <qtextview.h>
-#include <qlayout.h>
-
-#if defined(Q_OS_WIN32)
-#include <windows.h>
-#endif
-
-extern SetupWizardImpl *wizard;
-
-BuildPageImpl::BuildPageImpl( QWidget* parent, const char* name, WindowFlags fl )
- : BuildPage( parent, name, fl )
-{
-}
-
-ConfigPageImpl::ConfigPageImpl( QWidget* parent, const char* name, WindowFlags fl )
- : ConfigPage( parent, name, fl )
-{
- if( globalInformation.reconfig() ) {
- currentInstLabel->show();
- currentInstallation->show();
-#if defined(Q_OS_WIN32)
- // Makes no sense to have the rebuild installation option on DOS based
- // Windows
- if ( qWinVersion() & WV_NT_based )
-#endif
- rebuildInstallation->show();
-#if defined(Q_OS_WIN32)
- else {
- rebuildInstallation->setChecked( false );
- rebuildInstallation->hide();
- }
-#endif
- } else {
- currentInstLabel->hide();
- currentInstallation->hide();
- rebuildInstallation->hide();
- }
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- // ### these pages should probably be included but all options should be
- // disabled so that the evaluation customer can see how he can configure Qt
- configTabs->removePage( generalTab );
- configTabs->removePage( advancedTab );
-#else
- configTabs->removePage( installTab );
-#endif
-}
-
-FinishPageImpl::FinishPageImpl( QWidget* parent, const char* name, WindowFlags fl )
- : FinishPage( parent, name, fl )
-{
-#if !defined(Q_OS_WIN32)
- showReadmeCheck->hide();
-#endif
-}
-
-FoldersPageImpl::FoldersPageImpl( QWidget* parent, const char* name, WindowFlags fl )
- : FoldersPage( parent, name, fl )
-{
-#if defined(Q_OS_WIN32)
- QByteArray buffer( 256 );
- unsigned long buffSize( buffer.size() );
- GetUserNameA( buffer.data(), &buffSize );
- folderGroups->insertItem( "Anyone who uses this computer (all users)" );
- folderGroups->insertItem( QString( "Only for me (" ) + QString( buffer.data() ) + ")" );
-#if defined(QSA)
- folderPath->setText( QString( "QSA " ) + globalInformation.qsaVersionStr() );
-#else
- folderPath->setText( QString( "Qt " ) + globalInformation.qtVersionStr() );
-#endif
- if( qWinVersion() & Qt::WV_NT_based ) // On NT we also have a common folder
- folderGroups->setEnabled( true );
- else
- folderGroups->setDisabled( true );
-#elif defined(Q_OS_UNIX)
- folderGroups->setDisabled( true );
-#endif
-}
-
-LicenseAgreementPageImpl::LicenseAgreementPageImpl( QWidget* parent, const char* name, WindowFlags fl )
- : LicenseAgreementPage( parent, name, fl ),
- titleStr("License agreement")
-{
-#if !defined(NON_COMMERCIAL)
- countryLabel->hide();
- countryCombo->hide();
- delete countryLayout;
-#else
- connect( countryCombo, SIGNAL(activated(int)), SLOT(countryChanged(int)) );
-#endif
- connect( licenceButtons, SIGNAL(clicked(int)), SLOT(licenseAction(int)));
-}
-
-void LicenseAgreementPageImpl::licenseAction(int act)
-{
- if( act )
- wizard->setNextEnabled( this, false );
- else
- wizard->setNextEnabled( this, true );
-}
-
-void LicenseAgreementPageImpl::countryChanged(int index)
-{
- ResourceLoader *rcLoader;
- if ( index == 0 )
- rcLoader = new ResourceLoader( "LICENSE-US" );
- else
- rcLoader = new ResourceLoader( "LICENSE" );
-
- if ( rcLoader->isValid() ) {
- introText->setText( rcLoader->data() );
- } else {
- QMessageBox::critical( this, tr("Package corrupted"),
- tr("Could not find the LICENSE file in the package.\nThe package might be corrupted.") );
- }
-}
-
-LicensePageImpl::LicensePageImpl( QWidget* parent, const char* name, WindowFlags fl )
- : LicensePage( parent, name, fl )
-{
-#if defined(Q_OS_MAC)
- // StyledPanel style looks very windowsish
- customerID->setFrameShape( QFrame::LineEditPanel );
-#endif
- customerID->setFocus();
-#if defined(EVAL)
- // ### improve text
-# if defined(QSA)
- licenseInfoHeader->setText( tr("Thank you for your interest in QSA.\n"
- "Please enter the license information you got for this evaluation version of QSA.") );
-# else
- licenseInfoHeader->setText( tr("Thank you for your interest in Qt.\n"
- "Please enter the license information you got for this evaluation version of Qt.") );
-# endif
-
- customerIDLabel->setText( tr("Name") );
- licenseIDLabel->setText( tr("Company name") );
- licenseeLabel->setText( tr("Serial number") );
- evalName = customerID;
- evalCompany = licenseID;
- serialNumber = licenseeName;
-
- expiryLabel->hide();
- expiryDate->hide();
- productsLabel->hide();
- productsString->hide();
- keyLabel->hide();
- key->hide();
- readLicenseButton->hide();
-#elif defined(EDU)
- licenseInfoHeader->setText( tr("Please enter the license information for the educational edition of Qt.") );
-
- customerIDLabel->setText( tr("Educational institution") );
- licenseeLabel->setText( tr("Serial number") );
- university = customerID;
- serialNumber = licenseeName;
-
- licenseIDLabel->hide();
- licenseID->hide();
- expiryLabel->hide();
- expiryDate->hide();
- productsLabel->hide();
- productsString->hide();
- keyLabel->hide();
- key->hide();
- readLicenseButton->hide();
-#else
- licenseID->setValidator( new QIntValidator( -1, 9999999, licenseID ) );
-
- // expiryDate and productsString comes from the license key
- expiryDate->setEnabled( false );
- productsString->setEnabled( false );
- keyLabel->setText( tr("License key") );
- licenseInfoHeader->setText( tr("Please enter your license information.\n"
- "The License key is required to be able to proceed with the installation process.") );
-#endif
-}
-
-QValidator::State InstallPathValidator::validate( QString& input, int& ) const
-{
- if ( ( globalInformation.sysId() == GlobalInformation::MSVC ||
- globalInformation.sysId() == GlobalInformation::MSVCNET )
- && input.contains( QRegExp("\\s") ) ) {
- QMessageBox::warning( 0, "Invalid directory", "No whitespace is allowed in the directory name due to a limitation with MSVC" );
- return Intermediate;
- } else if ( globalInformation.sysId() == GlobalInformation::Borland && input.contains( "-" ) ) {
- QMessageBox::warning( 0, "Invalid directory", "No '-' characters are allowed in the directory name due to a limitation in the "
- "Borland linker" );
- return Intermediate;
- }
- return Acceptable;
-}
-
-OptionsPageImpl::OptionsPageImpl( QWidget* parent, const char* name, WindowFlags fl )
- : OptionsPage( parent, name, fl ),
- titleStr("Options"),
- shortTitleStr("Choose options")
-{
- connect( installPathButton, SIGNAL(clicked()), SLOT(choosePath()));
- sysGroup->setButton(globalInformation.sysId());
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- sysOther->hide();
- sysOtherCombo->hide();
- noteLabel->hide();
-#endif
-#if defined(Q_OS_WIN32)
- installPath->setText(
- QString( "C:\\Qt\\" ) +
- QString( globalInformation.qtVersionStr() ).replace( QRegExp("\\s"), "" ).replace( QRegExp("-"), "" )
- );
- installPath->setValidator( new InstallPathValidator( this ) );
-#elif defined(Q_OS_MAC)
- // ### the replace for Windows is done because qmake has problems with
- // spaces and Borland has problems with "-" in the filenames -- I don't
- // think that there is a need for this on Mac (rms)
- QString base("QtMac-");
- base = QDir::homeDirPath() + QDir::separator() + base;
-#if defined(EVAL)
- base += "Eval-";
-#elif defined(EDU)
- base += "Edu-";
-#endif
- installPath->setText(base + QString( globalInformation.qtVersionStr() ).replace( QRegExp("\\s"), "" ));
- sysGroup->hide();
-#endif
-}
-
-void OptionsPageImpl::choosePath()
-{
- QDir dir( installPath->text() );
-
-#if defined(Q_OS_WIN32)
- if( !dir.exists() ) {
-# if defined(QSA)
- dir.setPath( "C:\\Qt_QSA" );
-# else
- dir.setPath( "C:\\Qt" );
-#endif
- }
-
- QString dest = QFileDialog::getExistingDirectory( installPath->text(), this, NULL, "Select installation directory" );
- if ( dest.isNull() ) {
-# if defined(QSA)
- dest = "C:\\Qt_QSA";
-# else
- dest = "C:\\Qt";
-# endif
- }
- if ( dest.right(1) == "\\" ) {
-# if defined(QSA)
- dest += "Qt_QSA";
-# else
- dest += "Qt";
-# endif
- }
- if ( dest.contains( QRegExp( "\\s" ) ) && !sysBorland->isChecked() )
- QMessageBox::warning( 0, "Invalid directory", "No whitespace is allowed in the directory name due to a limitation with MSVC" );
- else if ( dest.contains( "-" ) && sysBorland->isChecked() )
- QMessageBox::warning( 0, "Invalid directory", "No '-' characters are allowed in the directory name due to a limitation with the Borland linker" );
- else {
- dir.setPath( dest );
- installPath->setText( QDir::toNativeSeparators(dir.absPath()) );
- }
-#elif defined(Q_OS_MAC)
- if( !dir.exists() )
- dir.setPath( "/" );
-
- QString dest = QFileDialog::getExistingDirectory( installPath->text(), this, NULL, "Select installation directory" );
- if (!dest.isNull())
- installPath->setText( dest );
-#endif
-}
-
-ProgressPageImpl::ProgressPageImpl( QWidget* parent, const char* name, WindowFlags fl )
- : ProgressPage( parent, name, fl )
-{
- // ######### At the moment, we show only one line when unpacking. So the
- // horizontal scrollbar is never shown for now to avoid flickering.
- filesDisplay->setHScrollBarMode( QScrollView::AlwaysOff );
-}
-
-#if defined(Q_OS_WIN32)
-WinIntroPageImpl::WinIntroPageImpl( QWidget* parent, const char* name, WindowFlags fl )
- : WinIntroPage( parent, name, fl )
-{
-#if defined(QSA)
- textBrowser->setText( "<p>This program installs Qt and QSA.</p>" + textBrowser->text() );
-#else
- textBrowser->setText( "<p>This program installs Qt.</p>" + textBrowser->text() );
-#endif
-}
-#endif
diff --git a/util/install/win/pages/pages.h b/util/install/win/pages/pages.h
deleted file mode 100644
index 8108f42..0000000
--- a/util/install/win/pages/pages.h
+++ /dev/null
@@ -1,226 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef PAGES_H
-#define PAGES_H
-
-#include <qvalidator.h>
-
-#include "buildpage.h"
-#include "configpage.h"
-#include "finishpage.h"
-#include "folderspage.h"
-#include "licenseagreementpage.h"
-#include "licensepage.h"
-#include "optionspage.h"
-#include "progresspage.h"
-#include "winintropage.h"
-#include "../globalinformation.h"
-
-class Page
-{
-public:
- virtual QString title() const = 0;
- virtual QString shortTitle() const = 0;
-};
-
-class BuildPageImpl : public BuildPage, public Page
-{
- Q_OBJECT
-public:
- BuildPageImpl( QWidget* parent = 0, const char* name = 0, WindowFlags fl = 0 );
- ~BuildPageImpl() {}
- QString title() const
- {
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- return "Building Qt Examples and Tutorial";
-#else
- return "Building Qt";
-#endif
- }
- QString shortTitle() const
- {
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- return "Build Qt Examples";
-#else
- return "Build Qt";
-#endif
- }
-};
-
-class ConfigPageImpl : public ConfigPage, public Page
-{
- Q_OBJECT
-public:
- ConfigPageImpl( QWidget* parent = 0, const char* name = 0, WindowFlags fl = 0 );
- ~ConfigPageImpl() {}
- QString title() const
- {
- if( globalInformation.reconfig() )
- return "Reconfigure Qt";
- else
- return "Configuration";
- }
- QString shortTitle() const
- { return "Configure Qt"; }
-};
-
-class FinishPageImpl : public FinishPage, public Page
-{
- Q_OBJECT
-public:
- FinishPageImpl( QWidget* parent = 0, const char* name = 0, WindowFlags fl = 0 );
- ~FinishPageImpl() {}
- QString title() const
- { return "Finished"; }
- QString shortTitle() const
- { return "Finish"; }
-};
-
-class FoldersPageImpl : public FoldersPage, public Page
-{
- Q_OBJECT
-public:
- FoldersPageImpl( QWidget* parent = 0, const char* name = 0, WindowFlags fl = 0 );
- ~FoldersPageImpl() {}
- QString title() const
- { return "Folders"; }
- QString shortTitle() const
- { return "Choose folders"; }
-};
-
-class LicenseAgreementPageImpl : public LicenseAgreementPage, public Page
-{
- Q_OBJECT
-public:
- LicenseAgreementPageImpl( QWidget* parent = 0, const char* name = 0, WindowFlags fl = 0 );
- ~LicenseAgreementPageImpl() {}
- QString title() const
- { return titleStr; }
- QString shortTitle() const
- { return titleStr; }
-
-private slots:
- void licenseAction(int);
- void countryChanged(int);
-
-public:
- QString titleStr;
-};
-
-class LicensePageImpl : public LicensePage, public Page
-{
- Q_OBJECT
-public:
- LicensePageImpl( QWidget* parent = 0, const char* name = 0, WindowFlags fl = 0 );
- ~LicensePageImpl() {}
- QString title() const
- {
-#if defined(QSA)
- return QString("License Information to Install QSA %1").arg(globalInformation.qsaVersionStr());
-#else
- return QString("License Information to Install Qt %1").arg(globalInformation.qtVersionStr());
-#endif
- }
- QString shortTitle() const
- { return "License information"; }
-
-#if defined(EVAL)
- QLineEdit* evalName;
- QLineEdit* evalCompany;
- QLineEdit* serialNumber;
-#elif defined(EDU)
- QLineEdit* university;
- QLineEdit* serialNumber;
-#endif
-};
-
-class InstallPathValidator : public QValidator
-{
-public:
- InstallPathValidator( QObject* parent = 0, const char* name = 0 ) : QValidator( parent, name ) {}
- ~InstallPathValidator() {}
- QValidator::State validate( QString& input, int& ) const;
-};
-
-class OptionsPageImpl : public OptionsPage, public Page
-{
- Q_OBJECT
-public:
- OptionsPageImpl( QWidget* parent = 0, const char* name = 0, WindowFlags fl = 0 );
- ~OptionsPageImpl() {}
- QString title() const
- { return titleStr; }
- QString shortTitle() const
- { return shortTitleStr; }
-
-private slots:
- void choosePath();
-
-public:
- QString titleStr;
- QString shortTitleStr;
-};
-
-class ProgressPageImpl : public ProgressPage, public Page
-{
- Q_OBJECT
-public:
- ProgressPageImpl( QWidget* parent = 0, const char* name = 0, WindowFlags fl = 0 );
- ~ProgressPageImpl() {}
- QString title() const
- { return "Installing"; }
- QString shortTitle() const
- { return "Install files"; }
-};
-
-class WinIntroPageImpl : public WinIntroPage, public Page
-{
- Q_OBJECT
-public:
- WinIntroPageImpl( QWidget* parent = 0, const char* name = 0, WindowFlags fl = 0 );
- ~WinIntroPageImpl() {}
- QString title() const
- { return "Introduction"; }
- QString shortTitle() const
- { return "Introduction"; }
-};
-
-#endif // PAGES_H
diff --git a/util/install/win/pages/progresspage.ui b/util/install/win/pages/progresspage.ui
deleted file mode 100644
index 927d975..0000000
--- a/util/install/win/pages/progresspage.ui
+++ /dev/null
@@ -1,78 +0,0 @@
-<!DOCTYPE UI><UI version="3.2" stdsetdef="1">
-<class>ProgressPage</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>ProgressPage</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>440</width>
- <height>286</height>
- </rect>
- </property>
- <property name="caption">
- <string>Form10</string>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>layout2</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <widget class="QTextEdit">
- <property name="name">
- <cstring>filesDisplay</cstring>
- </property>
- <property name="vScrollBarMode">
- <enum>AlwaysOn</enum>
- </property>
- <property name="hScrollBarMode">
- <enum>AlwaysOff</enum>
- </property>
- <property name="textFormat">
- <enum>LogText</enum>
- </property>
- <property name="linkUnderline">
- <bool>false</bool>
- </property>
- <property name="wordWrap">
- <enum>NoWrap</enum>
- </property>
- <property name="undoDepth">
- <number>0</number>
- </property>
- <property name="autoFormatting">
- <set>AutoNone</set>
- </property>
- </widget>
- <widget class="QProgressBar">
- <property name="name">
- <cstring>operationProgress</cstring>
- </property>
- <property name="centerIndicator">
- <bool>false</bool>
- </property>
- <property name="percentageVisible">
- <bool>false</bool>
- </property>
- </widget>
- </vbox>
- </widget>
- </hbox>
-</widget>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/win/pages/sidedecoration.ui b/util/install/win/pages/sidedecoration.ui
deleted file mode 100644
index 1ea5761..0000000
--- a/util/install/win/pages/sidedecoration.ui
+++ /dev/null
@@ -1,108 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>SideDecoration</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>SideDecoration</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>122</width>
- <height>156</height>
- </rect>
- </property>
- <property name="caption">
- <string>Form1</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLabel">
- <property name="name">
- <cstring>logoPixmap</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>0</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="pixmap">
- <pixmap>image0</pixmap>
- </property>
- <property name="scaledContents">
- <bool>false</bool>
- </property>
- <property name="alignment">
- <set>AlignTop</set>
- </property>
- <property name="vAlign" stdset="0">
- </property>
- </widget>
- <widget class="QLayoutWidget">
- <property name="name">
- <cstring>Layout1</cstring>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>0</number>
- </property>
- <property name="spacing">
- <number>0</number>
- </property>
- <widget class="QLabel">
- <property name="name">
- <cstring>versionLabel</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Installing Qt</string>
- </property>
- </widget>
- <widget class="QLabel">
- <property name="name">
- <cstring>editionLabel</cstring>
- </property>
- <property name="sizePolicy">
- <sizepolicy>
- <hsizetype>1</hsizetype>
- <vsizetype>0</vsizetype>
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>(Clear me)</string>
- </property>
- </widget>
- </vbox>
- </widget>
- </vbox>
-</widget>
-<images>
- <image name="image0">
- <data format="XPM.GZ" length="55092">789cccbd47b7eb38b2ef397f9fa2d6e5ecae5e7cf266d0035266cb6da7ed77af1ed07b2f1aa9bf7c83883f704c56d5cd7c75bb5f95d6c9ca5f8a22114044202200f0fccffffcdbe7d3fddffef37ffe8fea625c02eb6f966f947ffb4fbb4e92ebfff57fff9fffcffff88fe160f0b7fecf68389bfe6df41fffc7fff80febf96fd6df9401ff5fcff64232ffde36244f7a762ac953fefd56f29cf35cf2a267f3072ff9f733c906e7836493f35eb2c59fd74ab6797b1f243bfcfb46b2cb7fef0a1e72799c5af2907f7f94cce5732cc963fefd483297cf3a8387d43f992999ffde0c25f3dfb79a64de5f662099dfcfe924cf386f24f3fe4a44ff0fd17e5b327f9e772799dfcfb8078fa87d662499cbebbb9249de6fc9bcbd9d2f99dab795ccc7b31a48e6e3b71a4ae6e315ed25f3f1b04f82a93f0dc1636a9ff32999daf32599f757a54ae6fde17e48e6fae23892b97e78a2bd63ea1f438cef849e97e892f9f7652b99b76f3d91cce53763f0947e6f08fd9c1137b664de5e43c83fc7f53bf0022cf475499c8be719c4f113d824de5cc01671fd0eb6895dbaff50d8ab174ae6f2ad3ac9a47f63c924df4832d73f732a99f777f324998fb73993ccfb5f7f96ccc7df3a49e6e3514592b9bd3aa664ae1fd6bd646eaf9a2b98f4ddf52573fdb58e60d89f6d49e6df9b13c97c3c1d45326fbf634826ffb2934cfee40086fdf88164de7ff65232d9eb9b646e1fa607867e9bbe641a8f816092cf14f2423f4d070c7d8b9f25f3e7bbaf60e89fb791ccfb3b15df43ffe22f30f42f13f240ffea1b18fab716bf877ee967b043dc92bf1f0ea16fdd9af3a8f740bc3dbe64f2f70bc9bcbfcd2fc9bcbfbd4432f90b4730f5cff55e3297bfc9c0187f732899f4772099c6e35b321f7f6b0fc6f8daa6649aff7692f9f3724d32d7f7cb4932ef6ffb4e32e9b302c6f86723c9dcdefc50326f9ff32e99f7975382a10fd75c32d7e795906742fdd3bd49e6df67a2bdd09ff20886beb89164fefcd54932ef9ffa2c98fca72bda0b7d6a9f25f3feb0c4f842bf9a07b0d02fd13fd0afe2090cffd6c660e85b24ae87be05a40f63e1df8277c9bc7debab643e5e575732efef6e2799cb1bfcf89ecbdbed2573fd5cfd781e1fcf952d98fa3b91cf277f74cd24f3fe0f3ec08807ba8d64ae9fc54232e98f27993faff9f13df787ae680ff4d57995cce57103c95c7fac3bc97c7c7c5f308d67b8028bf9f72299cbd3dc49e6f2981f92797fd69664de5f7e2499dbb33b92ccdb6f2dc1d067772099fca72e99b7ff6a49a6f946f437f4b9bd48267934b0d0ef77c9bc7dad68df9cee9fee25f3fe69447fcc31df88f1843eaf6e92f9f3da89649a0fee25f3f1cb85be41ff0331bed07f5f8ca7f0a7d43f13a1df9d2a99f777f32899dfffea80111faeae92b93cee41f090f7effa0c463ce77f48a6f9ee51321fafeb4930f547bb01433fecb164fe7cff5b321f2f2f92ccfb3f93d793bd745b30f421ae2593bfd94be6fd1b2692b93cde4e32b79fda164ced8ddec1d017e74332f9dbb564de5e772899e299140c7dcaa692b93db8df92797fe61d18fe3117e303fd59b792e979b164de3f8918ff05f5cf46f40ff4c715e301fdb9bd80e13f57f792797fad4a30fce906bf17f3f51ae331c4fc19a13d43f89780e693a9f0a7ed028cebfd4e321fafe6198c7cc00b2473f9bc77c95cdf4a4ff0908fc75a5c8f78bfb52553fcf02999ebbfdf08a6f10e5ec1c2bfdc49a6f97c2b99e6ff27c9642f3fbee7fab416f2407fc299643efe912f99ec692099cbd3b492b9bc9ab8ff94c63711fd0bfdb2a792c93e2ac9140f689229df5125f3feed5660e85ffd2a99fce34432efdfee00867e5e14c9941f8ec0d0bfcc904cf9572a99b7a76e25f3fe73c760a1afaa646ebf99e85fe86f2ec61bfaea0b79e11f0ba12f2eda8bfb4b7d267b98897c64dd81a1cfeb503297afbd934cf1d45e30fc93f81ef363b896ccefbf3a4a26793dc1149fae7d30f247ff2a99ea1d3fbee7fed68b05a31eb1924cf9c2083ca5f6076bc9542fd948e6fa900e2473fdbbbc09463d630246be1a6692f9f84481643edef95532b73f5df01cfd7993ccdb7be92453beb5924cf3c14432efbf5cfc7e01fffa2999e6bfb1646e5f9b022ce2cba364de3e37114cfec132c0d047f74d32f9e37b30f26b2f05431f5763c9bc7f42c1d04797e6cf99d0c71be41fc21fa52a18fe24207d9f0bfd5a1d04d3f8570fe009d573dca3642e7fbb054f697ca237c1246f3a944cf53a5b32c5a72f60f81bd796ccaf4f2bc994af2d2593be6f2453bea682e7345eed4e32d5ff14c9bcbf2f57c95cff7dd15ef8a35097ccdb93cd25537e2bfa6b3124fffd055ec2bfcc24537c548045fe518331decda7647ebd2eda6ba37fc478c01f6d44ffb8d43e1ded17e3af3960cc97f5022cf481e257a6dd149fd96bf08cc6ffe64aa6f92604c35eec4032b7efab2799e2375b30e94b2aae5f50ff58aa642e6fe148a67ce1065e927fb80d2553bd2494cc9fdf3e49a6fc45c863c07e1dc97cfcd3a3606a5f7d05633e887682497faf4bb08df8e2030cfb2bc9de17a2ff4bf49f886762f4cf10f666bd80618f3e8dff92f5177f5e914be6ed2f36e005c91b5f24533cf22598ecafeec04be467ae64f28757b041bfaf5f040f29fe68c0268d9726da63917e14a2bdd0c7f424998f5f44fdb314fd91bf83a18f8105467fdc4660e86783e789fee94a30e215e3118c78a3a0f9dc60fd45fa34072f491fc329d8a0f685a964aae7dfc0265d5f2f05537f568f60d86bb091ccfbe36248e6fad988dfbba85f8e24533e48f66f88fe892b30fa67634ba6f97508467f6d1cb0a827435ed11f35fa6388f9c9a7f8c814f157fd065e92fe5f6e6083e42f5cb0897ac417d8227dca3fc036f55fb305431fba77c1747f3b02bba4df3ad9ab29e42f669229df46fb647fe460d8d3aa0243fecd2758d4bbefc0a21eb403a33f2a8a772c263f6fff35055ba827d1f85aa2bf2f1a58f4f70a8cfb252a18febdf1c0f02701f58f2dda7f5d48a6fe9b8071fff21d2cfc83603caf51c1b87fb106433f4b1a1f87fd17eebf1b17ec903efbd43e46b0f71a0c79cb2d58c4e72d18cf2f1bb078be0dc6f3339abf5cd11f8906c6f5de1a8cf846e3f6c1cbe724df068cf6548964ae3f1b130c7f9096608c7f7603a3bde90e8ce7bb2f60b4d77e00c39f075c9f98f639e47fa34832d7e7f84c2c9eb7ba80216ffb08c6f3cc042cd64f1a30e42f9760d88fe382d19e1ced19c11e42aebf0cf17cd306435ecb04a33d610e16f20b16f1470a16ed3981457cf9443c82bdae2660e19f79bc341c8be7d70e18cfd71ec022df8ac178feaa05e379d72bf108e3df70ff369cc8fe1d8345bc9c81d1fe60452cfaeb7a03c3be74ba7e2adbd382f1fbcb3b18e3910dc1689f4df24e657fd4603cafb2c168bffb0cc6f32b1ebf0c67e2fe01e9d34cdcef1283e12faa6f30ee67f860e1ffe660a1efdc7f0ee7e2fed58c58b6e70cc6ef8d002cd6173db0a83f2dc0d0b78edbf77021e5bd078bf6aec1f87d41fabd14f2155bb0f8fd108cdfeb2330da93de83f1fc8ac6d310f2ac1a309ed772ff3734c5fdb48d64ee0fb72e58d4e75ec0f87d7202a33f0d713df4a5237bb7e4782a60b11ee681d15eed112cee1782a1cf158f4f86b6b8bf6581c5fa2af5a733823f762d30eed7d2efdd11f2efcd1d18d76bdc5e468311f2a3c007e379f5082cea75f760e8fbfa8d782cf49dfba3d150fcbebc030b7bdc83a17f099faf472371ffe64c2ceed73460e883cefb6b3416f7ab4fc463e10f2c30e46b8927e279b94b2cee6f6cc1d087ec092cec4930c6f342f24f85fc46442caef75660e8cf85fb93d18cfd9ec783f1162ceaa37cfe19cdc5fd3ceabfb990d79d80d13eeb152cd64fe9fa85f8de7c05a33df9188cf66cbec0d0c7f50d0c7df3b8ff1f2d85bcce002ce227078ceb1d0f2cfca54e3c41fb6f74bd21ef5780f17c5d058bf53beeaf46e618ebd77a2299c77f5bba9f25c6b7f4c1c2bfbd80d19eeb07f104fda1933cb678de2603e37eba01c6ef6f57b0a8ff71ff3d72c6a8b7e8d47faee88fb507c6effd188cdf3bdc1ec67d38c739e2e3c5a63393e21723269e60fde4f22c99d677b93e307577285eb7b8fd8f27ecfe9cf50e0c7d8a79ff8ca7ec7bfefb6b412cc627db81c57e823730ead9eb1158d43fb8bce399b8fe7a0716eb5d7330c663c3fb733c67eda1fa484d2cc6c39a83a11fed193ca57a651282b13e16f3f96ebc9860bdc8d880c5fe810c2cf21bae8fe3e544d4cb23c93c5ed30a30ea071b170cff92d0f81813d443d71730eaed9a07c6f53eb7b7b1c9bee7fa117c49a6f5024b30c5b3760cb6b19ec9e3adb13331e8face93ccfbaf3883f13c23013ba8a72e05d3fd0d1b8c7c734df23b53d8df86facf9da03e7e1b80f1fc82f7e76430813e6d63e229fa3be5e333194e4cd40b52b04ded31b8fe4e4653110ff2fa0a73a736f28d9a788afd67fa180cfd6a1db0588fe3fe7f32610accfb77c3f59721f2c77c493cc5fe0aaf00e37eb731788afa4e059ed1f8361f60d48f6dde1f93d914ebc7460a46bd2fe4fd37994fc7940f6cbec1e89f98cf5f93a578def5013c433d86da6f4c51bf09b9bd4dcce982f2b39cebcbc49a22fff6b83e4dec29ea15d95932adb704c433acffebf43c776ad1fd039d7886f5d315bf3f5356f09acf77d3d1d4a5fa65734f3cc3fe035d134cf7372c30ec355b824dc413dc3fb0e9906574dcdf79c4e2f74501c6fa5b74104cdfb73c3e9d4ea6d6887f7fdb10b3e791bef1f9940ddf1ceb078fe005f5b7c5e7e3e96c86f58f8d0246fd3a76c1f311f9b377b043e31bf07c693a9fa1de19df816dec07f804bb584fa3fe5accc47a86069e517b82002cd6f775b043f39bc6e3dde9923d8eeb7332035bd47f3705ec60ff824d3cc7fecf84ebefd498c19e2faf609bfa2be6f9f0d49c2d51cff5c016e5fb2b176c8f78fb8b15d8a5fa99c9e7d7a93543fdab1b831dfafde6287844f5d10e8cf1af49bfac39c63bff024f499e98ee6fb3fb937f7d023bd4fed407bb435aafb124d37e2d5d30b53f03cf87d43eeb0d8cf5dd7803c67cb7e1f63d75587f707df1e9fece7c30a2fd5d7b30f6b3469f9269fdc792cce5594dc1587fba52ffb84c1edebecd5e326f7f41faebceb19f2cda8271bfa6133ca2e727e0118d4fb2164cfa9c2892f978af4c30eca1f1c19321d7bf2bff7e3660e34ff5e53bb043cfaf5dc174bf6c0076a97fdb929805acfcfb6d0446bdbee4ed9f0d857eddd660f89b6e2298da5f05c4ac3f687e6bc0c311ad87e07a263f9f0fda77f094da537f8067245fc5f569369a1963d29f2b31eb5fdabfe20ba6e7a777e0d188ff3eb9815906c29fa78227d04f053ca3f6b65c3f6663260fd553a93d2cfca4fec91bc95cfeea041e517f5fb8fece2662fcdd023c86ff33c1d31167cd06cf21cf5c308d679d8017d41f0df72fb3e9cc1ef3ebab14ec8c69bfc05432ed47d38885fe5d4cc9b4fe37028fc8fecb37c9649f25784cf6ebbf82e7f47dbc042fe87e05f5cf4ce8936b82e7f4fb36113ca6f17a002fe8f986b8de80fe8bef4dd28fc292cce52fa68269fc4d1effb0db2f49decd0c0c7fdc92fe2ce6131a3f6d2d98fcb7bf02cf49bf370330d68fea5a30fdde38831dfabea3fe59b2fea178b0009bd41e4f03db23aeff37713decb5f00593fc2df5a7c1ee47eb6f2330eadd17156c8ea87ff7609bfc45590b267f78d5c02e714bfa6ab2f1207ff80136c87ef22918f34dfe06c67cd186c48b018dafcee3cd99c5ee47faa48217647f99609bf4c7a0f1b2160392afa3f6da6cfc68bcd69279ff949f6093daef4ec1f067f5817831a4e76de8f70ebb9ece177c806d6abfb3235ec0dfba2bc9b4df9bc6d7ed1376ae5f5c3fe703263f6f4f520a1e53fc99102f66d4be8cf7cf7cc8e4e3d7673e784c7cdd82a7d4de5a03c3fe751e9f3265c2fca09be009d94fc2e397394b87c99f186bf08cfa4fe3fd3b9fb0e7717dacc792e97c0b8f5f58f8bb20d6793d613e5f2cc7b49fc5005bd49e35b56fb1c4fcecf1fe9e2fd9f7743dfdde582ca83f8267b049ed59f3f9686eb2eb69fd782699d62fa83de67244f67de1fa3eb79643b237ef2698f4ab9e8347d4feb0008fc99e1c6a8fbd70d05f4762261e6f9f46e3e730a6f3160618fdbbe6f9c6dc5d0ea8bd0df5bf6b88f89aebdfa25f00a5f8ff4e32edd749c0636aff66019ee17939780e7de2f92a73f643e8bb031e537b7c133c237bf5dec073ba7f44f71f1a225ea3e78f447f79dfe011ddcfe3f22dc68c29feff06e379ba0e9ed2ef0b1effb1747d44f3b1fd0d5ed2f78d0236c65cdf367c7e5fb0009858bf07cfd15f7bf082f4a3492473f96f19d8257b6df8f82e66cb05f55fbe223630ff6f797cbc98b3f67079527afe82319d17e1f6b7581a03fafdc693ccc7d7a0fb194b97da7bbb111b63f2af1bae9f0bd31810eb7cbd61612d1dd2bf94da671943c8cfe7af856d8c69be6e0563be594f2573fdd7b8bd2c1c763ded0f53c01392c7bb4ae6fdd3717d5db8c684fa4bbb134cdfa767f094e28180fba3e5c080fff15fc0b309f5ef9764d24ff13dfc43cae7a3e5d0807d6cf8782d47acbdfcfeed0b783ea1fad50ebca0ef6f3ed82079a32f30f2c5644f6c627f5acce7df655fd0e1e3930460a662dc3f1cc14beaaf40133ca178a8069bf47cdf90ccc74ff3c10e8de78dfa676c8afd09b564daff5982b1ff36a6f64c58ffd2fed40b7836a1fac504bc9c50fd6101c6fc97abc426e2b3700fc67911f3018cf33ac99d643e1edd198cf3176e07463da4fa0063bf8826be47bd53e7fe773965e345fded806db217eb1d8c78f29612b3f6923ea9603cbffb0663bf4949d7b38083c663b3022f68fceb7bb043f6118682a9ff8c02ec92bfcbe9fe7dba49f5c30d18fb636c9e2f2ce7ecf7144f2a6097e4bbe5c4ecf7140fcdc0b0b734018bfde03a784af3c53504cfb15f47dc0ffb0bbb8160ecbffc002fa95e58edc1d8bf1a4dc1163d2f36c1a8575495609c5f1a4aa6f3a134febd83e2ed2f376093faafa3e72fcc01f1f50b3c217ddd5660ac37ad63f00cfe5407cf69beef5230ea35c6026c60bfe55532e55b39d8a4eb6f73b0d8df20ee6f637fe04a32cdff03b043fd757b904cf9d9168c7ae7ed2299ce7b3692697fc898d8c2f99ddb128cf3b317f49f85fa6348f75f1a06d9afb604c37ff817b04dfa1c0ec10ee9bb4ef22ecd015d7fdd8047345eb5079e907e598e60d2d7b40363ffe3762598e2d5750e16e703d692297ffc128cf35768af897afb36108cfaee5c32d56b0f9269fe2e24f3f61731d880ff5125d37ed80558ac974c25d37ec09d64de7fe64132f73fea27d8a2f15732c9b4bea008a6f655a23fb1dfb28c24d3fe470d8c7ae1ed5132e95b2099cf8fa6e82fd4e3c32fc9b4bee3125b38ef7723ff641816d99b7d03dbe48fc22bd8a1f9f95a825d9adf4af28706eb1ede5eaf060fe97aaf133ca1fc5605237e6d8ee009e5bbd5198cf58b4efc1efb6fb71730f67bae66e025c5df8a09c6fecae020998fafd248a6f3ba909fd93b6f4f71025bb0af52329ddf9849e6cf533fc036e993924ba6f96726993f2fcec00ef57ff12e99e2c34a32ed7f0cc1f017d5bb649aef7cc9bc3f22f13c97fa4fc3f859388f5a6d25f3f69443c1d86f3b06e37c4be54ae6edd354c9bc7dd791643aefdc4aa67acf2b18e7f134f13dced325a4ef26d3379affc95f9826e2cb952a99c6f7153ca57835fd0463ff691108267fb579028b78c2001b34dee14532bf7f62814df88b4832d52f2ab085f59d0118eba3752899ecff2699eae307c9b43fb405431f9454329d2fbb97ccdb938cc02ee95b2adaebd2f8b590dfc279e448974ce3f12998e67b4d30ce074713c934ff403e0be72d2dba9fc5e607defeca014fc85f5413f094e2313b954cfea0114cfe467901233fd41792a99e6a49a6f527c198afd71bc9549fb9822dea8fba944cf9502799dad782b17e6d7592c9be6782495fea42321fdff8c7f77cbcb477b043fa1deb9229ff4904e37cc697641a7f0decd27828aa647abfc45032ade7b982495f13b25fcbc2fb0c944032d9cb93606abf5949a6f314cf60bc4fc00a24f3f6b79960d29f5a914cf11dfa53d87bf82999d6df303e16ceb755a4cf369b3fc8ff7660ec3f57de04933ff0f760ac5f665bc114df2b67c1a44f57156c507f5f1cc9b49ff3198cfdc69bab60aac7ac4f601be7fd22c1781fc95132ddaf95ccdbabd492b93e794f60e883229e87fd9ef959326fbf3a964cf9e00318fe5d9d4be6fda192fed916ce83a92f92a93dbe64ca8fd11f229e4c6f92f9f3938164ca1f4f82b1fe994ae6df871f60acf79a6bc9bc7f62f49785f3b1b75230d95775914cf30bfacfc279b22df90f47c413a621995f9f7be011f99b6d2b98e2136d021e4f683d63059e4cb83e7ae2fa19dd4f3b83e734df943118f581f22099cba33c8397549f592dc026d69b8f9279fb6f9f60e453d6156c537f5a63c9644f8160aa47695330fc8dee0aa6e7c5b964f28791648a6fe692297e580aa6fa6628da8bf8c3bc974cf9642118fa38954cf58f89649acf1692e93c27e9936361ffbdd149e6df2b9e609c1f7d96ccf549ad24d37974e887d0676721998f8fba924cf1fa9364b247713df687754f92e9fc672399ea45a23d581f35af92f9f7b9f81eef13885ac1181f4b32d5dfa10f16f6a3044bc974dee9158cfd3f892399fcbb2d993fff26fa6786fd3ba23f711ef146d7bbcc7e283f7b944ce7995ec0639aafab25784af671db0a9e52feb200cfc9fe320f2cec650f5e52beae7d49a6f319e2fe4bd457766083f453bf80b11fa878154cf6b2adc1585f37c4fde0af235530f251717fc45b9e90d7c17ca848a67add5530ad1f74a160aa8f76e279c8e7c34630f97f3b174cf2379a645abf247fe35a781f90ff2818f3c1443297571d49a67cfd4930cd87da1b58e8ff5630ece74b32cd1fa564aaef7982697dc87900633f73694ae6faa0be4aa6fd789a648aa724637fd25a32ed3f79924ceb3d3330f6f325ad64de1fd98364927f2598facbd42553fd3594ccafcf311e16cecbdf22c95c5e652a99de7f267e8ff3c9e1bb641a6f4732bf3efb008bfd812f92297eb32473794b31bec87fa30a2ccea3ee0493ff30f79269bfe23718f53e6b2099ea0377609c7f34be2453fc7b914cf91c1f2f63c0e6478a0fb6e019d58be207c1538aff8fe039e503712b99e6eb5c3297a750c04b1afff22618fb1922c1347fc73bc9b47f4630f2f9eda360b2efab2e98fcd1ea158cfd83452598f47f6b48e6cf8feec1a8b7a40bc1f05f3bc9bcffb61918f596f85d32d5e3447fbaa48ff94030f6ffdc24737bf267c416f6a7ac3f2453fe580bc67e99122cceeb9c24533d6b2299f4ad108cfce30773fd500cc9341f7792a9fe6b0ba6f5da6b2399ce372ec1d85f1d9d25f3efd59b60f89f3bc9bc3fd4a364f22f6f60ec97543792797fa8a960d8c74d32f9932918f61ed49269ff832d99e44d24f3f61a23c1d43f96fc1ef1fe1c8cf763448e645a3f16cfc3fe3d632899e2955832cdafd01f0be7d5ad4a32ad9f3792b9fcc64030ced3d792b93e9723c9b41feb02c6fe67732b99f68b7c4aa6faa3180f9c17f6499ffa032dc46bf098ec5d8f24d3fe08133ca1f530ed049e527eb7f50593ffb83c48a6fd570a7846f7d36b30e6fff25b32d5ab73c1145f28ef82299ed1e660d473b64f92a9def92698fcdd5a3cdf46fd24914cfbcd74c9b43e21e445fda611f7437cb1fe124cf65edcc02edd3f7225d3fb001e05d3fc5ebd108b7879bb93ccfbc72f05937e66a9605abf538e92493f56e021d99f6249a6fa5b2b98fc9f72914cedc3785a789f52f12698e42943c964ef17c9e40fe792697e1849e6f2648e60ac470660bc9f243b4aa6fd3fa1647ebda20826f9d24c32ef0ff55e32d5d7447f60fe2f9f25933f5a4aa6f8e62c18f9502299f40ffa61e1fd4b4a2899f6279492495ed19e29e297028cf795048d64dedef05530e29137c9e47fe4efb19f740cc6fed152134ced0f55c9fcfb488c17dedf74b9934cf64dfa3c326754ffab0cc1643f510ac67a78ba04633e77466083ecb309c026cdffa921998f476582b19fa7ba0aa6f93e5e0ba6fca6188051bf4b447bb1bf4aff00237ff60f92e9fd41f792e9bc7d2599e6f717c1d8cf247e8f7a5d160ba6fecf23c1b4bf21a0f86264e13c72f82499f2fd57c1f06727c954bfcec098df755b30d9ef7a2e98ecdf78974cf54cb447d47b3d5330e2cb0fc9b4df47dc0ffbd12ea9647a9fec1e2cde07f92e99f60b1c05239e3e4ba6f9df974cf9d74932ed9ffff17b2e5f70014f90ef288261df8664b25f5332bd6f0ae36be1fc4ef92499f22d4b3297ff593c0fefb7525dc9e4df3c30de5fa53a9229feb12553bc2ec66f46f2565f92c97f37609ca7b4df25d37e825a32adff89fba39eaafb92293fea24f3ebb7627cb13ebbfd944cfbadbf2453fe37154cf287a664d257d15e715e80fa6fcce673f2af117846f94076075e503d2188c1d88f9a9b82c91f2457c954cf38832df2279ba9647adfe70a8cfaecf62098e2ef6e2699ce27ed04533cb2d5c0d8efaa3c09a6fa46f12199ec5d3c0feba51dcd9f63517f5dbd0886bd3f4be6d76f7f30d59b62c164afde5432d5271f2453bdf0118c7abd77124ced4f1ac914afae2553bd5edc0ff3b9f32498ec6d1308a6f66c55c9341fdd83313f9ba23da8ef46a564dabf664aa6fd21f27b8a37e291643abfe249a6f9ce174cfb13a2028cf78b25b9647a1fd4a364f20fdf92c97f0c25d37a512599d607a03f22bf375ac994ffa49229ff78944cf94a2618fe48fe1ef59e4632bd3f270163becf2ac994bf8beb71fe4b0d2453bd27964cf552d13fa807da2f9269ff612499e627d13ed40f424330b55f13d763bfc6ed4332c50f37c1f0f78a64daff3d964cfb43c578637daf7a138cfd39429f719e6745fa30314df21f590ec6fedd32134cfbb10c5d30f98bcb8b64da2f3c01dbd87fbc174cf5c92001e37c4d25eee760fff1b7605a0fc8b792e9fc81b8bf43f149740263ff68fe2a989eb722fb9c8878201849a6f75f9e25d3f37cc974fee15532bdaf752898ecdd0904d37a475080512faf7e30e9432e18e7f56e82914f5482c91e0bf13ce4ff7e2698c627fb924cebcfe2f7d8ff1b3e80719eaa934cfaee3992491e717ff80f6f2699f22ff13dcecfa753c9e4bf0e92293f394aa6fd139660b2cfc8904cf9df4230e68b4a32add78bf1c0feda740ec6fbebcab3648a8f2792c95fd492299e1848a67ccd164cf25b2d58f887ab64f2379d64de3fea4132bd6f4efc7e8e7827944cfb7f1e2553bd4f134cfa6c799269ffb6781eea8df14432b57f2718ebe591645a2f8b05231f15bfc77e0f652699e229f13cbc7faa9a4ba6f361427fb03f5013fa8cf5e2c495ccbfd73dc924af180fec0fd33e24737922f17c9c6f6cc91ea626f69b5e13f082fccfe64d32d547bfc0385f565ec0886fba1cecd07a663394ccfb237b05633d627b144cf6779949a6f75fd682c93f06349f4dc5fa433d154cfaace982697d721b4aa6f3c11918f585742299fce5bd64aa67958229be5ac560ac27ac12c178bfd79b64da0ff1e37b7adf95fc3dcef70592a95ebb174cfe3a10cf47fda01c08c67e1b5f32bdcfb0134cfde12a92493ed17f585fc81f25d378dc49a6f8e253308d57249e3f417c7a904cfbcd7e30c5d382b11e982592797f24df82b1de954ba67aa6907f4af69baec138af6c8d24533d692f99ea733bc1e4ff3c0b2cde37be944cfe712499f2b1b964b2675732c52bd0670bfb45d54832e58fba64da0fb301e3fd8d4a2499d67f857ee0fc72f82d99be5f81713e3e194aa6fd49e27e588fb89ec1884fae13c9d4ffa27fb0bff0229e67537fae481f66e612fb2d776083ec3debc026eaa53618f18a3b0323fe580f04d3f5c98b64da7f63825df217852e99ce77907c33113f6c4dc134df6f1f24d37c9982b17ee04f05537b9a77c9148f88dfa3deb07a92ccfb7f73168cf365778229be48bf25537d19f28bf501e55e309d4fc94f92c97fcec158cf2b12c1e41fbb4fc9b43e3d104cf3f7f6158cf87ebb170cffe448267942c1e47fba05187f1f455049a6f5614330f4ff0d8cf3b88ab83fde3770d94ba6fafc12bca0f6a557c1c80f6dc9644fb964aa7f1492a99eb1934cf3f718bc44fd632199f2ab67c914bfd782518f16e389f78346a23dd8bfa58c25d379ba4030c95b5f2453fc5c824deacfec2299f6eb6c25d37ae74630e2b94632ad170bf9b13fb87b964cf514713df61bd4aa643a9f0f7bb31cecbf10fa28f6e3f89269bd83e2adb9399f52bd33032fa6fcfef9086cd07e8d95f81eeb1b97a964b2bf0dd8a2f958ff02dbb41fbbbb825d9a3f2eb5608a3fe28560caafb6141fcd45fdb11a83b11e180f05d37e5c5f114cfe669d8051ef6f3dc1a40fab108cf3d9e55a30ce3b1a60d4d78bab649a5fe5f7645f978364dededbb360f247452899ea616730d6e7d6779269fdfb4330f9bbd4148cf8e7058cf5b8e44932bdffe25e30f6835c24d3f9d1b964b27f713decdd16ed9b937fd2f792a99ed2082679a247b0380f33964cf3ab18af05c52f57d1df381f5baf2453bcff0046fcacfe60daaf6a4aa6f9ed4b30ce7fce25d3fedd1918f65f8af1c37e6d4f954cf9cf5a32c927fa17fbede254326faf22aec77c1bd582a9fd971d58ecef3524d3fe5ea1bfd84f97d1f82ec47a83be124cf5c8ca07dba4efbab8de9df2dffba44f0b51afeb5cc1747d32154cf61eecc043ccf74f9269ffd3098cf7495c1e25d3f9c14a30ad9f281f92693de2001ee3bcf34430e94f71114cfe259883f17ef6b52599de2f36144cfaa23c4aa6fafd188cfa79d60a267de832c1345f1786649a3f7e30cd97a2bdc86ff55232c54fb9648a6fc4f367e44fbaa1649a5f669269ffb7f87e4ef6915f2453beaf4ba6f9443c1feb655a2c99e47b944cfb532493ff6bef25d3f86ec1e2bc532318ef1712fa82f3cdc55e32b5ff1b0c7b5acd25d3df9fa04ba67ac25e32bd0f44b4cfc0f95ad13f787f759c08c6fb8f34c9141f6e2453fee80b46fe22fac7c2fbafef24933f17fa8efdf9590dc6fb8d4a8a079626ceb3d513b04bfa5a527cb664f645eb65067848f359fd8369bfec063cc27ae45532d5e31f25f3f15c3d83315f5d12c9544f740553fe1e6592a93f3dc158bfb88127145ffb9560b2873a96cce5d75f25537ce90ba6fa62f283a95e2ae49bd2f82b0f82c93ef385645a6f17ed453d39984aa6fac04c32fdfd5607c1a42ff14a30cdb7b74232e5a76f60e483fe5132cdafb960c4fb5f60c4aba52218ebaf7b30d69fb6e27b9c1f0ceec1d82f962b92c95f1d24537da7148cf93d05239f534f92e9bc8bb81fcefb1547c9544fabc1383fe68af1c67e92f807d3fe43213ff6af7662fcb19fdaa37cc410f5ebfc5e30cd1f6b07ecd2f85a347e06332faa8f1cc0d0efdb17784cf6e91a82499ff44ff004eb318f92693fdebd649adf5f05937efa67c1347fe91618e7bb6e7782112faa60ac8736a1601a8fac00a31ee98c05e37d155bc1347ff8aa647a1fc009bca0f1f21682c99f9ae2fe0b6acf360763fd62bb168cfcb0148cf7790879f1be9ad4954cf53cd17fd8bfe49f24533db1164cfdbd7d07e33cd346fc1efb17b789643a4f300423bf303760bcdfec42f669b27885ee47f38169e1bc977e124cf18d3706e3fd11fa163c22fdda9482a7b43e7805c3ff058660ba9f2b9e87f364d14632d5fb4792e9ef37fe02e33cd926028bf364efe039c9b712f747fdd9ad24d3f58231fee58b601affdb9b648a6f7230dedfe12d25d3fa760a467d3817f218145fd99f9269bda1924cefdf93df23fe7e009b349f98623c2c1a5ffb2298ee97d8609c3f32e6609c3f8b2cc9646f0bc914cf3f4aa6786607c6fe958ee20f8bcdafb43f81e20b165e93fe5c3e25d37e30f13dea3ddd093cc27ede2d18f5983804e3fd1d9a25989ed7168269ff61fa089e223f9e8167d47f862699d6f39e25d3fe68152ce2b70318e7c9ec67c9f4fe12138cf70f252918f1932b9e67507caf08f9f1be9938069b648fc15e308dbf32108cf7df88e7637f627c150cff7a0163ff42f000c6f99c88ec9b4d37a867d1fc62b3f1a3fd3c743f5b8c5ff102463cb2da82117fb4df9269bde12498ec510f25d3fef01c8cfcb8b425d37eaa5232bd5f2506235ed85a9269bda4154ce31d89f6cef17ea8037841f76b447b17d84fb6012fa9fd6b211fea49978b608a4f0c156c423f3bc9b49f3602c31e6f7bc1d0bf4a32c50fe44f6c1bfb3be22918e7e93a6287d907adb70ec063eacfd51b784afdb3d1c0c85f8a5232cd97afe0398ddf652d99fcf75130e5879d09c67c961482c97eae7bb049f74b3ac9349e86649a4f2692b93cb978be8df749b88229be509660eca7f39f24d3f922713dd6afaedf8269bcd690c7c6f9d755001e52bc5b533ceb5a63d29fab2199ce63edc1139a9f82083c25f9f5068cf745dd2cf082c6238d25d3fb1d378229bf503ec178dfce6a0946fce9bd0aa6fe5ccf04e37d0af27aca77ac1bd8a2e747df9229fe2dc136f98ffc4530e9f34a934cf9f10fa6e78be739387f48fde9daa8f7273c3e310716f67b260f9269ffde1318efefb91e24537dcd06e3fd79f6156ca0deb1904cf6a080d1fe6a2199e67b5f303d4fbb801dd8fb0a8cf8f9a611db78ff5dac8211df745f60d413133e7e2c389be17ccc183c27ff97459279ffac4b30de27947e0826f94c4532bd7f5d032fa9fd6d2a784af58e21d8a0f9e1aa48a6f53f5b30d58ffd6730de5f94ad89ed01d9ef86eb2b0b2eb0feac6fc04b92af7525d3fbcd8f6093fccde64532d9cb4d30c57fe1128cfd33eb77c1a41feb028cf7355a1f82e9f9ee1cec62ffea9b60f227892918e785f0bd8dfdafe9b3601a4f270463fda81980f17ea59adbbf3966fd41ef472dc14bf2075b1b6c60fdec4132d50f0bc9944f1cc126c693dad7bf5e9ff2075c6f63bd6b45fd33b1e6549fb8adc0580fdc7682c97fdd5ab035a5f74309c67961e50bec523c1de2f736eaf7f11c3ca4feaba8bfa6d664467fffdc080c7f53b492a97e6f08a6f686776013fab4964cf69982717ed224ff30b5b15fe81608c6fbd3ce60c48b2d8dd78cdd8ff2eb5430c5839b5730f2dff60086be74a4af33d6ff148fdd8391ff6a74bf390b30693de808b6917f64c436ce8fdf1230f6bfb7345e0b6b3a27fbe9c0f319bdaf8bfcc782a5f7e43f0f60cc4705f99f256b3fedf71c826d92ef3625b627349f68dcdf9b2c9f9b927f237d3458ffd1fc5b8327f007241f530f1aaf6b00467cad51ffb2f8674efd41fed5b6711ed0e4fac192cf39b57733022fe97ecf977feda32abf7d8c9f3e26ffa7827fa74fcf0afb9da5daaac3fe58ff6a0be8f3df21cb2f72b9ecf3bb5c0afe9b90afff77f7df5116d62247f5d81ffad87ddba87590cbfd87bfb3f1f9779605f20899fa6be8cfffb79fff167b71e9f393743ffadc1663f4e33aa96fbdedf8eccf3f18b9ffff65e16dfbc90e6009240d1fa9bf2b3bc9439ee0df4d1661eb3f64f9313a3f24f3e4e717cbfa7791e5379fecfefa91d758f05a8e94457a8a7f2b590235542335561335553335570b364ea55aa917b5669f86e951ab76ec7365b2de544dd5d99f15ff9dc67eb1fe379365a3aed827652391a85bf6b963d2ecd43dfbec982c07464726dd91fdfb4e3da9f74cce7bf5817d0c76e53ff4daff5b6479e43dfdc446e699fddb597d515fb94ebda9efea87faa906ec9a9449f8c524f85607ea501da96375a24ed5993a67d2fc1bc9c25a7a5637ec9f91ba607f02d8fd92c9f2cafe6929aafaa4284cc7be15431d2ba662b18fad380af31a8aa7f8ff3d92fcf7cc954aa0844aa4c44aa2a44aa6e44ccf5ca63d2dfbf4b6622a059b45064aa954ca45a9954669954eb92a3745537465a5acffe8b5ff37cab251b6ca9db253cf8aa2ec95036bf1513929f7ca83f2a83c29cfca5979515e9537e55df9503e952ff6dfbf9581325446ca589928d37f23596c65a6cc9505d3b393b26413cd83f261288661b044c0b00dc7700dcff08dc0088dc8888dc4488dccc88dc2288dcab8a87746fddf23c99f9345b58ca6ff23a390df6677a3353ae36adc0ccdd08d95b13636c6d6b83376c69efd391847e364dcb3cf897d8e8c1fd8e7d178329e8db3f162bc1a6fc6bbf1c1b4b0cf02685e757f9b797f9aadfe999ff8af6561527c1a5feccfb7313086c6c818315fd4186363624c8d194b9916c6b2370ad3304dd3326de3683aa68b8fc73ebe19b04f684666c465eaa53a9a31936a6726666a66666e16666956e6c5accdc66ccdcebc9a375333757365aecdcd2f33b1f2eb1cfcd764311a736bde3169becd9db9e7b21ccc8379344fe6bdf9603e9a4fe6b379365fcc57f3cd7c373fcc4ff38b7dbecd8139c467648ed967c23e63736aceccb9b960992a3334e3de322cd3b22cdb722cd7f22cdf0aacd08aacd84aacd4caacdc2aac12b9dc2f91c5ffaa2c56655dac4b3f2e566d0cad5a3d5b8dd55a9d75b56e9666e9d6ca5a5b1bd6d3f7ccd96ead3bd6522689b5b3f61677bfd6019f2393666a9dac7beb817d1ead27ebd93ab351da592fd6abf566bd5b1fd6274b98bf5884b0601e3d61b3e9c0faeea3cf1fd1d1bfa2634cb31a8bfe82f001fff74a89aca135b2c6d6c49a5a336b6e2d7acdb196cc74fa4a9ed18f85b5b34d48f2439643bf4c614e6ddb766cd77ab03ddbb7033bb42326cfc178b4633bb1533bb37336abda766197ea935dd997de92fecce74fc932307756cdc6646055aa67d77663b776675fed9badd9ba71303fec95bdb6376c249ef9676fed9924625414662bcc5e602bf766681bf6d6beb377f6de3eb0cfde3eda27fb9e8debde7eb01fed27fbd93eb319d7b35fec57656fbfb1d1b07efffcafc9f27cb16a66274cb78cc6f8b4df992c1ff6a7fd657fdb037bc8faf3c47a7864bbe6dc1edb137b6a2db924bb7e64fab161ff9cb1f6ce85fd9b91bdb0972c485698ddcc1dc3311d662c8eed384cd2bde33a9ee33b8113b218f5dd89545df17fcdecfe155954d7183ab113333bb1edda499cd4c9ec2f27778a5e0ea7640ff0ed3d6b55653d3b17361acf4cc706cc6216dc6ed8ff3b356b6be3b44ca6b9d3998173756e8e66f7938feeac9cb5b3b1b7ecf78eb365d21c8d9d73e7ec9cbd73708ecec9b9771e7ec9107ecb7a7eb6a03f234b2f09f3c683fe7ecea3f3e43c3b67e7c58cadb33db1ced6b33d6656cc3ece2b6b5dc5dab5c0a7f765ec63cfe9e374f8bc39efbd24f6d20e9d0f66fd47e7d3f9ea7fe954ce379366dffff5f6cec8e9ff5acca933b3eb9fe4f8576599ab9db3b05f9c25fba1e21a6ce2b08c23f34accd3bab6ebb8aebd702a73e17ab66b1f5d9ff9a8931b981fccdacfaca5f76ec86c2ae673e6d18ddcd84d98bde0e3746e6a7acc73b02b594fbcd93336be67377373b7704bb7722f6e6d176e63356e6b358ae67656f3afe8987a70afaaeddeecd6d55cdd5db96b3626cfeec6dd9a43f7ceddb97b3622dbde86dd837bb4576e6031ed331df7e4debb0feea3fbe43e1b817b765fdc472195fbeabeb9efec5707f7c3f9703fdd2ff7db1db84377c474f1c0fe7dec4edca93b73e7eec25daabd2f6091b8a7aa81f70fbdda9f91c533d8f46d79b6e778ae937b9e71b2179eef055ec8e4601fdbf0222ff612e6030eb6d1eb8c977a99977b85577a9577f16aaff15aaff3aedecdd33cdd5b796b36e7c7c6c9db785befce7a70471ebb0b1b5d9dfd3ff36fde8e59cec1db7b07efe89dbc7bb5f01e58467af31ebcc71f5af5bb1ff853b23c79cfded97bf15ebd37a730637362dbde3bd32f2e099368cbe6f229b39ae7de76bd0fefd3fbf2bebd8137f446ded89b78536fe6cdbd85b76441d7a3aff8866ffa966ffb8e71f45ddfb31e7c9ff9e8ad6df8811ff663e547ee8069e4831ffb899ffa198bd6be51bffd523c9189fe75599e2f7eee177ee957fec5af0d6603e6d46f7a49fc967d3aff6acead27ffd6cf77bee6ebfeca5ffb1b7febdff93b7fef1ffca37f62f966a2bef8f78aea3ff88ffe93ffec9ffd17ffd57ff3df8da3bdf03ffc4fff8bf9f485bd30c74ee57ffb037fe88f8cbd3ff627fed49ff9737fa1382c27fd6679f70f597ea97dfc99d8d25f066aa004060b112da65f6aff97c0f7fae5b7811d38fe3570cd0fe31478811f04411844411c24411a64411e14411954c14509839a7d1afb3d68838ee59af3e06a3f07b7400bf460c5fc48ef0d9560ddeb99ad30d906f6c27a0e36ecaedbe02ed8057ba50e0e4a191c8353708f0af54f35ab3f2d8b1d3c048fc153f01c9ccdd829ad73f012bcf6da15bc05ef81137c049fccf38c83afe03b1804c360148c8309fb330d66c19c49b47016c1325443253442d3188416fbc39c71e8865ee88741188651c86cc73a8709f3cb4698f29881c50f61d6fbfc300f8bb00cabf012d661e32fd421d3b41fb2387f94e5e77af6cf63d25f1db661175ec39b19875aa8b3bbafac636f27e13a5c33795e8c7b2f0d37e136bc0b77e13e3c84c7f014de870fe163f8143e8767f52d7c095fc337ab08dfc38ff033fc62d2982c22f6d97ff90e07e1301c8563e3184ed82cb40dd6e1943d63e6ee99fd7c9b53f6dfe7e1225c466aa428456444e68fcacdaf5a46b288ff862c28f1d4c8525fd5d7c88e1c7f19b9e673e41987c8376751c02375a61351c8e2f7cf88e524511c25511a65c62dca8347ab65f369cafe3c4645f01895aa1255d125aaa3266a5910d345d7e8166966678ccc75d4467ab48ad6d126da4677c629da452c82f0039ef778d68ecdb40bf6bc7d74888ed129ba77d2e8217aecefcdabed866af4d1eeaff6f2932c068fb043b77516ca2e7a8a9ea373f4629ea357f6a437e6750d16a79ca37773c2e6e8aad7eae823fa8cbea2ef68a0ce153f1a2aea8f2a2c7f9e1b8da27134096d2b8ca6d1cc8aa379b48896b11a2b56111b319bac629b85166eccbc3d9f73962c7f93b29843e33ef6e3200ea3fb388ae3f081f554cadbcafc5a1f25fe2c0b7ff68f7131d4f8f9e22cd4f73889d3388bf3b888cbb86277bcb0f87111d7d6dedd5b4f7c2639b959dcc46ddcc557ff515dfdb4f662cb3bbaca5875e25bacc5ba3f8b57f13adec4dbf82edec57ba5890fea323ec6a7f83e7e881fe327e3143fb3d866c9bc7380b86e689de373fc120ce2d76011bfc5effd88736b3055a38fdeff992c0ad34726cb6b9cb8adba8a3f4c23fe649db7641ec6b09ee3da665ed3fc0c33f6dcaff83b1ec4c378a456eaca7e51ee94713c862c3c1eecff9dfdb7493c55f57816cfe345bc4c54e3c17e4894c448ccc44aecc449dcc44bfc24484263efde9b3e8bd8d887e7a42c3b65f3d6d17c4da2244e92244db2a84872b1baf07765b1c886f8155b36bbb2fe65914fa2b8499194e69b71f26fd69e8dc9d9b998dff6c13ad953e39054c925a99326d6d5f7beea9db4ccca52f40d55c1d97d95bb385332bb4abae49adc12cd38252ceb4956c93ad924dbe42eba26bb641f1c9243724cd82c657a8ec272014364d94c9b4b2f4dee9387e4d158264f09b34ab146d2e722ff4c96e499f5e198e50e2bf6efe7e4257935dfad3e3f3f276f56ff8afa7df26ece8dfb709c7c249fc957f29d0c143d192a8b64c4abe3bdc7b4fbac8dc9c264b2df93713231de9269324be6c63159d8c76469c6a99a2aa9919aa995daa9e3dfa76eeaa5bef1603a2cbfe1b2f45910cb54b769601cd3308dd2384dd294cbc2d76dfa7cc4180aaff6932c96b0fe3453466e6b97cc8e9d344f8bb4343fd22a4c98f75a5afdfe8687f4621becee75daa46ddaa5d7d451f4a04b6fa996ea91c9fd3f978549c3644957e93adda4dbf42eddb15fedd3837d4c8fe9c9d8a7f7e943fa18fae953642b7a344c9fd373fa92bed2c8902c2ca7db4681719fbea5efe947fa997ef5feb197a56f7f9f5bfd2acb8f91e17a78607dbb5412ff2139a7dfce9069eb673ae86da5f7c54ee5fa696f8f553a4ac7e9249da6b3a4b50b65c3f42c5177fe23ef31361a7d0edad724d379ba4897999a29c63163f971b4efb3e3ccecb3e2649559999d39ea57ea0475e6665ee66781e9fa81a3a06ab0eb675096e1c5599845599c25ce23b3172e8b6af5b9d52fb2889a9add3f99d14efd4a064ccf952c553eb2cc74cc2fe61b077dcecbf477613d982316e37efaeb2ccf8aaccc2a61e7e45b98b34db24b56678d5dc763f53b6bb32ebb662c62f343d6df6ff6c2fd66de9c652c99661ce3a74ccf56d93adb306bd3b36d76e74efa5999c53363a603cf76bfcd8445369691edb23d93e5901db313d31d85db7491ddff268bf28b2ca67a973d3032b24743c99eb82ccc37f67d642ebcc4661146f69c9db397ec357bcbde852c1855577d4bdaec23fb8c9e93419a655fd97736c8d8e866a36cec8eb24936355da7cc66d9bcf7ebacbf17d93257734509552b377233b7723b77d8377d3d6dc29edad74398b7cedddccbfdec900779a828ff4496be024a7dabf8bd36f63edacc23c330ee982cbd97efed70c024619219f7799c27fe364ff32c3c30597eac4172bf95e779919779a556f925aff3266f8d63dee5d75eb7dc613f1ef9cdfdeeb3e25cb316f153aee7ab7cad9eed32dfe4dbfcced67396c1b09879c8729a4bafd9feb7719f29f93e3fe4c73cc88e4c9b1392c52afe812cbd0f559209d332db2ed5263f1926f32baed05ca6678eed5877ecbfbce6f7fe5dfe104cf347a3fd690d92d97afe943f671725cecff94bfe9abfe5ef7dd4937ff49909af719cddaf6cca73628dcd8871fe997fe5dff9404d9cc833f3613ecac7f1579ff1997dbc4c51b4cfee30c9a7f92cc9988e1d59a699f47e377c0bdffe200bb75792259fab7b854d65ea77be302c63cfd2fb1dd5bc481673943bf9b2500b8545f5b3e8814547b6dcabc0575793b1fa919f0ba33059b7d9ac557d2cbfe8f312ebaeb7e4c2e96b1785cb62ad53e1157e111461112923d52ee22229d22233f67d5ec365611ac6aecdd98cb92f8aa22caa3c2459faf6b398f5f597f9e5375958c6b34f6fcc62be8b0b7be4ce74a97227646177ae8ba6688b2e288a6b714bf25f7684303d53fc645268855eac8ab5710835e7b597a5d8b06cabaf6a7ef4d5be60cd243916dbe2aed815fbe2a0d8c5317b284ec57df1503c16cc3efa1a279764614e0b268f7128cec54bf15abcfd248b1aaa7f57164fcab22bde59fe742a3ed894b5efa33c5420875c9645f1597c15dfc5a01806398ba2c90bffd8555114a3625c4c8a692f4931ebd72c989ea8c5bc8f467b5b6677e03163b12cd5ecbb544287c540d7d250c2d22cadd22e9dd2354ebc22c2ae36c7f6a1f498cdc6a55f06e1ae64290dd731f7efc822d654c40cf3adb665c472b053191b2ecbef852cfb5e16f3cb3a9749999659996749745f163f564a7824669465599597b22e9b5e92b2cd34661b565f3b6371dc985bb4e10ffaaca7ecca6b79b3be4acd0a4a9d8d67c4a45995eb72536e992cbabdeda326368e5bebbecf64cabb7257ee7b591425cd7a6d28b552fb45961fd13ef773ea8dcd103b75c56439183e1bebc81c5b7d3d2cb0674e63cfcb63792aefcb87f2b17c6271ce86e527a398c594ca9d5d97cfe5b97c295fcbb7f29d79d12eef32adafee9bb3bebec13f337b5f7eb079bc2c3fcbaff2bb1c985d392c47e5b89c94d3c42d67e5bc5c944be3c45c7d156a7c4c0f665f1939564a655466d06746a7e0d4ef2ab2aadf62fedefb3059d8b7663f36c8d834bbaa2c26cbbd19b2deec97483a264b6b06c6a1b22bc79bc5e3a00996e5c4dc562e538ba86236cfa29545e5574115329fca66bb3ea736471513d73a313946fd9a4515dbdb2aa9d22aabf2aaa84a2bacaaea52d55553b5556745c1b1ba062b362e5ba7a355b57ebda3aff254b74aabf42467b21c83a36ad9f51f641151a5cf6571d488e9e246bd315559556b264bc4662c268b193269f64c96a37bf65a6fae2e2387e9eb5bb5a9b6d55db5abf6cab53a54c7ea54f575e17be6c717d681c5d5233e26a3fe2ebd3d570f4c96c7eaa97af646d5b97ab1aaead5dc556fd57bf5517d565ff128afabef5e966ac07ac2e5f5cf678bddb11a56a36a9ce4ce23c6c5339adf627e4bca6270efba60d1ee539ac5a36a524db98e912c51af654c965335f33a8f656bca3c34ccae9a87af9eaac6ac3f17d5f2a26637f7f5a25cb81fb615f38349d17f26b406c3ee7570377d7e75312fd6c5be38e1cbc5bd78179f8d897f092e6134b8449798c9d2b91fccbadefb159cde673059946a7449823e47f6d9c7fea32ca859283c96225912f549bdbfa4ec9e593fc6fdfa9c6df523d4af3d18a774e75d2fb9925e8ad0c8eefbbcfd525eaacbe5525f9a4b6b9c2edde56a6fcdd1e5165f98bd93244764f10773e445d68e5da55df4cbeab2b6c2cbe6b2bddc5d7655a7b697fde57039ba2fbd2c173633b1d8cde27fd5d684fde2fef27079e4b2a0adfd5add3f95256071f24d29c2faf27479eeb585d61bfb95a07ecd81e9d8a377f35545b3df7975c88ca6feec72bebc5c5ecdc4383afae58daf136d8235f75dbd7e8db92c7c3d96f5f196c5dd5333bebc5f3e2e9f97afcb777cbcf06a13d388e16578195dc66c869ddb6c66cd466c967db5ee7adbbf4c2ed3cb8ccba2f0bcc2fe5d16392f4096545373b5cdcf97f9657159f6eb90bdcdb2d8b85fd50accc08d8c83a7298f8a1fb4c620fca8d55a49b6b5519bc98ac9f9565bb56def1cc38bfaf99ecd8d336ef74cc7b8341e9b3146e6dcdef82cdeac9ddaadbddaaf83484b46e9ad0eeba88eeb84e5ca9fcce3796c6e9db008f4c9dd32590e755a67756e325990875bfd0aeaeff9cbcfb2287eaa2b6e5dd4a5f25557c68149c0bc0fb3dfa8978569716cc69eee2b6aa9cc422bfc8caa9a4590ec7f0d6b5beb7eb84347cdaf2c63af9cd73063f67faa22f6ebdeaff7d27875c746f9cbfc626d5cd6d7fa566bb55eafea35d36ca77c8af27a536fcdd8b9b23cdceb6318d6239bdec2eabb7a57efcb3d932515759e3fe695d8112074cc55efd44370523ae5b13e184cb3597e7f6fdbbc12cfda581f599b4ff57dfde0b6a1556d13b77eac9fea67e3549feb17a65b8bfab59f159cd728b02d1691ceeb37bfb1b7fe376fd994b220ca89acbdfb5abfd71ff56738a8bfeaef7a500fcba01e992ed3c27db17077aec3f29881cb324b63578feb493de5b2507ef20f7264f6a797a59ffb13f6ff0d9bfda7f5ac9ed70b9657b2fc8bc52e5b7b592f9d779bcdc98dda288de13f5a35f3ca1f8dd958c64363db47f6d9374e3f438693be6ed3fbb2c665ff34a2d0def09a9af1cb1ae0d074eb5be3357e1334a1f3d4444ddc244dcafae291e54977eeaec9ac2dfb158b429bbc299ab2a9b8bdd09ca8f42b763fcb42732397c5e4b364aa8cd2cc99c77a7369eaa6316377c3eefb7039352d0b8359d6e186c6aee99a6b738badd0b48a466b74fbc18c9b557aecc7c57c6fd64cdfc76c2c3efa5cbdd9345bebdcdcb9dbbe8283d53fac9c9b5ebfb3a4d935fbe6604d9a63736aee9b0726c363f3d43c3799bbeb6be64c2fe3e6dcbc34afcd9b948559c51f65a1d95ecaa2f1959bb5faa138cd7bf3c1a22ac7ff609e89d973bfa6686f9b4fe3e0dbcd57f31dbae167ad3483669828d60b7bde283359ae356bc66c961b46611f41369366dacc9ab971b296eeb6e1e3815566167d9b9ed3354b63efad5bb5555aa3355bcbe8ebd581396efb15c45d9f2b87ba71689dd66dbdd6ef63181e7719aadfaf09ff365752a5cfa4bdc2fdfa937a8bc76de03dc65d1b1afd4afdb658703fbbed6dba8d8c531bb7499b865ef5de666d9e9fdaa22ddbcad8370fed85595585fce4beaddba66ddbaebd5e5876dfded8bcf3ddd70ee4eabfefed5aaddf1de36baddeaeda755bb35f6dda6df0dede056f5ec89eb7734a63d7eedb437b6c4f52163f38fd41161bd97abff39945bc2c951e313ddbe5b9a2b7f7ed43fbc8b4f7686ffa9d05b5d53ef55adf326fdf9edb97f6d518861f4e5c44ed5bb269df59ccb3cf3b7bc9645ef5f949fbd17eb65fed773b6887eda865b3068b697aed123b19f67e906bf6b69db0acf8d44edb593b6751cb397875ed76d12e3bb59fdbeace38754a67746667c571922779af472c8e39fe4116e75759d84c99a94967770e93e6dab99d67192cd770d89cb063be56ef7c7b5b9f7d3753baa00bbba8da767197746997b1b0b8e8ca7e6dc8db75157bfea5abbbc6df756dd775d7eed6699ddeadfaac8e723b5ec95b326b687b8fe2fb4e65dce75db7ee36eeaedb76776c02d875fbe6397aef0eddb13b75f7dd43f7f8ab2cbfc563b40fdae2fbb87b59fabdb76ef7d43de7cfddb97be95e6bc738b9ae7de8ff1a4166c38eb3eddeba77964f9cba8feeb3fbeabe9d85fad80dba6137eac6d19d195b0b33f6b56ed24dbb5937ef16ddf2aa5e95ab71358d9dfbca7763f9bd1ce6d00ffa99fd6ad97bc7bada4cbe73b7bb322bb18ee1cadd5d5deffdea3109dfaffe35b886d7280fa302b66ffe1d1d13eb0b72bf196a7fdcef5de36b52b2d65d53ebe19ab119ef6c9dddcf7eb5f79ab3ff5a5ccb6bc5e29897ebe55a5bfeb5b9b6d7ee7acd27d7db55bb321d5533b30bdf8da69c5c57d7f57573dde6937efe655aa8f4750ce623a2be06c6f7638dd87c74ecfd38d515ade7de5aaa8171bcde5d77d7bdda3847b5edab2c5993353c07367f9c07f8afd7f89ca7ebe17a8cd953afa7eb3d3dddbf998b6641d1eef5e1fa787dba3e5fcfd797eb6bad3069deaeefd78febe7f5ebfa5d75d74139bc0eafa3eb987d26d7e975769d7b6bd60b8bcccccceb92dba2f5f327f2dd7d73c7fc1c27ebcc52c3a79b7263f955348c4c36f3b9aa6dbf33591cbebef31764b99937eb66df1cd6379ecb66877edf8bad140b2fb9b139d0b8f7b51b0b346f8152ddc25b748bd5db2db9a5b7ec96df8a68d025e15755df4a7377ab6e97f0e3c626c65b5bac6e9db1ef772df0fd16d6af1f5eafb0d86cc4246aee7236b3dcaeb7db4d4bc6d133cb2d44fefb87ddf3ffb52ce6e34dbfad6eeb86c5860d1b0d663515f3f8ecff6d8fc5eecc9fe593dbe6b6bdddd5a5fa62d7cae2b65386b7fdeda0d4ea58dd869f55773bde4eb7fbcbddede1f6787bba3ddfce51623f180fb71733643e7af24759983454afa4fbbfdede54f7f67efb48068a226ac97f7d7d3f2a6e9fb7afdbf76dc02b565f2cb35c58776c86d89a73162f6d6e43e3741bddc6b7c96d9abab759eadce6f1241ef77bf56f8bc80a5fa2eab6d4d4a8d394a85202f5ac199aa9599aadb1b16e5acdedade4e78fbbef3396c82759cc58f3345f0bb4508bf242d1d20ce3f287d3597fc25e1eb5584bb454cbfad981dd7b617e7a119385f624cdedad96f733a75668a5566917ad564325615ed0b65fe289b25322add15aadd3aedacdf84c1dd573979aa6e9da4a5b6b1b7ba16da99af0ebc8b03f2a8bb1ad7667dada9db653bba0b9bddbef2c7f37642dcfa1f8f22fc8926a7beda01db59376af3db008efce9cfa1f2c3bda71eb6451633568f92e43ed517bd29eb5b3f6a2bd46b935d2de8c85f61e4fb40f36269f2c216e94246ccb2767e999da97f6ad0d3436a6edeeefd98bf5dcee2c35f2b59136d6260a8bd955d72eed525db37111f562ef2fcbf2a84db59936d716da52578d7da8318f79673d9993b86e6fecb363518056b6bac26c79a71bbad92a9dab5bc64db77527327457c97596ee844e7fe622ce597e32d4033dd4233dd6133dedc7e0d74f98f5b2447e2f95bbd7333dcfebb2d20bf6fbfe0c84266b797c86ff2b3a16157aa957fa45aff5466ff5aedf11c3f2de39af8f322fa45ffb798faffbfaa6ebbe66817ed3355dd757fa5adfe85bfdcef850bff59dbe77c6d5413fe847fda4dfeb0ffaa3fe14bd07aece722db28dde4ef86e0bf3e78fe9e8e764adbfe8af4aa36ead86cdca34abf4f6eff075c43fbd8724c9f537fdbdb8ea1ffaa7fea57febcc07588affed6ed3ca56a3f7beea637afd3a561f4733895c33d687fa888dd0589fe8537da6cff585be5ca92b6565accc95e5eddd3c7ded778d38d5ca5e39b6e1eec90f0b0ff68b2cae7170dc95bbf2567e3c535f56415f310a4e2cdeea57df6a5a7bfb73b2048fab701505b355bc4a56e92a5be5ed78555807166b6efa5ccb3afe248bc9b28265dee5ceed8565b4b755b9aa5697555dcd568d3e5ab5b1c7f7c23129dcddaaeb76abab395e752c5bbbe3f66e626ef955166f7533e3b261f9d270a5b1f178e335567efeafaf2afd9571311f57fa6ab55a6bb362b8daacb6abbbcbc76ad75767d2a05f79b0b67d0ecf64796372ec983c0adfc570cff7819ef85efea3d8cf6bdcbbdf76e87ff8cd6abf3aac8ead1d7cb84edffa7e9e679aa6b63b6627bfcae2af4eab7b9643ad570fcdfbea919fce727f3a052c4f69fca971795a3dafceab176db67ad5ebd5dbea7df5b1fa8cbff26ef595f615a31fbbddf98749f7c177bc0f9d57f6795b7daf06d17e35147b2cfbbdbccd9339ee7739b58bd5a8d72e173b9358e3acdf65b1ceab717d67ec5693d574355bcd51c3b7708ec1fdf3314c92af16abe55a5d2b6b439badcdb5b5b6d7ceda5d7bc69e45cffb1f7bdefb489eaffb32097a7b62b3105fc7e3fba9f9beea7e36627e6318266b7f1dacc3c0091cbecb91452c6431bd17f85d967e7473dbd8d7efeb681dab77e20c2d9745f9b16be9cff8b1f03198af933c5d5bc1789daeb375be2ed6e5ba5a5fd6b5b5b437741601fbf7fbd5b30fbe57a25f6bb15a16fc34ceba757416dfb3e83e9ce9d77ecd807df6ebceefd6cc62bc50c8d2eeb411f366bfd90bd7d26374b7beadb53573e4b2fee5fed5793f628aba5eaf37ebedfa6ebd5befd787f5717d5adfaf1fd68feba790c5fdd69eef5ac1b8b04fbf9ef76a7e704b3e584bbedb9f5950bffba8f7e2eb7e97fcb1df83b63eaf5f02d736cc28effa73246c8e1feb193f73d2e7373edfafe4b23c69bb7e5dbf35cafa7dfdc1e617c8f2f7f78ffdf38ff3283f69566595d196e7f5e7fa6bfdbd1eac87eb11d335bea38c568b980e4db0afbf8fa6c6acc7cffc04c6b2dfadd7cbe90f7a7bea77569a43967505d5e0a69a713e6171d79d36d1f3f5b8f776eb49bfa3b61f93cb389f38de7aba9eade7eabdd8d32b674be7afc8f2d3d9621ecf798f6a11dcaf179774bdcc5f36ea46d9181bb37faead164ebf368979c230a77db5439cb4602336661ab91436d3dc39174ba1fd0a2caa7f6511e4ae0f0b36569fdfacc6cce59f8ce3c6c9271b77e36dfc4d607da94f56f35b9bfed2b8fc7eb6381a2a9ee2da55972acd26dc449b78936cd24db6c9f9aa0bcb6eac27ffdbf68bbc782effdf76ae6549552488eee733a6f615fdba7dbb6356a899203e5a6db51f3b4444f0c14b1489987f9faa8202a4bd37b457331113b9d010943a661645669d93b6d9e37b5a6207f5ce54d90a7b630ee6244ed8f3c2d4532060d9afca32ad349d280e4d481246103617866ae8b10a11c3b2b36c86248e1fe983506f36cb7bd7f59cde1344592e9dd23decc91c0e90c0115250a0014d680104cf80a691efb672cf7c667bc1191af13a6a6c8d2ed758790ea8a041fba8a546ca6681e23a2c67047dffd9b4a1130fb9e20cbad0833e2ce34747a706bc2c0e85fef98baee722bfd4f4404187dc51957668dcd0c2d0b660004318c12b8c61025378f3347fb13bb0acbe5df0f8ab3a31cdd0e01d3ee0136ee036e9c2ddb1ed7437f7e95459c13d7169c0bcfd003fe0117eb2bb700a4ff08c94def1b9eef5e9337dca1557dfc052a8ea8aefae6ed98c216b9d45ef4ffa485524aebeeaa181333471eeaa5edbb7f71bff47100423b4421517519a70a1686ff7106f632dbe471b97ebe0a027b3a4874ec8a276354cdffc603e255ca59dee228325a4b8c2354b719e8d29bbca113774bcb961e319c8f15c1f6327bd3884873ca043ee1bdcda7dce35430f7d0c30740718e10e636fed2f7ddd7f0cc2861b3aa1161991827b3cecfa8d66ec6112bce2115354f693204dfadb96d559cd6ccab25f967cd21655d61b3627a2d61336b0892d72a03dc20e53978ef868d8fa229f5faee75a7fe935c07eb745b764495b08ec7d0311d5f514356ca3bffd70224ff774bfb3f1822818bb5ad8461d3bd8c5de6e837df6fe0507fb088787258ef015c7d68bd0fa1a7cc79ef3f0a8623d21573237714a0f6bb636061dba66de58d0211dac1b76bfe293ef6039b59ad281736c393795d713791dceebf80ee712f96e3009ddd07544a5d179e13613e6e4967d435ca3ec245389a0cad56bfd58aad7bf7aee9fc122ff178e852391e3f3ba9c7d9399eff23a234758aeb7d96b869def6fe7fb0f468e60216ac18678a2378b9890bd31a42ee18c42f1d27b720dcf09969c1fb0909d7904e76ec356026184f0baafc89d66956e3da5fecbf6f6f369d67545d6b5c5d924df135a7ec542cb5e26e49a7cbfc201afa191da8093df3604f79408ae9ab0ad576031ca9ca3caca1635c83935653d22cfb448ce3bcf6adc752c32e62a9eb9443352aa19aaaae7e288acea1ab4729f2cb50e052bf5d4871cf952b02732ae47d9db635ea9689b453c57bc2062244752ad5f5e84c592fcc3e1ee4c949995795bc152fdbea830d827ffc84c20e9088f91d2fb395e4b665b520152c3422492ebf27dce3a1163b10a2cc60916c11710bad85b6ed69a7320cdc09db863ceee0a1533e20c1ccef6c814cd995eb334f9fc9ecf4b7ebda988b5c23b67b1108e04dff03d63da7fc32f8b9a5f4caeec2fc7c9c7e6f5bc5e154b795ce2e596e3679fca7dd222b624e3bc58134fe3a1e0bbcd199677fcb81c4b3d6a7ea7d6aeb0fb7e71ceb9a3f5738b7cbeda2ba7de3ba79caf57e52fff15fb1fcbbfd3fefcfbaf3ffe0193cc32fd</data>
- </image>
-</images>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/win/pages/sidedecorationimpl.cpp b/util/install/win/pages/sidedecorationimpl.cpp
deleted file mode 100644
index aa25825..0000000
--- a/util/install/win/pages/sidedecorationimpl.cpp
+++ /dev/null
@@ -1,205 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "sidedecorationimpl.h"
-#include <qlabel.h>
-#include <qlayout.h>
-#include <qgrid.h>
-#include <qregexp.h>
-
-/* XPM */
-static char *check_data[] = {
-/* width height num_colors chars_per_pixel */
-" 11 12 4 1",
-/* colors */
-". c #939393",
-"# c #dcdcdc",
-"a c None",
-"b c #191919",
-/* pixels */
-"aaaaaaaaaa#",
-"aaaaaaaaabb",
-"aaaaaaaabba",
-"aaaaaaabbaa",
-"aaaaaabbaaa",
-"a#aaabbaaaa",
-"ab.a.b.aaaa",
-"a#bbbbaaaaa",
-"aabbbaaaaaa",
-"aa#b.aaaaaa",
-"aaa.aaaaaaa",
-"aaaaaaaaaaa"
-};
-
-/* XPM */
-static char *arrow_data[] = {
-/* width height num_colors chars_per_pixel */
-" 11 11 4 1",
-/* colors */
-". c None",
-"# c #b9b9b9",
-"a c #8a8a8a",
-"b c #0d0d0d",
-/* pixels */
-"...##......",
-"...ab#.....",
-"...abb#....",
-"...abbb#...",
-"...abbbb#..",
-"...abbbba..",
-"...abbba...",
-"...abba....",
-"...aba.....",
-"...aa......",
-"..........."
-};
-
-/* XPM */
-static char *cross_data[] = {
-/* width height num_colors chars_per_pixel */
-" 11 11 3 1",
-/* colors */
-". c #cc0000",
-"# c None",
-"a c #fc3464",
-/* pixels */
-"###########",
-"###########",
-"########a.#",
-"##a####a.##",
-"##a.###.###",
-"###a...a###",
-"####...####",
-"####...a###",
-"###.a##..##",
-"##a.####aa#",
-"##.########"
-};
-
-
-SideDecorationImpl::SideDecorationImpl( QWidget* parent, const char* name, WindowFlags fl ) :
- SideDecoration( parent, name, fl ),
- checkPix( ( const char** ) check_data ),
- arrowPix( ( const char** ) arrow_data ),
- crossPix( ( const char** ) cross_data ),
- activeBullet( -1 )
-{
- Q_ASSERT( layout() != 0 );
- if ( layout()->inherits("QBoxLayout") ) {
- ((QBoxLayout*)layout())->setMargin( 0 );
- }
- setSizePolicy( QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Expanding) );
- if ( globalInformation.reconfig() ) {
- versionLabel->setText( "Reconfigure Qt " + globalInformation.qtVersionStr() );
- } else {
-#if defined(QSA)
- QString versionStr = globalInformation.qsaVersionStr();
- versionStr.replace( QRegExp(" Evaluation"), "" );
- versionLabel->setText( versionLabel->text().replace( "Qt", "QSA" ) + " " + versionStr );
-#elif defined(EVAL)
- QString versionStr = globalInformation.qtVersionStr();
- versionStr.replace( QRegExp(" Evaluation"), "" );
- versionLabel->setText( versionLabel->text() + " " + versionStr );
-#elif defined(NON_COMMERCIAL)
- QString versionStr = globalInformation.qtVersionStr();
- versionStr.replace( QRegExp(" Non-Commercial"), "" );
- versionLabel->setText( versionLabel->text() + " " + versionStr );
-#elif defined(EDU)
- QString versionStr = globalInformation.qtVersionStr();
- versionStr.replace( QRegExp(" Educational"), "" );
- versionLabel->setText( versionLabel->text() + " " + versionStr );
-#else
- versionLabel->setText( versionLabel->text() + " " + globalInformation.qtVersionStr() );
-#endif
- }
-#if defined(EVAL)
- editionLabel->setText( "Evaluation Version" );
-#elif defined(NON_COMMERCIAL)
- editionLabel->setText( "Non-Commercial Edition" );
-#elif defined(EDU)
- editionLabel->setText( "Educational Edition" );
-#else
- editionLabel->setText( "" );
-#endif
-}
-
-SideDecorationImpl::~SideDecorationImpl()
-{
-}
-
-void SideDecorationImpl::wizardPages( const QPtrList<Page>& li )
-{
- QBoxLayout *lay = 0;
- Q_ASSERT( layout() != 0 );
- if ( layout()->inherits("QBoxLayout") ) {
- lay = (QBoxLayout*)layout();
- } else {
- return;
- }
- QPtrList<Page> list = li;
- Page *page;
- QGrid *grid = new QGrid( 2, this );
- grid->setSpacing( 2 );
- for ( page=list.first(); page; page=list.next() ) {
- QLabel *l = new QLabel( grid );
- l->setSizePolicy( QSizePolicy(QSizePolicy::Fixed,QSizePolicy::Fixed) );
- bullets.append( l );
- l = new QLabel( page->shortTitle(), grid );
- }
- lay->insertWidget( -1, grid );
- lay->insertStretch( -1 );
-}
-
-void SideDecorationImpl::wizardPageShowed( int a )
-{
- if ( activeBullet>=0 && (uint)activeBullet<bullets.count() ) {
- if ( a < activeBullet )
- bullets.at(activeBullet)->clear();
- else
- bullets.at(activeBullet)->setPixmap( checkPix );
- }
- bullets.at(a)->setPixmap( arrowPix );
- activeBullet = a;
-}
-
-void SideDecorationImpl::wizardPageFailed( int a )
-{
- bullets.at(a)->setPixmap( crossPix );
-}
diff --git a/util/install/win/pages/sidedecorationimpl.h b/util/install/win/pages/sidedecorationimpl.h
deleted file mode 100644
index f39e204..0000000
--- a/util/install/win/pages/sidedecorationimpl.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef SIDEDECORATIONIMPL_H
-#define SIDEDECORATIONIMPL_H
-
-#include "sidedecoration.h"
-#include "pages.h"
-#include <qpixmap.h>
-#include <qlabel.h>
-
-class SideDecorationImpl : public SideDecoration
-{
- Q_OBJECT
-
-public:
- SideDecorationImpl( QWidget* parent = 0, const char* name = 0, WindowFlags fl = 0 );
- ~SideDecorationImpl();
-
-public slots:
- void wizardPages( const QPtrList<Page>& );
- void wizardPageShowed( int );
- void wizardPageFailed( int );
-
-private:
- QPixmap checkPix;
- QPixmap arrowPix;
- QPixmap crossPix;
- QPtrList<QLabel> bullets;
- int activeBullet;
-};
-
-#endif // SIDEDECORATIONIMPL_H
diff --git a/util/install/win/pages/winintropage.ui b/util/install/win/pages/winintropage.ui
deleted file mode 100644
index ac2545b..0000000
--- a/util/install/win/pages/winintropage.ui
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE UI><UI version="3.0" stdsetdef="1">
-<class>WinIntroPage</class>
-<widget class="QWidget">
- <property name="name">
- <cstring>WinIntroPage</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>387</width>
- <height>228</height>
- </rect>
- </property>
- <property name="caption">
- <string>Form1</string>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QTextBrowser">
- <property name="name">
- <cstring>textBrowser</cstring>
- </property>
- <property name="text">
- <string>&lt;p&gt;It is strongly recommended that you exit all Windows programs before running this install program.&lt;/p&gt;&lt;p&gt;Click &lt;tt&gt;Cancel&lt;/tt&gt; to quit install and then close any programs you have running.&lt;/p&gt;&lt;p&gt;Click &lt;tt&gt;Next&lt;/tt&gt; to continue with the setup program.&lt;/p&gt;</string>
- </property>
- </widget>
- </hbox>
-</widget>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/win/qt.arq b/util/install/win/qt.arq
deleted file mode 100644
index f3f1ccc..0000000
--- a/util/install/win/qt.arq
+++ /dev/null
@@ -1,3 +0,0 @@
-This is just a dummy file. Use the package program to add the real qt.arq
-file to the package.
-This file must be smaller than 500 bytes.
diff --git a/util/install/win/resource.cpp b/util/install/win/resource.cpp
deleted file mode 100644
index 4ea0ad8..0000000
--- a/util/install/win/resource.cpp
+++ /dev/null
@@ -1,162 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "resource.h"
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qapplication.h>
-
-#ifdef Q_OS_WIN32
-#include <windows.h>
-#endif
-
-/*
- Tries to load the binary resource \a resourceName. If the resource is
- smaller than \a minimumSize, the resource is not loaded and isValid()
- returns false. isValid() returns also false when the loading failed.
- */
-ResourceLoader::ResourceLoader( char *resourceName, int minimumSize )
-{
-#if defined(Q_OS_WIN32)
- valid = true;
-
- HMODULE hmodule = GetModuleHandle( 0 );
- // we don't need wide character versions
- HRSRC resource = FindResourceA( hmodule, resourceName, MAKEINTRESOURCEA( 10 ) );
- HGLOBAL hglobal = LoadResource( hmodule, resource );
- arSize = SizeofResource( hmodule, resource );
- if ( arSize == 0 ) {
- valid = false;
- return;
- }
- if ( arSize < minimumSize ) {
- valid = false;
- return;
- }
- arData = (char*)LockResource( hglobal );
- if ( arData == 0 ) {
- valid = false;
- return;
- }
- ba.setRawData( arData, arSize );
-#elif defined(Q_OS_MAC)
- valid = false;
- arSize = 0;
- arData = 0;
- QFile f;
- QString appDir = qApp->argv()[0];
- int truncpos = appDir.findRev( "/Contents/MacOS/" );
- if (truncpos != -1)
- appDir.truncate( truncpos );
- QString path = appDir + "/Contents/Qt/";
- path += resourceName;
- f.setName( path );
- if (!f.open( IO_ReadOnly ))
- return;
- QFileInfo fi(f);
- arSize = fi.size();
- arData = new char[arSize];
- if (f.readBlock( arData, arSize ) != arSize)
- {
- delete[] arData;
- return;
- }
- ba.setRawData( arData, arSize );
- valid = true;
- return;
-#endif
-}
-
-ResourceLoader::~ResourceLoader()
-{
- if ( isValid() )
- ba.resetRawData( arData, arSize );
-#if defined(Q_OS_MAC)
- delete[] arData;
-#endif
-}
-
-bool ResourceLoader::isValid() const
-{
- return valid;
-}
-
-QByteArray ResourceLoader::data()
-{
- return ba;
-}
-
-
-#if defined(Q_OS_WIN32)
-ResourceSaver::ResourceSaver( const QString& appName )
- : applicationName(appName)
-{
-}
-
-ResourceSaver::~ResourceSaver()
-{
-}
-
-bool ResourceSaver::setData( char *resourceName, const QByteArray &data, QString *errorMessage )
-{
- // we don't need wide character versions
- HANDLE hExe = BeginUpdateResourceA( applicationName.latin1(), false );
- if ( hExe == 0 ) {
- if ( errorMessage )
- *errorMessage = QString("Could not load the executable %1.").arg(applicationName);
- return false;
- }
- if ( !UpdateResourceA(hExe,(char*)RT_RCDATA,resourceName,0,data.data(),data.count()) ) {
- EndUpdateResource( hExe, true );
- if ( errorMessage )
- *errorMessage = QString("Could not update the executable %1.").arg(applicationName);
- return false;
- }
- if ( !EndUpdateResource(hExe,false) ) {
- if ( errorMessage )
- *errorMessage = QString("Could not update the executable %1.").arg(applicationName);
- return false;
- }
-
- if ( errorMessage )
- *errorMessage = QString("Updated the executable %1.").arg(applicationName);
- return true;
-}
-#endif
diff --git a/util/install/win/resource.h b/util/install/win/resource.h
deleted file mode 100644
index 791edfe..0000000
--- a/util/install/win/resource.h
+++ /dev/null
@@ -1,77 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef RESOURCE_H
-#define RESOURCE_H
-
-#include <qcstring.h>
-#include <qstring.h>
-
-class ResourceLoader
-{
-public:
- ResourceLoader( char *resourceName, int minimumSize=0 );
- ~ResourceLoader();
-
- bool isValid() const;
- QByteArray data();
-
-private:
- bool valid;
- int arSize;
- char *arData;
- QByteArray ba;
-};
-
-#if defined(Q_OS_WIN32)
-class ResourceSaver
-{
-public:
- ResourceSaver( const QString& appName );
- ~ResourceSaver();
-
- bool setData( char *resourceName, const QByteArray &data, QString *errorMessage=0 );
-
-private:
- QString applicationName;
-};
-#endif
-
-#endif // RESOURCE_H
diff --git a/util/install/win/setupwizardimpl.cpp b/util/install/win/setupwizardimpl.cpp
deleted file mode 100644
index 909d986..0000000
--- a/util/install/win/setupwizardimpl.cpp
+++ /dev/null
@@ -1,2571 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "setupwizardimpl.h"
-#include "environment.h"
-#include <qfiledialog.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qtextview.h>
-#include <qmultilineedit.h>
-#include <qbuttongroup.h>
-#include <qsettings.h>
-#include <qlistview.h>
-#include <qlistbox.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qtextstream.h>
-#include <qpushbutton.h>
-#include <qradiobutton.h>
-#include <qcombobox.h>
-#include <qmessagebox.h>
-#include <qregexp.h>
-#include <qtabwidget.h>
-#include <qarchive.h>
-#include <qvalidator.h>
-#include <qdatetime.h>
-#include <qlayout.h>
-
-#include <keyinfo.h>
-#if defined(Q_OS_WIN32)
-
-#include <process.h>
-#endif
-
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
-#include <check-and-patch.h>
-#endif
-
-#if defined(EVAL)
-# define LICENSE_DEST "LICENSE.EVAL"
-#elif defined(EDU)
-# define LICENSE_DEST "LICENSE.EDU"
-#elif defined(NON_COMMERCIAL)
-# define LICENSE_DEST "LICENSE.NON_COMMERCIAL"
-#else
-# define LICENSE_DEST "LICENSE"
-#endif
-
-#include "resource.h"
-#include "pages/sidedecorationimpl.h"
-
-#define FILESTOCOPY 4582
-
-static const char* const logo_data[] = {
-"32 32 238 2",
-"Qt c None",
-"#u c #000000",
-".# c #020204",
-"a. c #102322",
-"af c #282500",
-"as c #292e26",
-"a8 c #2c686a",
-"ae c #307072",
-"#C c #322a0c",
-"#s c #36320c",
-"am c #3b3d3f",
-"#3 c #3c8082",
-"#f c #3e3a0c",
-"## c #423e0c",
-"#9 c #434341",
-"ad c #438888",
-"aU c #458d8e",
-"#g c #46420c",
-"aM c #46494a",
-"ay c #474948",
-"#D c #4a4328",
-".W c #4a4611",
-"az c #4a4641",
-"a1 c #4a4a49",
-"aH c #4b9e9e",
-"au c #4d9a9f",
-"aS c #4e9a9a",
-"an c #4f4e4a",
-".X c #504e0c",
-"a7 c #51a4a9",
-"#0 c #525250",
-"aT c #55a6a3",
-".Y c #56520c",
-"#a c #5a5604",
-".Z c #5e5a0c",
-".V c #5e5e5c",
-"a0 c #5e5e60",
-"a6 c #5ea0a6",
-".J c #625e0c",
-"bB c #64aaa9",
-"#m c #665e2c",
-"aL c #686867",
-"bw c #68acb2",
-"bo c #696928",
-"ba c #696967",
-"aE c #69aeb2",
-"#z c #6a5614",
-".K c #6a660c",
-"aZ c #6a6a65",
-"bG c #6db4b4",
-".9 c #6e5e24",
-"#. c #6e6a5c",
-"bv c #6fb6b9",
-"bC c #706d28",
-"br c #70bcc5",
-"aQ c #71b7ba",
-".I c #726234",
-".L c #726e0c",
-".0 c #72720c",
-"#w c #746d44",
-"be c #747028",
-"bH c #747428",
-".M c #76720a",
-"aR c #78c1c2",
-"#Z c #797977",
-"a2 c #7a5d3d",
-"#H c #7a6614",
-"#I c #7a760a",
-"#l c #7a7634",
-".1 c #7a7a0c",
-"#e c #7a7a5c",
-"bL c #7bc0c2",
-"b. c #7c7d82",
-"#d c #7e6e34",
-".N c #7e7a0a",
-"bP c #816c20",
-".8 c #82763c",
-"#h c #827a3c",
-".x c #827e0c",
-"#t c #827f4b",
-".O c #828204",
-"#v c #828384",
-".P c #868604",
-"bq c #87d4d9",
-"#k c #89864b",
-"#c c #8a8244",
-".y c #8a8604",
-"#j c #8d8652",
-"al c #8d8d8a",
-"#b c #8e8644",
-".z c #8e8e04",
-"aW c #8f9094",
-"#i c #908952",
-"#Q c #909021",
-"ag c #90d0d2",
-"bO c #916f34",
-"bQ c #91cdd3",
-".7 c #928a44",
-"#p c #928e6c",
-"#P c #947f2f",
-".A c #949204",
-"bh c #949495",
-".6 c #968e4c",
-"aC c #999721",
-".w c #9a8a44",
-"#M c #9a9a99",
-"ap c #9b9b21",
-".5 c #9c924c",
-"#R c #9c9a04",
-"#7 c #9d9d9b",
-"ao c #9e7641",
-".4 c #9e964c",
-"#J c #9e9b21",
-".B c #9e9e04",
-"ac c #9e9e9d",
-"#S c #a09e21",
-"ax c #a0a0a3",
-"aK c #a1a1a2",
-"aX c #a1a1a4",
-".r c #a2a204",
-"#1 c #a2a221",
-"aF c #a2e1dd",
-".3 c #a49a54",
-".2 c #a69e54",
-"bR c #a78446",
-"#6 c #a9a9a8",
-".T c #aaa254",
-".s c #aaaa04",
-"#W c #abaaa6",
-"aN c #ac8861",
-".S c #aea25c",
-".R c #aea65c",
-".t c #aeae04",
-"#L c #b0b0b0",
-"#o c #b2ae94",
-".u c #b2b204",
-"aI c #b2b2b4",
-"b# c #b3b3b2",
-"#X c #b4b4b6",
-"#V c #b5b4b4",
-".Q c #b6aa5c",
-".n c #b6b604",
-"aY c #b6b6b7",
-"bN c #b79658",
-"ah c #b7e5e3",
-"aG c #b7ebe9",
-"ar c #b9d9dc",
-"#8 c #bcbcbe",
-"ab c #bdbdbe",
-".m c #beae5c",
-".F c #beb264",
-"aq c #bef6f6",
-"aB c #c1a470",
-"#F c #c1c1c3",
-".E c #c2b664",
-"at c #c2e9eb",
-"bI c #c39c6a",
-"bs c #c3a366",
-"#U c #c3c3c0",
-"aw c #c3c3c1",
-"#G c #c3c3c7",
-"aD c #c3f1f2",
-"a# c #c6c6c3",
-"#2 c #c7edf3",
-".D c #c8ba6c",
-"bM c #c9a470",
-"#N c #c9c9c4",
-".C c #cabe6c",
-"ak c #cacaca",
-"bx c #cbb076",
-"aa c #cbcbc9",
-"a3 c #ccac7f",
-".H c #ceba54",
-"#E c #ceced0",
-"bi c #cfaf7e",
-"#Y c #cfcfcb",
-"bK c #d1ac80",
-"#5 c #d1d1cf",
-"bu c #d2ae83",
-"bm c #d3b180",
-"bD c #d3b384",
-"bF c #d4b589",
-"aJ c #d4d4d3",
-".j c #d6c664",
-".v c #d6c674",
-"#K c #d6d6d5",
-"bJ c #d7b588",
-"bd c #d8b289",
-"bz c #d8b78d",
-".q c #d8ca74",
-"aj c #d8d8d9",
-"bb c #dabd97",
-"a5 c #dcba91",
-"bE c #dcc097",
-"aA c #ddc292",
-"aP c #dec491",
-".p c #dece75",
-"bk c #dfc79c",
-"av c #e0e0e0",
-"#A c #e2dabc",
-"#O c #e2e2e4",
-"aO c #e3c898",
-"by c #e4c7a1",
-".l c #e6da84",
-"a4 c #e7c7a2",
-"bt c #eacaa5",
-".o c #eede84",
-".G c #eee284",
-".i c #eee294",
-"bn c #efd7b4",
-".k c #f2e69c",
-".e c #f2eaa4",
-"bc c #f3d8b8",
-"bj c #f5e2c8",
-"#r c #f6eea4",
-".f c #f6eeb8",
-".g c #f6f2cc",
-".c c #faf6d4",
-".d c #fafae4",
-".U c #feee95",
-"bA c #fef26c",
-"#q c #fef2ac",
-"#x c #fef2b8",
-"bp c #fef684",
-"bl c #fef690",
-"bg c #fef69c",
-"bf c #fef6a4",
-".a c #fef6b4",
-"#B c #fef6c4",
-"#y c #fef6ce",
-"a9 c #fefaac",
-"aV c #fefab7",
-"ai c #fefac4",
-"#4 c #fefad1",
-"#n c #fefadf",
-".h c #fefaec",
-"#T c #fefee6",
-".b c #fefefa",
-"QtQtQtQtQtQtQtQtQtQtQtQt.#QtQtQtQtQtQt.#QtQtQtQtQtQtQtQtQtQtQtQt",
-"QtQtQtQtQtQtQtQtQtQt.#.#.a.#QtQtQtQt.#.b.#.#QtQtQtQtQtQtQtQtQtQt",
-"QtQtQtQtQtQtQtQt.#.#.a.a.a.a.#QtQt.#.c.d.b.b.#.#QtQtQtQtQtQtQtQt",
-"QtQtQtQtQtQt.#.#.e.e.e.e.e.e.e.#.#.f.f.g.g.c.h.b.#.#QtQtQtQtQtQt",
-"QtQtQtQt.#.#.i.i.i.i.i.i.i.i.j.j.b.b.k.e.f.f.g.g.c.d.#.#QtQtQtQt",
-"QtQt.#.#.l.l.l.l.l.l.l.l.m.m.n.n.o.o.b.b.k.k.e.f.f.g.g.c.#.#QtQt",
-"Qt.#.p.p.q.p.p.p.p.p.m.m.r.s.t.u.p.q.v.v.b.b.i.i.k.e.f.f.g.g.#Qt",
-"QtQt.#.j.j.j.j.j.w.w.x.y.z.A.B.r.C.C.D.E.E.F.b.b.o.G.k.k.e.#QtQt",
-"QtQtQt.#.H.H.I.I.J.K.L.M.N.O.P.z.Q.Q.Q.R.R.R.S.T.b.b.G.G.#QtQtQt",
-"Qt.#.#.U.V.W.W.W.X.Y.Z.J.K.L.0.1.2.3.3.4.5.5.6.6.7.8.9#..b.#.#Qt",
-"QtQtQt.#.U.U.U.W.W##.W.X.Y#a.J.K.7.7#b#b#b#c#c#d#d.h.h.b.#QtQtQt",
-"QtQtQtQt.##e.U.U.U.W.W#f#g.W.X.Y#h#i#j#k#l#m#m#n#n.h#g.#QtQtQtQt",
-"QtQtQtQt.##o#p#e#q#q#r#f#f#s#f#g#t#u#v#u#w#x#y#y#g#g#z.#QtQtQtQt",
-"QtQtQtQt.#.b#A#o#p#e#B#B#B#C#C#D#u#E#F#G#u#y#g#g#H#I#J#uQtQtQtQt",
-"QtQtQtQt.#.b.h.b#A#o#p#e.d.d.d#u#K#L#M#N#O#u#P#Q#R#S#u#u#uQtQtQt",
-"QtQtQtQt.#.b#T.h#T#n#A#o#p#e#u#U#V#W#X#Y#Z#0#u#1#S#u#2#3#uQtQtQt",
-"QtQtQtQt.##T.h#T#n#T#n#4#A#u#5#6#7#6#8#Z#0#9#u#S#u#2#3a.Qt#u#uQt",
-"QtQtQtQt.##T#n#T#4#4#4#4#u#Oa#aaabac#Z#9#9#u#S#u#2adaeaf#uagah#u",
-"QtQtQtQt.##n#n#4#4#4ai#u#Oajak#Yalamanao#u#Sap#uaqar#3asagatau#u",
-"QtQtQtQt.##T#4#4#4ai#uav#O#OawaxayazaAaB#uapaC#uaDaEaFaGataH#uQt",
-"QtQtQtQt.##4#4aiaiai#uaIaJ#OaKaLaMaNaOaPao#u#uaDaQaRaSaTaU#uQtQt",
-"QtQtQtQt.##4aiaV.aaV#uaWaXaYaZa0a1a2a3a4a5ao#ua6a7a8#u#u#uQtQtQt",
-"QtQtQtQt.#aiaiaiaV.aa9#ub.b#baa0#u#1#ubbbcbdao#ua8#ube.#.#.#.#Qt",
-"QtQtQtQt.#aV.aaVaVbfbfbg#ubhba#u#1.AaC#ubibjbkao#ube#a.#.#.#.#.#",
-"QtQtQtQt.#.aa9.abfa9bgbgbg#u#ubl.AaC#uaD#ubmbna5ao#ubo.#.#.#.#Qt",
-"QtQtQtQt.#.aa9a9bgbgblblblblbpbpaC#uaDbqbr#ubsbtbuao#u.#.#QtQtQt",
-"QtQtQtQtQt.#.#bgbgbgblblbpbpbpbp#uatbvbwa8#u#ubxbybzao#uQtQtQtQt",
-"QtQtQtQtQtQtQt.#.#blblbpbpbAbp#uaDbBbwa8#ubebC#ubDbEbFao#uQtQtQt",
-"QtQtQtQtQtQtQtQtQt.#.#bAbpbA#uaDbGbwa8#ubH.#.#Qt#ubIbJbKao#uQtQt",
-"QtQtQtQtQtQtQtQtQtQtQt.#.##uaDbLbwa8#u.#.#QtQtQtQt#ubMbNbObP#uQt",
-"QtQtQtQtQtQtQtQtQtQtQtQtQt#ubQbwa8#u.#QtQtQtQtQtQtQt#ubRbO#uQtQt",
-"QtQtQtQtQtQtQtQtQtQtQtQtQtQt#u#u#uQtQtQtQtQtQtQtQtQtQt#u#uQtQtQt"};
-
-static bool findFileInPaths( const QString &fileName, const QStringList &paths )
-{
- QDir d;
- for( QStringList::ConstIterator it = paths.begin(); it != paths.end(); ++it ) {
- // Remove any leading or trailing ", this is commonly used in the environment
- // variables
- QString path = (*it);
- if ( path.startsWith( "\"" ) )
- path = path.right( path.length() - 1 );
- if ( path.endsWith( "\"" ) )
- path = path.left( path.length() - 1 );
- if( d.exists( path + QDir::separator() + fileName ) )
- return true;
- }
- return false;
-}
-
-bool findFile( const QString &fileName )
-{
- QString file = fileName.lower();
- QStringList paths;
-#if defined(Q_OS_WIN32)
- QRegExp split( "[;,]" );
-#else
- QRegExp split( "[:]" );
-#endif
- if ( file.endsWith( ".h" ) ) {
- if ( globalInformation.sysId() == GlobalInformation::Borland )
- return true;
- paths = QStringList::split( split, QEnvironment::getEnv( "INCLUDE" ) );
- } else if ( file.endsWith( ".lib" ) ) {
- if ( globalInformation.sysId() == GlobalInformation::Borland )
- return true;
- paths = QStringList::split( split, QEnvironment::getEnv( "LIB" ) );
- } else {
- paths = QStringList::split( split, QEnvironment::getEnv( "PATH" ) );
- }
- return findFileInPaths( file, paths );
-}
-
-static bool createDir( const QString& fullPath )
-{
- QStringList hierarchy = QStringList::split( QDir::separator(), fullPath );
- QString pathComponent, tmpPath;
- QDir dirTmp;
- bool success = true;
-
- for( QStringList::Iterator it = hierarchy.begin(); it != hierarchy.end(); ++it ) {
- pathComponent = *it + QDir::separator();
- tmpPath += pathComponent;
-#if defined(Q_OS_WIN32)
- success = dirTmp.mkdir( tmpPath );
-#else
- success = dirTmp.mkdir( QDir::separator() + tmpPath );
-#endif
- }
- return success;
-}
-
-SetupWizardImpl::SetupWizardImpl( QWidget* parent, const char* name, bool modal, WindowFlags flag ) :
- QWizard( parent, name, modal, flag ),
- tmpPath( QEnvironment::getTempPath() ),
- fixedPath(false),
- filesCopied( false ),
- filesToCompile( 0 ),
- filesCompiled( 0 ),
- licensePage( 0 ),
- licenseAgreementPage( 0 ),
- licenseAgreementPageQsa( 0 ),
- optionsPage( 0 ),
- optionsPageQsa( 0 ),
- foldersPage( 0 ),
- configPage( 0 ),
- progressPage( 0 ),
- buildPage( 0 ),
- finishPage( 0 )
-{
- // initialize
- if ( !name )
- setName( "SetupWizard" );
- resize( 600, 390 );
-#if defined(QSA)
- setCaption( trUtf8( "QSA Installation Wizard" ) );
-#else
- setCaption( trUtf8( "Qt Installation Wizard" ) );
-#endif
- QPixmap logo( ( const char** ) logo_data );
- setIcon( logo );
-#if defined(QSA)
- setIconText( trUtf8( "QSA Installation Wizard" ) );
-#else
- setIconText( trUtf8( "Qt Installation Wizard" ) );
-#endif
- QFont f( font() );
- f.setFamily( "Arial" );
- f.setPointSize( 12 );
- f.setBold( true );
- setTitleFont( f );
-
- totalFiles = 0;
-
- // try to read the archive header information and use them instead of
- // QT_VERSION_STR if possible
- QArchiveHeader *archiveHeader = 0;
- ResourceLoader rcLoader( "QT_ARQ", 500 );
- if ( rcLoader.isValid() ) {
- // First, try to find qt.arq as a binary resource to the file.
- QArchive ar;
- QDataStream ds( rcLoader.data(), IO_ReadOnly );
- archiveHeader = ar.readArchiveHeader( &ds );
- } else {
- // If the resource could not be loaded or is smaller than 500
- // bytes, we have the dummy qt.arq: try to find and install
- // from qt.arq in the current directory instead.
- QArchive ar;
- QString archiveName = "qt.arq";
-# if defined(Q_OS_MAC)
- QString appDir = qApp->argv()[0];
- int truncpos = appDir.findRev( "/Contents/MacOS/" );
- if (truncpos != -1)
- appDir.truncate( truncpos );
- archiveName = appDir + "/Contents/Qt/qtmac.arq";
-# endif
- ar.setPath( archiveName );
- if( ar.open( IO_ReadOnly ) ) {
- archiveHeader = ar.readArchiveHeader();
- }
- }
-
-#if defined(QSA)
- ResourceLoader rcLoaderQsa( "QSA_ARQ", 500 );
- if ( rcLoaderQsa.isValid() ) {
- // First, try to find qt.arq as a binary resource to the file.
- QArchive ar;
- QDataStream ds( rcLoaderQsa.data(), IO_ReadOnly );
- QArchiveHeader *archiveHeaderQsa = ar.readArchiveHeader( &ds );
- if ( archiveHeaderQsa ) {
- QString qsa_version_str = archiveHeaderQsa->description();
- if ( !qsa_version_str.isEmpty() )
- globalInformation.setQsaVersionStr( qsa_version_str );
- delete archiveHeaderQsa;
- }
- }
-#endif
-
-#if defined(Q_OS_WIN32)
- // First check for MSVC 6.0
- QString regValue = QEnvironment::getRegistryString( "Software\\Microsoft\\VisualStudio\\6.0\\Setup\\Microsoft Visual C++", "ProductDir", QEnvironment::LocalMachine );
- if (!regValue.isEmpty())
- globalInformation.setSysId(GlobalInformation::MSVC);
-
- // MSVC.NET 7.0 & 7.1 takes presedence over 6.0
- regValue = QEnvironment::getRegistryString( "Software\\Microsoft\\VisualStudio\\7.0", "InstallDir", QEnvironment::LocalMachine );
- if (regValue.isEmpty())
- regValue = QEnvironment::getRegistryString( "Software\\Microsoft\\VisualStudio\\7.1", "InstallDir", QEnvironment::LocalMachine );
- if (!regValue.isEmpty())
- globalInformation.setSysId(GlobalInformation::MSVCNET);
-
- while (globalInformation.sysId() == GlobalInformation::Other) {
- globalInformation.setSysId(GlobalInformation::Borland);
- if (findFile(globalInformation.text(GlobalInformation::MakeTool)))
- break;
- globalInformation.setSysId(GlobalInformation::MSVCNET);
- if (findFile(globalInformation.text(GlobalInformation::MakeTool)))
- break;
- globalInformation.setSysId(GlobalInformation::MinGW);
- if (findFile(globalInformation.text(GlobalInformation::MakeTool)))
- break;
- globalInformation.setSysId(GlobalInformation::Watcom);
- if (findFile(globalInformation.text(GlobalInformation::MakeTool)))
- break;
- }
-#endif
-
- if ( archiveHeader ) {
- QString qt_version_str = archiveHeader->description();
- if ( !qt_version_str.isEmpty() )
- globalInformation.setQtVersionStr( qt_version_str );
-
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- if ( archiveHeader->findExtraData( "compiler" ) == "borland" )
- globalInformation.setSysId(GlobalInformation::Borland);
-#endif
- delete archiveHeader;
- }
-
- initPages();
- initConnections();
-
- if (optionsPage) {
-#if defined(QSA)
- optionsPage->installPath->setText(
- QString( "C:\\Qt_QSA\\Qt" ) +
- QString( globalInformation.qtVersionStr() ).replace( QRegExp("\\s"), "" ).replace( QRegExp("-"), "" )
- );
-#endif
- }
- if ( optionsPageQsa ) {
-#if defined(QSA)
- optionsPageQsa->installPath->setText(
- QString( "C:\\Qt_QSA\\QSA" ) +
- QString( globalInformation.qsaVersionStr() ).replace( QRegExp("\\s"), "" ).replace( QRegExp("-"), "" )
- );
-#endif
- }
- readLicense( QDir::homeDirPath() + "/.qt-license" );
-}
-
-static bool copyFile( const QString& src, const QString& dest )
-{
-#ifdef Q_WS_WIN
- QT_WA( {
- return CopyFileW( (const wchar_t*)src.ucs2(), (const wchar_t*)dest.ucs2(), false );
- }, {
- return CopyFileA( src.local8Bit(), dest.local8Bit(), false );
- } );
-#else
- int len;
- const int buflen = 4096;
- char buf[buflen];
- QFileInfo info( src );
- QFile srcFile( src ), destFile( dest );
- if (!srcFile.open( IO_ReadOnly ))
- return false;
- destFile.remove();
- if (!destFile.open( IO_WriteOnly ))
- return false;
-
- while (!srcFile.atEnd()) {
- len = srcFile.readBlock( buf, buflen );
- if (len <= 0)
- break;
- if (destFile.writeBlock( buf, len ) != len)
- return false;
- }
- destFile.flush();
- return true;
-#endif
-}
-
-void SetupWizardImpl::initPages()
-{
-#define ADD_PAGE( var, Class ) \
- { \
- var = new Class( this, #var ); \
- SideDecorationImpl *sideDeco = new SideDecorationImpl( var ); \
- \
- Q_ASSERT( var->layout() != 0 ); \
- if ( var->layout()->inherits("QBoxLayout") ) { \
- ((QBoxLayout*)var->layout())->insertWidget( 0, sideDeco ); \
- ((QBoxLayout*)var->layout())->insertSpacing( 1, 10 ); \
- } \
- \
- pages.append( var ); \
- addPage( var, var->title() ); \
- setHelpEnabled( var, false ); \
- \
- connect( this, SIGNAL(wizardPages(const QPtrList<Page>&)), \
- sideDeco, SLOT(wizardPages(const QPtrList<Page>&)) ); \
- connect( this, SIGNAL(wizardPageShowed(int)), \
- sideDeco, SLOT(wizardPageShowed(int)) ); \
- connect( this, SIGNAL(wizardPageFailed(int)), \
- sideDeco, SLOT(wizardPageFailed(int)) ); \
- connect( this, SIGNAL(editionString(const QString&)), \
- sideDeco->editionLabel, SLOT(setText(const QString&)) ); \
- }
-
- QPtrList<Page> pages;
- if( globalInformation.reconfig() ) {
- ADD_PAGE( configPage, ConfigPageImpl )
- ADD_PAGE( buildPage, BuildPageImpl )
- ADD_PAGE( finishPage, FinishPageImpl )
- } else {
-#if defined(Q_OS_WIN32)
- ADD_PAGE( winIntroPage, WinIntroPageImpl )
-#endif
-#if !defined(EVAL_CD) && !defined(NON_COMMERCIAL)
- ADD_PAGE( licensePage, LicensePageImpl )
-#endif
- ADD_PAGE( licenseAgreementPage, LicenseAgreementPageImpl)
-#if defined(QSA)
- ADD_PAGE( licenseAgreementPageQsa, LicenseAgreementPageImpl)
-#endif
- ADD_PAGE( optionsPage, OptionsPageImpl )
-#if defined(QSA)
- ADD_PAGE( optionsPageQsa, OptionsPageImpl )
-#endif
-#if !defined(Q_OS_UNIX)
- ADD_PAGE( foldersPage, FoldersPageImpl )
-#endif
- ADD_PAGE( configPage, ConfigPageImpl )
- ADD_PAGE( progressPage, ProgressPageImpl )
- ADD_PAGE( buildPage, BuildPageImpl )
- ADD_PAGE( finishPage, FinishPageImpl )
- }
-#undef ADD_PAGE
-
- if ( licensePage ) {
- setNextEnabled( licensePage, false );
- }
- if ( licenseAgreementPage ) {
- setNextEnabled( licenseAgreementPage, false );
- }
- if ( licenseAgreementPageQsa ) {
- setNextEnabled( licenseAgreementPageQsa, false );
- licenseAgreementPage->titleStr = "License agreement Qt";
- licenseAgreementPageQsa->titleStr = "License agreement QSA";
- }
- if ( optionsPage ) {
- setBackEnabled( optionsPage, false );
- }
- if ( optionsPageQsa ) {
- optionsPageQsa->installExamples->hide();
- optionsPageQsa->installTools->hide();
- optionsPageQsa->installExtensions->hide();
- optionsPageQsa->installTutorials->hide();
- optionsPageQsa->skipBuild->hide();
- optionsPageQsa->installDocs->hide();
- optionsPageQsa->sysGroup->hide();
- optionsPageQsa->pathLabel->setText("QSA destination &path");
-
- optionsPage->titleStr = "Options for Qt";
- optionsPage->shortTitleStr = "Choose options for Qt";
- optionsPageQsa->titleStr = "Options for QSA";
- optionsPageQsa->shortTitleStr = "Choose options for QSA";
- }
- if ( configPage )
- setBackEnabled( configPage, false );
- if ( progressPage ) {
- setBackEnabled( progressPage, false );
- setNextEnabled( progressPage, false );
- }
- if ( buildPage ) {
- setBackEnabled( buildPage, false );
- setNextEnabled( buildPage, false );
- }
- if ( finishPage ) {
- setBackEnabled( finishPage, false );
- setFinishEnabled( finishPage, true );
- }
- emit wizardPages( pages );
-}
-
-void SetupWizardImpl::initConnections()
-{
- connect( &autoContTimer, SIGNAL( timeout() ), this, SLOT( timerFired() ) );
-
- if ( optionsPage ) {
- connect( optionsPage->sysGroup, SIGNAL(clicked(int)), SLOT(clickedSystem(int)));
- connect( optionsPage->sysOtherCombo, SIGNAL(activated(int)), SLOT(sysOtherComboChanged(int)));
- }
- if ( foldersPage ) {
- connect( foldersPage->folderPathButton, SIGNAL(clicked()), SLOT(clickedFolderPath()));
- connect( foldersPage->devSysPathButton, SIGNAL(clicked()), SLOT(clickedDevSysPath()));
- }
- if ( licensePage ) {
- connect( licensePage->readLicenseButton, SIGNAL(clicked()), SLOT(clickedLicenseFile()));
- connect( licensePage->customerID, SIGNAL(textChanged(const QString&)), SLOT(licenseChanged()));
- connect( licensePage->licenseID, SIGNAL(textChanged(const QString&)), SLOT(licenseChanged()));
- connect( licensePage->licenseeName, SIGNAL(textChanged(const QString&)), SLOT(licenseChanged()));
- connect( licensePage->expiryDate, SIGNAL(textChanged(const QString&)), SLOT(licenseChanged()));
- connect( licensePage->productsString, SIGNAL(activated(int)), SLOT(licenseChanged()));
- connect( licensePage->key, SIGNAL(textChanged(const QString&)), SLOT(licenseChanged()));
- }
- if ( configPage ) {
- connect( configPage->configTabs, SIGNAL(currentChanged(QWidget*)), SLOT(configPageChanged()));
- }
- if ( buildPage ) {
- connect( &configure, SIGNAL( processExited() ), this, SLOT( configDone() ) );
- connect( &configure, SIGNAL( readyReadStdout() ), this, SLOT( readConfigureOutput() ) );
- connect( &configure, SIGNAL( readyReadStderr() ), this, SLOT( readConfigureError() ) );
- connect( &make, SIGNAL( processExited() ), this, SLOT( makeDone() ) );
- connect( &make, SIGNAL( readyReadStdout() ), this, SLOT( readMakeOutput() ) );
- connect( &make, SIGNAL( readyReadStderr() ), this, SLOT( readMakeError() ) );
- connect( buildPage->restartBuild, SIGNAL(clicked()), this, SLOT(restartBuild()) );
- }
-}
-
-void SetupWizardImpl::stopProcesses()
-{
- if( cleaner.isRunning() )
- cleaner.kill();
- if( configure.isRunning() )
- configure.kill();
- if( make.isRunning() )
- make.kill();
-}
-
-void SetupWizardImpl::clickedFolderPath()
-{
- foldersPage->folderPath->setText( shell.selectFolder( foldersPage->folderPath->text(), ( foldersPage->folderGroups->currentItem() == 0 ) ) );
-}
-
-void SetupWizardImpl::clickedDevSysPath()
-{
- QDir dir( foldersPage->devSysPath->text() );
- if( !dir.exists() )
- dir.setPath( devSysFolder );
-
- QString dest = QFileDialog::getExistingDirectory( dir.absPath(), this, 0, "Select the path to Microsoft Visual Studio" );
- if (!dest.isNull())
- foldersPage->devSysPath->setText( dest );
-}
-
-void SetupWizardImpl::sysOtherComboChanged(int)
-{
- clickedSystem(GlobalInformation::Other);
-}
-
-static QString getDirectoryList(const char *envvar)
-{
- QString environment;
- const char *cpath = getenv(envvar);
- if (cpath) {
- environment = QString::fromLocal8Bit(cpath);
- environment = QStringList::split(QRegExp("[;,]"), environment).join("\n");
- } else {
- environment = "<Environment variable empty>";
- }
- return environment;
-}
-
-void SetupWizardImpl::clickedSystem( int sys )
-{
-#ifndef Q_OS_MACX
- if (sys == 99) // This is the Integrate with IDE checkbox
- return;
- globalInformation.setSysId( GlobalInformation::SysId(sys) );
- if (sys == GlobalInformation::Other) {
- if (optionsPage->sysOtherCombo->currentText() == "win32-watcom")
- globalInformation.setSysId(GlobalInformation::Watcom);
- }
- if (!isVisible())
- return;
- QString makeCmd = globalInformation.text(GlobalInformation::MakeTool);
- QString environment;
- fixedPath = false;
- if ( !optionsPage->skipBuild->isChecked() && optionsPage->skipBuild->isEnabled() ) {
- QString commandTool;
- environment = getenv("COMSPEC");
- if( qWinVersion() & WV_DOS_based )
- commandTool = "command.com";
- else
- commandTool = "cmd.exe";
- if (!environment.isEmpty() && !environment.endsWith(commandTool, false)) {
- if (QMessageBox::critical(this, "Environment problems",
- "The 'COMSPEC' environment variable is not set to use\n"
- "'" + commandTool + "'. This could cause some problems when building.\n"
- "If you have difficulty then change it to use '" + commandTool + "'\n"
- "and restart the installation\n\n"
- "Please contact your local system administration if you have\n"
- "difficulties finding the file, or if you don't know how to\n"
- "modify the environment settings on your system.\n\n"
- "Alternatively, by clicking yes, the installer will try to set\n"
- "these for you.",
- QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes)
- fixEnvironment("COMSPEC", commandTool);
- }
- if( !findFile( makeCmd ) ) {
- environment = getDirectoryList("PATH");
- // ### try to adjust environment
- if (QMessageBox::critical(this, "Environment problems",
- "The make tool '" + makeCmd + "' could not be located in any\n"
- "directory listed in the 'PATH' environment variable:"
- "\n\n" + environment + "\n\n"
- "Make sure the path to this file is present in the PATH environment\n"
- "variable and restart the installation.\n"
- "\n"
- "You can find the path to the tool using the 'Find' tool\n"
- "and add the location to the environment settings of your\n"
- "system. Please contact your local system administration if\n"
- "you have difficulties finding the files, or if you don't\n"
- "know how to modifiy the environment settings of your system.\n\n"
- "Alternatively, by clicking yes, the installer will try to set\n"
- "these for you.",
- QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes)
- fixEnvironment("PATH", makeCmd);
- }
- if (globalInformation.sysId() != GlobalInformation::Borland && globalInformation.sysId() != GlobalInformation::MinGW) {
- if (!findFile( "string.h" ) ) {
- environment = getDirectoryList("INCLUDE");
- // ### try to adjust environment
- if (QMessageBox::critical(this, "Environment problems",
- "The file 'string.h' could not be located in any directory\n"
- "listed in the 'INCLUDE' environment variable:\n\n" + environment + "\n\n"
- "You might have to install the platform headers, or adjust\n"
- "the environment variables of your system, and restart the\n"
- "installation.\n\n"
- "Please contact your local system administration if you have\n"
- "difficulties finding the file, or if you don't know how to\n"
- "modify the environment settings on your system.\n\n"
- "Alternatively, by clicking yes, the installer will try to set\n"
- "these for you.",
- QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes)
- fixEnvironment("INCLUDE", "string.h");
-
- }
- if (!findFile("ole32.lib")) {
- environment = getDirectoryList("LIB");
- // ### try to adjust environment
- if (QMessageBox::critical(this, "Environment problems",
- "The file 'ole32.lib' could not be located in any directory\n"
- "listed in the 'LIB' environment variable:\n\n" + environment + "\n\n"
- "You might have to install the platform libraries, or adjust\n"
- "the environment variables of your system, and restart the\n"
- "installation.\n\n"
- "Please contact your local system administration if you have\n"
- "difficulties finding the file, or if you don't know how to\n"
- "modify the environment settings on your system.\n\n"
- "Alternatively, by clicking yes, the installer will try to set\n"
- "these for you.",
- QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes)
- fixEnvironment("LIB", "ole32.lib");
-
- }
- bool foundCommonDll = false;
- QString commonDll;
- QString commonDllText;
- QString presentFileText = "Make sure the path to this file is present in the PATH environment\n";
- if (globalInformation.sysId() == GlobalInformation::MSVC) {
- commonDll = "mspdb60.dll";
- foundCommonDll = findFile(commonDll);
- commonDllText = "The file 'mspdb60.dll' ";
- } else if(globalInformation.sysId() == GlobalInformation::MSVCNET) {
- commonDll = "mspdb70.dll";
- foundCommonDll = findFile(commonDll);
- if (!foundCommonDll) {
- commonDll = "mspdb71.dll";
- foundCommonDll = findFile(commonDll);
- commonDllText = "The files 'mspdb70.dll' and 'mspdb71.dll' "; // VC 7.0 or VC 7.1
- presentFileText = "Make sure the path to one of these files is present in the PATH environment\n";
- }
- } else {
- foundCommonDll = true;
- }
- if(!foundCommonDll && !fixedPath) {
- environment = getDirectoryList("PATH");
- // ### try to adjust environment
- if (QMessageBox::critical(this, "Environment problems",
- commonDllText + "could not be located in any\n"
- "directory listed in the 'PATH' environment variable:"
- "\n\n" + environment + "\n\n"
- + presentFileText +
- "variable and restart the installation.\n"
- "\n"
- "You can find the path to the tool using the 'Find' tool\n"
- "and add the location to the environment settings of your\n"
- "system. Please contact your local system administration if\n"
- "you have difficulties finding the files, or if you don't\n"
- "know how to modifiy the environment settings of your system.\n\n"
- "Alternatively, by clicking yes, the installer will try to set\n"
- "these for you.",
- QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes)
- fixEnvironment("PATH", commonDllText);
-
- }
- }
- if (globalInformation.sysId() == GlobalInformation::Intel && !findFile("icl.exe")) {
- environment = getDirectoryList("PATH");
- if (QMessageBox::critical(this, "Environment problems",
- "The Intel C++ compiler (icl.exe) could not be found\n"
- "in your PATH:\n\n" + environment + "\n\n"
- "Make sure the path to this file is present in the PATH environment\n"
- "variable and restart the installation.\n"
- "\n"
- "You can find the path to the tool using the 'Find' tool\n"
- "and add the location to the environment settings of your\n"
- "system. Please contact your local system administration if\n"
- "you have difficulties finding the files, or if you don't\n"
- "know how to modifiy the environment settings of your system.\n\n"
- "Alternatively, by clicking yes, the installer will try to set\n"
- "these for you.",
- QMessageBox::Yes, QMessageBox::No) == QMessageBox::Yes)
- fixEnvironment("PATH", "icl.exe");
-
- }
- }
-#endif
-}
-
-void SetupWizardImpl::fixEnvironment(const QString &var, const QString &file)
-{
- if (var == "COMSPEC" || !(globalInformation.sysId() == GlobalInformation::MSVC ||
- globalInformation.sysId() == GlobalInformation::MSVCNET)) {
- QString fn = QDir::toNativeSeparators(QFileDialog::getOpenFileName(QString(), QString(), this, 0,
- "Please find " + file));
- QString envs = getenv(var);
- if (var != "COMSPEC") {
- fn.truncate(fn.findRev("\\") - 1);
- fn += ";" + envs;
- }
- if (!fn.isEmpty())
- QEnvironment::putEnv(var, fn, QEnvironment::PersistentEnv | QEnvironment::LocalEnv);
- } else if (globalInformation.sysId() == GlobalInformation::MSVC) {
- QString visualStudio =
- QEnvironment::getRegistryString("Software\\Microsoft\\VisualStudio\\6.0\\Setup\\Microsoft Visual Studio",
- "ProductDir", QEnvironment::LocalMachine);
- if (var == "PATH" && !fixedPath) {
- QString newPaths = visualStudio + "\\vc98\\bin;";
- newPaths += visualStudio + "\\Common\\MSDev98\\Bin;";
- if (qWinVersion() & Qt::WV_NT_based)
- newPaths += visualStudio + "\\Common\\Tools\\WinNT;";
- else
- newPaths += visualStudio + "\\Common\\Tools\\Win95;";
- QEnvironment::putEnv("PATH", newPaths + getenv("PATH"),
- QEnvironment::PersistentEnv | QEnvironment::LocalEnv);
- fixedPath = true;
- } else if (var == "LIB") {
- QString newPaths = visualStudio + "\\vc98\\lib;";
- newPaths += visualStudio + "\\vc98\\mfc\\lib;";
- QEnvironment::putEnv("LIB", newPaths + getenv("LIB"),
- QEnvironment::PersistentEnv | QEnvironment::LocalEnv);
- } else if (var == "INCLUDE") {
- QString newPaths = visualStudio + "\\vc98\\atl\\include;";
- newPaths += visualStudio + "\\vc98\\include;";
- newPaths += visualStudio + "\\vc98\\mfc\\include;";
- QEnvironment::putEnv("INCLUDE", newPaths + getenv("INCLUDE"),
- QEnvironment::PersistentEnv | QEnvironment::LocalEnv);
- }
- } else if (globalInformation.sysId() == GlobalInformation::MSVCNET) {
- QString visualStudio = QEnvironment::getRegistryString("Software\\Microsoft\\VisualStudio\\7.1\\Setup\\VS",
- "ProductDir", QEnvironment::LocalMachine);
- if (visualStudio.isEmpty())
- visualStudio = QEnvironment::getRegistryString("Software\\Microsoft\\VisualStudio\\7.0\\Setup\\VS",
- "ProductDir", QEnvironment::LocalMachine);
- // With .NET this isn't so easily done, we need to read in the vsvars32.bat file
- // to get this right
- QFile f(visualStudio + "\\Common7\\Tools\\vsvars32.bat");
- QString contents;
- if (f.open(IO_ReadOnly)) {
- contents = QString(f.readAll());
- }
- int vsinstall = contents.find("VSINSTALLDIR=")+13;
- QString VSINSTALLDIR = contents.mid(vsinstall, contents.find("\n", vsinstall) - vsinstall);
- int vcinstall = contents.find("VCINSTALLDIR=")+13;
- QString VCINSTALLDIR = contents.mid(vcinstall, contents.find("\n", vcinstall) - vcinstall);
- int framework = contents.find("FrameworkDir=")+13;
- QString FrameworkDir = contents.mid(framework, contents.find("\n", framework) - framework);
- int frameworkVer = contents.find("FrameworkVersion=")+17;
- QString FrameworkVer = contents.mid(frameworkVer, contents.find("\n", frameworkVer) - frameworkVer);
- int frameworkSDK = contents.find("FrameworkSDKDir=")+16;
- QString FrameworkSDK = contents.mid(frameworkSDK, contents.find("\n", frameworkSDK) - frameworkSDK);
- if (var == "PATH" && !fixedPath) {
- QString newPaths = VSINSTALLDIR + ";";
- newPaths += VCINSTALLDIR + "\\Bin;";
- newPaths += VCINSTALLDIR + "\\Common7\\Tools;";
- newPaths += VCINSTALLDIR + "\\Common7\\Tools\\bin\\prerelease;";
- newPaths += VCINSTALLDIR + "\\Common7\\Tools\\bin;";
- newPaths += FrameworkSDK + "\\bin;";
- newPaths += FrameworkSDK + "\\" + FrameworkVer + ";";
- QEnvironment::putEnv("PATH", newPaths + getenv("PATH"),
- QEnvironment::PersistentEnv | QEnvironment::LocalEnv);
- fixedPath = true;
- } else if (var == "LIB") {
- QString newPaths = VCINSTALLDIR + "\\ATLMFC\\LIB;";
- newPaths += VCINSTALLDIR + "\\LIB;";
- newPaths += VCINSTALLDIR + "\\PlatformSDK\\lib\\prerelease;";
- newPaths += VCINSTALLDIR + "\\PlatformSDK\\lib;";
- newPaths += FrameworkSDK + "\\lib;";
- QEnvironment::putEnv("LIB", newPaths + getenv("LIB"),
- QEnvironment::PersistentEnv | QEnvironment::LocalEnv);
- } else if (var == "INCLUDE") {
- QString newPaths = VCINSTALLDIR + "\\ATLMFC\\INCLUDE;";
- newPaths += VCINSTALLDIR + "\\INCLUDE;";
- newPaths += VCINSTALLDIR + "\\PlatformSDK\\include\\prerelease;";
- newPaths += VCINSTALLDIR + "\\PlatformSDK\\include;";
- newPaths += FrameworkSDK + "\\include;";
- QEnvironment::putEnv("INCLUDE", newPaths + getenv("INCLUDE"),
- QEnvironment::PersistentEnv | QEnvironment::LocalEnv);
- }
-
- }
-}
-
-void SetupWizardImpl::readCleanerOutput()
-{
- updateDisplay( cleaner.readStdout(), currentOLine );
-}
-
-void SetupWizardImpl::readConfigureOutput()
-{
- updateDisplay( configure.readStdout(), currentOLine );
-}
-
-void SetupWizardImpl::readMakeOutput()
-{
- updateDisplay( make.readStdout(), currentOLine );
-}
-
-void SetupWizardImpl::readAssistantOutput()
-{
-#if defined(QSA)
- updateDisplay( assistant.readStdout(), currentOLine );
-#endif
-}
-
-void SetupWizardImpl::readCleanerError()
-{
- updateDisplay( cleaner.readStderr(), currentELine );
-}
-
-void SetupWizardImpl::readConfigureError()
-{
- updateDisplay( configure.readStderr(), currentELine );
-}
-
-void SetupWizardImpl::readMakeError()
-{
- updateDisplay( make.readStderr(), currentELine );
-}
-
-void SetupWizardImpl::readAssistantError()
-{
-#if defined(QSA)
- updateDisplay( assistant.readStderr(), currentELine );
-#endif
-}
-
-void SetupWizardImpl::updateDisplay( const QString &input, QString &output)
-{
- const QChar *c = input.unicode();
- for( int i = 0; i < (int)input.length(); ++i, ++c ) {
- switch( char( *c ) ) {
- case '\r':
- case 0x00:
- break;
- case '\t':
- currentOLine += " "; // Simulate a TAB by using 4 spaces
- break;
- case '\n':
- if( output.length() ) {
- if ( !globalInformation.reconfig() ) {
- if ( output.right( 4 ) == ".cpp" ||
- output.right( 2 ) == ".c" ||
- output.right( 4 ) == ".pro" ||
- output.right( 3 ) == ".ui" ) {
- buildPage->compileProgress->setProgress( ++filesCompiled );
- }
- }
- logOutput( output );
- output = "";
- }
- break;
- default:
- output += *c;
- break;
- }
- }
-}
-
-#if defined(Q_OS_WIN32)
-void SetupWizardImpl::installIcons( const QString& iconFolder, const QString& dirName, bool common )
-{
- QDir dir( dirName );
-
- dir.setSorting( QDir::Name | QDir::IgnoreCase );
- const QFileInfoList* filist = dir.entryInfoList();
- if ( !filist )
- return;
- QFileInfoListIterator it( *filist );
- QFileInfo* fi;
- while( ( fi = it.current() ) ) {
- if( fi->fileName()[0] != '.' && // Exclude dot-dirs
- fi->fileName() != "sql" ) { // Exclude SQL-dir
- if( fi->isDir() ) {
- installIcons( iconFolder, fi->absFilePath(), common );
- } else if( fi->fileName().right( 4 ) == ".exe" ) {
- shell.createShortcut( iconFolder, common, fi->baseName(), fi->absFilePath() );
- }
- }
- ++it;
- }
-}
-#endif
-
-void SetupWizardImpl::assistantDone()
-{
-#if defined(QSA)
- QString contentFile;
- static int count = 0;
- if ( count == 0 ) {
- connect( &assistant, SIGNAL( processExited() ), this, SLOT( assistantDone() ) );
- connect( &assistant, SIGNAL( readyReadStdout() ), this, SLOT( readAssistantOutput() ) );
- connect( &assistant, SIGNAL( readyReadStderr() ), this, SLOT( readAssistantError() ) );
- contentFile = "qsa.xml";
- } else if ( count == 1 ) {
- contentFile = "qt-script-for-applications.xml";
- } else {
- doIDEIntegration();
- return;
- }
- ++count;
-
- // install documentation
- QDir html( optionsPageQsa->installPath->text() );
- html.cd( "doc/html/" );
-
- QStringList lst;
- lst << "assistant";
- lst << "-addContentFile";
- lst << QDir::toNativeSeparators( html.filePath( contentFile ) );
- assistant.setArguments( lst );
- if( !assistant.start() ) {
- logOutput( "Installing QSA documentation failed\n" );
- assistantDone();
- }
-#else
- doIDEIntegration();
-#endif
-}
-
-void SetupWizardImpl::doIDEIntegration()
-{
-#if defined(Q_OS_WIN32)
- QDir installDir( optionsPage->installPath->text() );
- if ( optionsPage->installIDEIntegration->isChecked() && optionsPage->installIDEIntegration->isEnabled()
- && !foldersPage->devSysPath->text().isEmpty() ) {
- // install the precompiled MS integration
- if ( globalInformation.sysId() == GlobalInformation::MSVC ) {
- QDir addinsDir( foldersPage->devSysPath->text() );
- addinsDir.cd( "Common/MSDev98/Addins" );
- if ( copyFile( installDir.filePath("qmsdev.dll"), addinsDir.filePath("qmsdev.dll") ) ) {
- installDir.remove( "qmsdev.dll" );
- }
- } else if ( globalInformation.sysId() == GlobalInformation::MSVCNET
- || globalInformation.sysId() == GlobalInformation::Intel){
- QString filepath = installDir.filePath("QMsNetSetup.msi");
- filepath = filepath.replace( '/', '\\' );
-
- int res = _spawnlp( _P_NOWAIT, "msiexec.exe", "msiexec.exe", "-i", filepath.latin1(), NULL );
- if ( res == -1 ) {
- //MSIExec is not in path, look up in registry (only works for NT machines)
- QString msiexec = QEnvironment::getRegistryString( "SYSTEM\\CurrentControlSet\\Services\\MSIServer",
- "ImagePath",
- QEnvironment::LocalMachine );
- if ( !msiexec.isEmpty() )
- msiexec.remove( " /V" );
- res = _spawnl( _P_NOWAIT, msiexec.latin1(), msiexec.latin1(), "-i", filepath.latin1(), NULL );
- }
-
- if ( res == -1 ) {
- QMessageBox::warning( this, "Couldn't execute .NET addin installer script",
- "Microsoft Installer (MSI) was not found on your system.\n"
- "Please install MSI, then execute the .NET addin installer "
- "script,\nlocated at " + filepath );
- }
- }
-
- QFile *autoexp = 0;
- QFile *usertype = 0;
- switch( globalInformation.sysId() ) {
- case GlobalInformation::MSVC:
- autoexp = new QFile( foldersPage->devSysPath->text() + "\\Common\\MsDev98\\bin\\autoexp.dat" );
- usertype = new QFile( foldersPage->devSysPath->text() + "\\Common\\MsDev98\\bin\\usertype.dat" );
- break;
- case GlobalInformation::MSVCNET:
- autoexp = new QFile( foldersPage->devSysPath->text() + "\\Common7\\Packages\\Debugger\\autoexp.dat" );
- usertype = new QFile( foldersPage->devSysPath->text() + "\\Common7\\Packages\\Debugger\\usertype.dat" );
- break;
- }
-
- if ( autoexp ) {
- QString autoExpContents;
- if ( !autoexp->exists() ) {
- autoexp->open( IO_WriteOnly );
- } else {
- // First try to open the file to search for existing installations
- autoexp->open( IO_ReadOnly );
- QByteArray bytes = autoexp->readAll();
- autoExpContents = QString::fromLatin1(bytes.data(), bytes.size());
- autoexp->close();
- if ( autoExpContents.find( "; Trolltech Qt" ) == -1 )
- autoexp->open(IO_WriteOnly | IO_Translate);
- }
- if( autoexp->isOpen() ) {
- bool written = false;
- QTextStream outstream( autoexp );
- QStringList entries = QStringList::split("\r\n", autoExpContents, true);
- for (QStringList::Iterator entry = entries.begin(); entry != entries.end(); ++entry) {
- QString e(*entry);
- outstream << e << endl;
- if (!written && e.startsWith("[AutoExpand]")) {
- outstream << endl;
- outstream << "; Trolltech Qt" << endl;
- outstream << "QString=<d->unicode,su> len=<d->len,u>" << endl;
- outstream << "QCString =<shd->data, s>" << endl;
- outstream << "QPoint =x=<xp> y=<yp>" << endl;
- outstream << "QRect =x1=<x1> y1=<y1> x2=<x2> y2=<y2>" << endl;
- outstream << "QSize =width=<wd> height=<ht>" << endl;
- outstream << "QWMatrix =m11=<_m11> m12=<_m12> m21=<_m21> m22=<_m22> dx=<_dx> dy=<_dy>" << endl;
- outstream << "QVariant =Type=<d->typ> value=<d->value>" << endl;
- outstream << "QValueList<*> =Count=<sh->nodes>" << endl;
- outstream << "QPtrList<*> =Count=<numNodes>" << endl;
- outstream << "QGuardedPtr<*> =ptr=<priv->obj>" << endl;
- outstream << "QEvent =type=<t>" << endl;
- outstream << "QObject =class=<metaObj->classname,s> name=<objname,s>" << endl;
- written = true;
- }
- }
- autoexp->close();
- }
- delete autoexp;
- }
-
- if ( usertype ) {
- if ( !usertype->exists() ) {
- usertype->open( IO_WriteOnly | IO_Translate );
- } else {
- usertype->open( IO_ReadOnly );
- QString existingUserType = usertype->readAll();
- usertype->close();
- if ( existingUserType.find( "Q_OBJECT" ) == -1 )
- usertype->open(IO_WriteOnly | IO_Append | IO_Translate);
- }
- if ( usertype->isOpen() ) {
- QTextStream outstream( usertype );
- outstream << endl;
- outstream << "Q_OBJECT" << endl;
- outstream << "Q_PROPERTY" << endl;
- outstream << "Q_ENUMS" << endl;
- outstream << "Q_SETS" << endl;
- outstream << "Q_CLASSINFO" << endl;
- outstream << "emit" << endl;
- outstream << "TRUE" << endl;
- outstream << "FALSE" << endl;
- outstream << "SIGNAL" << endl;
- outstream << "SLOT" << endl;
- outstream << "signals:" << endl;
- outstream << "slots:" << endl;
- usertype->close();
- }
- delete usertype;
- }
- }
-
- if ( globalInformation.sysId() != GlobalInformation::MinGW )
- installDir.remove( "Makefile.win32-g++" );
- if (globalInformation.sysId() != GlobalInformation::MSVC)
- installDir.remove( "qmsdev.dll" );
- if (globalInformation.sysId() != GlobalInformation::MSVCNET)
- installDir.remove( "QMsNetSetup.msi" );
-#endif
-
- doStartMenuIntegration();
-}
-
-void SetupWizardImpl::doStartMenuIntegration()
-{
-#if defined(Q_OS_WIN32)
- /*
- ** Set up our icon folder and populate it with shortcuts.
- ** Then move to the next page.
- */
- QString dirName, examplesName, tutorialsName;
- bool common( foldersPage->folderGroups->currentItem() == 0 );
- QString qtDir = QEnvironment::getEnv( "QTDIR" );
-
- dirName = shell.createFolder( foldersPage->folderPath->text(), common );
- shell.createShortcut( dirName, common, "Qt Designer", qtDir + "\\bin\\designer.exe", "GUI designer", "", qtDir );
-#if !defined(EVAL) && !defined(EDU) && !defined(NON_COMMERCIAL)
- shell.createShortcut( dirName, common, "Reconfigure Qt",
- qtDir + "\\bin\\install.exe",
- "Reconfigure the Qt library",
- QString("-reconfig \"%1\"").arg(globalInformation.qtVersionStr()),
- qtDir );
-#endif
-#if defined(QSA)
- shell.createShortcut( dirName, common, "License agreement for Qt", "notepad.exe", "Review the license agreement",
- "\"" + qtDir + "\\" LICENSE_DEST "\"" );
- shell.createShortcut( dirName, common, "Readme for Qt", "notepad.exe", "Important information",
- "\"" + qtDir + "\\README\"" );
- shell.createShortcut( dirName, common, "License agreement for QSA", "notepad.exe", "Review the license agreement",
- "\"" + optionsPageQsa->installPath->text() + "\\" LICENSE_DEST "\"" );
- shell.createShortcut( dirName, common, "Readme for QSA", "notepad.exe", "Important information",
- "\"" + optionsPageQsa->installPath->text() + "\\README\"" );
-#else
- shell.createShortcut( dirName, common, "License agreement", "notepad.exe", "Review the license agreement", "\"" + qtDir + "\\" LICENSE_DEST "\"" );
- shell.createShortcut( dirName, common, "Readme", "notepad.exe", "Important information", QString( "\"" ) + qtDir + "\\README\"" );
-#endif
- shell.createShortcut( dirName, common, "Qt Assistant", qtDir + "\\bin\\assistant.exe", "Browse the On-line documentation", "", qtDir );
- shell.createShortcut( dirName, common, "Qt Linguist", qtDir + "\\bin\\linguist.exe", "Qt translation utility", "", qtDir );
- shell.createInternetShortcut( dirName, common, "Trolltech.com", "http://qtsoftware.com/" );
-#if defined(EVAL_CD)
- shell.createInternetShortcut( dirName, common, "Register for Support", "http://qtsoftware.com/products/qt/evaluate.html" );
-#endif
-
- if ( ( ( !globalInformation.reconfig() && optionsPage->skipBuild->isChecked() )
- || ( globalInformation.reconfig() && !configPage->rebuildInstallation->isChecked() ) )
- || qWinVersion() & WV_DOS_based ) {
- QString description;
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- buildQtShortcutText = "Build Qt Examples and Tutorials";
- description = "Build the Qt Examples and Tutorials";
-#else
- buildQtShortcutText = "Build Qt " + globalInformation.qtVersionStr();
- description = "Build the Qt library";
-#endif
- shell.createShortcut( dirName, common,
- buildQtShortcutText,
- QEnvironment::getEnv( "QTDIR" ) + "\\build.bat",
- description );
- }
-
-#if defined(QSA)
- QString qsaExamplesName;
- if( qWinVersion() & WV_DOS_based ) {
- shell.createShortcut( dirName, common,
- "QSA Examples",
- optionsPageQsa->installPath->text() + "\\examples" );
- } else {
- qsaExamplesName = shell.createFolder( foldersPage->folderPath->text() + "\\QSA Examples", common );
- installIcons( qsaExamplesName, optionsPageQsa->installPath->text() + "\\examples", common );
- }
-#endif
- if( optionsPage->installTutorials->isChecked() ) {
- if( qWinVersion() & WV_DOS_based ) {
- shell.createShortcut( dirName, common,
-#if defined(QSA)
- "Qt Tutorials",
-#else
- "Tutorials",
-#endif
- QEnvironment::getEnv( "QTDIR" ) + "\\tutorial" );
- } else {
-#if defined(QSA)
- tutorialsName = shell.createFolder( foldersPage->folderPath->text() + "\\Qt Tutorials", common );
-#else
- tutorialsName = shell.createFolder( foldersPage->folderPath->text() + "\\Tutorials", common );
-#endif
- installIcons( tutorialsName, QEnvironment::getEnv( "QTDIR" ) + "\\tutorial", common );
- }
- }
- if( optionsPage->installExamples->isChecked() ) {
- if( qWinVersion() & WV_DOS_based ) {
- shell.createShortcut( dirName, common,
-#if defined(QSA)
- "Qt Examples",
-#else
- "Examples",
-#endif
- QEnvironment::getEnv( "QTDIR" ) + "\\examples" );
- } else {
-#if defined(QSA)
- examplesName = shell.createFolder( foldersPage->folderPath->text() + "\\Qt Examples", common );
-#else
- examplesName = shell.createFolder( foldersPage->folderPath->text() + "\\Examples", common );
-#endif
- installIcons( examplesName, QEnvironment::getEnv( "QTDIR" ) + "\\examples", common );
- }
- }
-#endif
-#if defined(QSA)
-#endif
- buildPage->compileProgress->setProgress( buildPage->compileProgress->totalSteps() );
- setNextEnabled( buildPage, true );
- logOutput( "The build was successful", true );
-}
-
-void SetupWizardImpl::makeDone()
-{
- makeDone( !make.normalExit() || make.exitStatus() );
-}
-
-void SetupWizardImpl::makeDone( bool error )
-{
- if( error ) {
- if (!backButton()->isEnabled()) {
- logOutput( "The build process failed!\n" );
- emit wizardPageFailed( indexOf(currentPage()) );
- QMessageBox::critical( this, "Error", "The build process failed!\nSee the log for details." );
- buildPage->restartBuild->setText( "Restart compile" );
- backButton()->setEnabled(true);
- }
- setAppropriate( progressPage, false );
-#if defined(QSA)
- } else if ( make.workingDirectory() == QEnvironment::getEnv( "QTDIR" ) ) {
- QStringList args;
- args << globalInformation.text(GlobalInformation::MakeTool);
- args << "sub-examples";
-
- make.setWorkingDirectory( optionsPageQsa->installPath->text() );
- make.setArguments( args );
-
- if( !make.start() ) {
- logOutput( "Could not start make process.\n"
- "Make sure that your compiler tools are installed\n"
- "and registered correctly in your PATH environment." );
- emit wizardPageFailed( indexOf(currentPage()) );
- backButton()->setEnabled( true );
- }
-#endif
- } else {
- // We still have some more items to do in order to finish all the
- // integration stuff.
- if ( !globalInformation.reconfig() ) {
- logOutput( "Doing the final integration steps..." );
- assistantDone();
- } else {
- setNextEnabled( buildPage, true );
- logOutput( "The build was successful", true );
- }
- buildPage->restartBuild->setText( "Success" );
- buildPage->restartBuild->setEnabled( false );
- }
-}
-
-void SetupWizardImpl::configDone()
-{
- QStringList args;
-
- if( globalInformation.reconfig() && !configPage->rebuildInstallation->isChecked() )
- showPage( finishPage );
-
-#if !defined(EVAL) && !defined(EDU) && !defined(NON_COMMERCIAL)
- if( !configure.normalExit() || configure.exitStatus() ) {
- logOutput( "The configure process failed.\n" );
- emit wizardPageFailed( indexOf(currentPage()) );
- buildPage->restartBuild->setText( "Restart configure" );
- setAppropriate( progressPage, false );
- backButton()->setEnabled(true);
- } else
-#endif
- {
- args << globalInformation.text(GlobalInformation::MakeTool);
-#if !defined(EVAL) && !defined(EDU) && !defined(NON_COMMERCIAL)
- args << "sub-src";
- args << "sub-plugins";
- if ( optionsPage ) {
- if ( optionsPage->installTools->isChecked() )
- args << "sub-tools";
- if ( optionsPage->installTutorials->isChecked() )
- args << "sub-tutorial";
- if ( optionsPage->installExamples->isChecked() )
- args << "sub-examples";
- if ( optionsPage->installExtensions->isChecked() )
- args << "sub-extensions";
- } else if (globalInformation.reconfig()) {
- args << "sub-tools"; // We want to make sure it rebuilds uic etc
- }
-#elif defined(Q_OS_WIN32)
- if ( optionsPage ) {
- if ( optionsPage->installTutorials->isChecked() )
- args << "sub-tutorial";
- if ( optionsPage->installExamples->isChecked() )
- args << "sub-examples";
-#if !defined(NON_COMMERCIAL)
- if ( optionsPage->installExtensions->isChecked() )
- args << "sub-extensions";
-#endif
- }
- if ( args.count() == 1 ) {
- make.setWorkingDirectory( QEnvironment::getEnv( "QTDIR" ) );
- makeDone( false );
- return;
- }
-#endif
- if ( globalInformation.sysId() == GlobalInformation::MinGW ) {
- args << "-fMakefile.win32-g++";
- }
-
- make.setWorkingDirectory( QEnvironment::getEnv( "QTDIR" ) );
- make.setArguments( args );
-
- if( !make.start() ) {
- logOutput( "Could not start make process.\n"
- "Make sure that your compiler tools are installed\n"
- "and registered correctly in your PATH environment." );
- emit wizardPageFailed( indexOf(currentPage()) );
- backButton()->setEnabled( true );
- } else {
- buildPage->restartBuild->setText( "Stop compilation" );
- }
- }
-}
-
-void SetupWizardImpl::restartBuild()
-{
- if ( configure.isRunning() ||
- (!configure.isRunning() && (!configure.normalExit() || configure.exitStatus())) ) {
- if ( configure.isRunning() ) { // Stop configure
- configure.kill();
- buildPage->restartBuild->setText( "Restart configure" );
- logOutput( "\n*** Configure stopped by user...\n" );
- backButton()->setEnabled( true );
- } else { // Restart configure
- emit wizardPageShowed( indexOf(currentPage()) );
- backButton()->setEnabled( false );
- cleanDone();
- buildPage->restartBuild->setText( "Stop configure" );
- logOutput( "\n*** Configure restarted by user...\n" );
- }
- } else if ( make.isRunning() ||
- (!make.isRunning() && (!make.normalExit() || make.exitStatus())) ) {
- if ( make.isRunning() ) { // Stop compile
- buildPage->restartBuild->setText( "Restart compile" );
- logOutput( "\n*** Compilation stopped by user...\n" );
- backButton()->setEnabled( true );
- make.kill();
- } else { // Restart compile
- wizardPageShowed( indexOf(currentPage()) );
- backButton()->setEnabled( false );
- configDone();
- buildPage->restartBuild->setText( "Stop compile" );
- logOutput( "\n*** Compilation restarted by user...\n" );
- }
- }
-}
-
-void SetupWizardImpl::saveSettings()
-{
-#if !defined(EVAL) && !defined(EDU) && !defined(NON_COMMERCIAL)
- QApplication::setOverrideCursor( Qt::waitCursor );
- saveSet( configPage->configList );
- saveSet( configPage->advancedList );
- QApplication::restoreOverrideCursor();
-#endif
-}
-
-void SetupWizardImpl::saveSet( QListView* list )
-{
- QSettings settings;
- settings.writeEntry( "/Trolltech/Qt/ResetDefaults", "FALSE" );
-
- QListViewItemIterator it( list );
- while ( it.current() ) {
- QListViewItem *itm = it.current();
- ++it;
- if ( itm->rtti() != CheckListItem::RTTI )
- continue;
- CheckListItem *item = (CheckListItem*)itm;
- if ( item->type() == QCheckListItem::RadioButton ) {
- if ( item->isOn() ) {
- QString folder;
- QListViewItem *pItem = item;
- while ( (pItem = pItem->parent() ) ) {
- if ( folder.isEmpty() )
- folder = pItem->text( 0 );
- else
- folder = pItem->text(0) + "/" + folder;
- }
-
- settings.writeEntry( "/Trolltech/Qt/" + folder, item->text() );
- }
- } else if ( item->type() == QCheckListItem::CheckBox ) {
- QStringList lst;
- QListViewItem *p = item->parent();
- if ( p )
- --it;
- QString c = p->text( 0 );
- while ( ( itm = it.current() ) &&
- itm->rtti() == CheckListItem::RTTI &&
- item->type() == CheckListItem::CheckBox ) {
- item = (CheckListItem*)itm;
- ++it;
- if ( item->isOn() )
- lst << item->text( 0 );
- }
- if ( lst.count() )
- settings.writeEntry( "/Trolltech/Qt/" + p->text(0), lst, ',' );
- else
- settings.writeEntry( "/Trolltech/Qt/" + p->text(0), "Nothing selected" );
- }
- }
-}
-
-void SetupWizardImpl::showPage( QWidget* newPage )
-{
- if ( currentPage() == configPage && newPage == progressPage && !verifyConfig() ) {
- if (QMessageBox::warning( this, "Configuration with Warnings",
- "One or more of the selected options could not be verified by the installer.\n"
- "Do you want to continue?", "Yes", "No" ))
- return;
- }
-
- QWizard::showPage( newPage );
- setInstallStep( indexOf(newPage) + 1 );
-
- if( newPage == licensePage ) {
- showPageLicense();
- } else if( newPage == licenseAgreementPage ) {
- readLicenseAgreement();
- } else if( newPage == licenseAgreementPageQsa ) {
- readLicenseAgreement();
- } else if( newPage == optionsPage ) {
- showPageOptions();
- } else if( newPage == foldersPage ) {
- showPageFolders();
- } else if( newPage == configPage ) {
- showPageConfig();
- } else if( newPage == progressPage ) {
- showPageProgress();
- } else if( newPage == buildPage ) {
- showPageBuild();
- } else if( newPage == finishPage ) {
- showPageFinish();
- }
-}
-
-void SetupWizardImpl::showPageLicense()
-{
- licenseChanged();
-}
-
-void SetupWizardImpl::showPageOptions()
-{
- static bool done = false;
- if (done)
- return;
-
- done = true;
-
- // First make sure that the current license information is saved
- if( !globalInformation.reconfig() )
- writeLicense( QDir::homeDirPath() + "/.qt-license" );
-
- // ### unsupported
- optionsPage->installDocs->hide();
-
- bool enterprise = licenseInfo[ "PRODUCTS" ] == "qt-enterprise";
- optionsPage->installExtensions->setChecked( enterprise );
- optionsPage->installExtensions->setEnabled( enterprise );
-
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- optionsPage->installDocs->setEnabled( false );
- optionsPage->skipBuild->setEnabled( false );
- if ( globalInformation.sysId()==GlobalInformation::Borland ) {
- optionsPage->sysMsvcNet->setEnabled( false );
- optionsPage->sysMsvc->setEnabled( false );
- optionsPage->sysBorland->setEnabled( true );
- optionsPage->sysMinGW->setEnabled( false );
- optionsPage->sysIntel->setEnabled( false );
- optionsPage->sysOther->setEnabled( false );
- } else {
- optionsPage->sysMsvcNet->setEnabled( true );
- optionsPage->sysMsvc->setEnabled( true );
- optionsPage->sysBorland->setEnabled( false );
- optionsPage->sysOther->setEnabled( false );
- optionsPage->sysIntel->setEnabled( false );
- optionsPage->sysMinGW->setEnabled( false );
- }
-# if defined(Q_OS_WIN32)
- optionsPage->installExamples->setEnabled( true );
- optionsPage->installTutorials->setEnabled( true );
- optionsPage->installTools->setEnabled( false );
-# if defined(NON_COMMERCIAL)
- optionsPage->installExtensions->hide();
-# else
- optionsPage->installExtensions->setChecked( true );
- optionsPage->installExtensions->setEnabled( true );
-# endif
-# else
- optionsPage->installExamples->setEnabled( false );
- optionsPage->installTutorials->setEnabled( false );
- optionsPage->installExtensions->setChecked( false );
- optionsPage->installExtensions->setEnabled( false );
-# endif
-#else
-# if defined(Q_OS_WIN32)
- // No need to offer the option of skipping the build on 9x, it's skipped anyway
- if ( qWinVersion() & WV_DOS_based )
- optionsPage->skipBuild->setEnabled( false );
-# endif
-#endif
-
- // trigger environment test
- clickedSystem(globalInformation.sysId());
-}
-
-void SetupWizardImpl::showPageFolders()
-{
- QString ideName = globalInformation.text(GlobalInformation::IDE);
- foldersPage->devSysLabel->setText( ideName + " path");
- foldersPage->devSysLabel->setShown(!ideName.isEmpty());
- foldersPage->devSysPath->setShown(!ideName.isEmpty());
- foldersPage->devSysPathButton->setShown(!ideName.isEmpty());
-#if defined(Q_OS_WIN32)
- if( globalInformation.sysId() == GlobalInformation::MSVC ) {
- QString devPath = QEnvironment::getRegistryString( "Software\\Microsoft\\VisualStudio\\6.0\\Setup\\Microsoft Visual Studio", "ProductDir", QEnvironment::LocalMachine );
- if ( devPath.isEmpty() ) {
- // fallback for Windows 9x
- QDir msdevDir( QEnvironment::getEnv("MSDEVDIR") );
- msdevDir.cdUp();
- msdevDir.cdUp();
- devPath = QDir::toNativeSeparators( msdevDir.absPath() );
- }
- foldersPage->devSysPath->setText( devPath );
- } else if ( globalInformation.sysId() == GlobalInformation::MSVCNET ) {
- QString devPath = QEnvironment::getRegistryString( "Software\\Microsoft\\VisualStudio\\7.1\\Setup\\VS", "ProductDir", QEnvironment::LocalMachine );
- if ( !devPath.length() )
- devPath = QEnvironment::getRegistryString( "Software\\Microsoft\\VisualStudio\\7.0\\Setup\\VS", "ProductDir", QEnvironment::LocalMachine );
- foldersPage->devSysPath->setText( devPath );
- }
-#endif
-}
-
-void SetupWizardImpl::showPageProgress()
-{
- saveSettings();
- int totalSize = 0;
- QFileInfo fi;
- totalRead = 0;
- bool copySuccessful = true;
-
- if( !filesCopied ) {
- createDir( optionsPage->installPath->text() );
- if (optionsPageQsa)
- createDir( optionsPageQsa->installPath->text() );
- progressPage->filesDisplay->append( "Installing files...\n" );
-
- // install the right LICENSE file
- QDir installDir( optionsPage->installPath->text() );
- QFile licenseFile( installDir.filePath( LICENSE_DEST ) );
- if ( licenseFile.open( IO_WriteOnly ) ) {
- ResourceLoader *rcLoader;
-#if defined(EVAL) || defined(EDU)
- rcLoader = new ResourceLoader( "LICENSE" );
-#elif defined(NON_COMMERCIAL)
- if ( licenseAgreementPage->countryCombo->currentItem() == 0 )
- rcLoader = new ResourceLoader( "LICENSE-US" );
- else
- rcLoader = new ResourceLoader( "LICENSE" );
-#else
- if ( usLicense ) {
- rcLoader = new ResourceLoader( "LICENSE-US" );
- } else {
- rcLoader = new ResourceLoader( "LICENSE" );
- }
-#endif
- if ( rcLoader->isValid() ) {
- licenseFile.writeBlock( rcLoader->data() );
- } else {
- emit wizardPageFailed( indexOf(currentPage()) );
- QMessageBox::critical( this, tr("Package corrupted"),
- tr("Could not find the LICENSE file in the package.\nThe package might be corrupted.") );
- }
- delete rcLoader;
- licenseFile.close();
- } else {
- // ### error handling -- we could not write the LICENSE file
- }
-#if defined(QSA)
- QDir installDirQsa( optionsPageQsa->installPath->text() );
- QFile licenseFileQsa( installDirQsa.filePath( LICENSE_DEST ) );
- if ( licenseFileQsa.open( IO_WriteOnly ) ) {
- ResourceLoader *rcLoader;
- rcLoader = new ResourceLoader( "LICENSE_QSA" );
- if ( rcLoader->isValid() ) {
- licenseFileQsa.writeBlock( rcLoader->data() );
- } else {
- emit wizardPageFailed( indexOf(currentPage()) );
- QMessageBox::critical( this, tr("Package corrupted"),
- tr("Could not find the LICENSE file in the package.\nThe package might be corrupted.") );
- }
- delete rcLoader;
- licenseFileQsa.close();
- } else {
- // ### error handling -- we could not write the LICENSE file
- }
-#endif
-
- // Install the files -- use different fallbacks if one method failed.
- QArchive ar;
- QString licenseKey;
-#if !defined(EVAL_CD) && !defined(NON_COMMERCIAL)
- licenseKey = licensePage->key->text();
-#endif
- ar.setVerbosity( QArchive::Destination | QArchive::Verbose | QArchive::Progress );
- connect( &ar, SIGNAL( operationFeedback( const QString& ) ), this, SLOT( archiveMsg( const QString& ) ) );
- connect( &ar, SIGNAL( operationFeedback( int ) ), progressPage->operationProgress, SLOT( setProgress( int ) ) );
- // First, try to find qt.arq as a binary resource to the file.
- ResourceLoader rcLoader( "QT_ARQ", 500 );
- if ( rcLoader.isValid() ) {
- progressPage->operationProgress->setTotalSteps( rcLoader.data().count() );
- QDataStream ds( rcLoader.data(), IO_ReadOnly );
- ar.readArchive( &ds, optionsPage->installPath->text(), licenseKey );
- } else {
- // If the resource could not be loaded or is smaller than 500
- // bytes, we have the dummy qt.arq: try to find and install
- // from qt.arq in the current directory instead.
- QString archiveName = "qt.arq";
-#if defined(Q_OS_MAC)
- QString appDir = qApp->argv()[0];
- int truncpos = appDir.findRev( "/Contents/MacOS/" );
- if (truncpos != -1)
- appDir.truncate( truncpos );
- archiveName = appDir + "/Contents/Qt/qtmac.arq";
-#endif
- fi.setFile( archiveName );
- if( fi.exists() )
- totalSize = fi.size();
- progressPage->operationProgress->setTotalSteps( totalSize );
-
- ar.setPath( archiveName );
- if( ar.open( IO_ReadOnly ) ) {
- ar.readArchive( optionsPage->installPath->text(), licenseKey );
- } else {
- // We were not able to find any qt.arq -- so assume we have
- // the old fashioned zip archive and simply copy the files
- // instead.
- progressPage->operationProgress->setTotalSteps( FILESTOCOPY );
- copySuccessful = copyFiles( QDir::currentDirPath(), optionsPage->installPath->text(), true );
-
- /*These lines are only to be used when changing the filecount estimate
- QString tmp( "%1" );
- tmp = tmp.arg( totalFiles );
- QMessageBox::information( this, tmp, tmp );
- */
- progressPage->operationProgress->setProgress( FILESTOCOPY );
- }
- }
-
-#if defined(QSA)
- QArchive arQsa;
- arQsa.setVerbosity( QArchive::Destination | QArchive::Verbose | QArchive::Progress );
- connect( &arQsa, SIGNAL( operationFeedback( const QString& ) ), this, SLOT( archiveMsg( const QString& ) ) );
- connect( &arQsa, SIGNAL( operationFeedback( int ) ), progressPage->operationProgress, SLOT( setProgress( int ) ) );
- ResourceLoader rcLoaderQsa( "QSA_ARQ", 500 );
- if ( rcLoaderQsa.isValid() ) {
- progressPage->operationProgress->setTotalSteps( rcLoaderQsa.data().count() );
- QDataStream ds( rcLoaderQsa.data(), IO_ReadOnly );
- arQsa.readArchive( &ds, optionsPageQsa->installPath->text(), licenseKey );
- } else {
- // ### error handling
- }
-#endif
- filesCopied = copySuccessful;
-
- timeCounter = 30;
- if( copySuccessful ) {
- QDir installDir( optionsPage->installPath->text() );
-#if defined(Q_OS_WIN32)
- QDir windowsFolderDir( shell.windowsFolderName );
-# if !defined(EVAL) && !defined(EDU) && !defined(NON_COMMERCIAL)
- {
- // move $QTDIR/install.exe to $QTDIR/bin/install.exe
- // This is done because install.exe is also used to reconfigure Qt
- // (and this expects install.exe in bin). We can't move install.exe
- // to bin in first place, since for the snapshots, we don't have
- // the .arq archives.
- QString inFile( installDir.filePath("install.exe") );
- copyFile(inFile, installDir.filePath("bin/install.exe"));
- QFile::remove(inFile);
- }
-# endif
- {
- // move the uninstaller to the Windows directory
- // This is necessary since the uninstaller deletes all files in
- // the installation directory (and therefore can't delete
- // itself).
- QString inFile( installDir.filePath("bin/quninstall.exe") );
- copyFile(inFile, windowsFolderDir.filePath("quninstall.exe"));
- QFile::remove(inFile);
- }
-#endif
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- QStringList::Iterator it;
- QDir lib( optionsPage->installPath->text() );
- lib.cd( "lib" );
-# if !defined(EVAL_CD)
- // patch qt*.dll
-# if !defined(Q_OS_MAC)
- QStringList qtDlls = lib.entryList( "qt*.dll" );
-# else
- QStringList qtDlls = lib.entryList( "libqt-mt-eval.dylib" );
-# endif
- if ( qtDlls.count() == 0 ) {
- copySuccessful = false;
- QMessageBox::critical( this,
- tr( "Error patching Qt library" ),
-# if defined(EVAL)
- tr( "Could not patch the Qt library with the evaluation\n"
- "license information - no Qt DLL was found." )
-# elif defined(EDU)
- tr( "Could not patch the Qt library with the educational\n"
- "edition license information - no Qt DLL was found." )
-# else
- tr( "Could not patch the Qt library the installation\n"
- "path information - no Qt DLL was found." )
-# endif
- );
- }
- for ( it=qtDlls.begin(); it!=qtDlls.end(); ++it ) {
- //### add serial number etc. to log
- logFiles( tr("Patching the Qt library %1.").arg(*it) );
- int ret = trDoIt( lib.absFilePath(*it),
-# if defined(EVAL)
- licensePage->evalName->text().latin1(),
- licensePage->evalCompany->text().latin1(),
- licensePage->serialNumber->text().latin1(),
-# elif defined(EDU)
- "",
- licensePage->university->text().latin1(),
- licensePage->serialNumber->text().latin1(),
-# endif
- installDir.absPath()
- );
- if ( ret != 0 ) {
- copySuccessful = false;
- QMessageBox::critical( this,
- tr( "Error patching Qt library" ),
-# if defined(EVAL)
- tr( "Could not patch the Qt library with the evaluation\n"
- "license information. You will not be able to execute\n"
- "any program linked against %1. Error %2" ).arg( *it ).arg(ret)
-# elif defined(EDU)
- tr( "Could not patch the Qt library with the educational\n"
- "edition license information. You will not be able to\n"
- "execute any program linked against %1." ).arg( *it )
-# else
- tr( "Could not patch the Qt library with the installation\n"
- "path information. You will not be able to execute\n"
- "some programs linked against %1." ).arg( *it )
-# endif
- );
- }
- }
-# endif
-# if !defined(Q_OS_MAC)
- // copy lib/*.dll bin/
- QStringList dlls = lib.entryList( "*.dll" );
- for ( it=dlls.begin(); it!=dlls.end(); ++it ) {
- copyFile( lib.absFilePath(*it), QDir::cleanDirPath(lib.absFilePath("../bin/"+*it)) );
- }
- // delete the non-wanted database drivers
- QDir plugins( optionsPage->installPath->text() );
- plugins.cd( "plugins" );
- plugins.cd( "sqldrivers" );
- QDir bin( optionsPage->installPath->text() );
- bin.cd( "bin" );
-#if defined(NON_COMMERCIAL)
- if ( sqlitePluginInstall && !sqlitePluginInstall->isOn() ) {
- plugins.remove( "qsqlite.dll" );
- }
-#else
- if ( mysqlPluginInstall && !mysqlPluginInstall->isOn() ) {
- plugins.remove( "qsqlmysql.dll" );
- bin.remove( "libmySQL.dll" );
- }
- if ( ociPluginInstall && !ociPluginInstall->isOn() ) {
- plugins.remove( "qsqloci.dll" );
- }
- if ( odbcPluginInstall && !odbcPluginInstall->isOn() ) {
- plugins.remove( "qsqlodbc.dll" );
- }
- if ( psqlPluginInstall && !psqlPluginInstall->isOn() ) {
- plugins.remove( "qsqlpsql.dll" );
- bin.remove( "libpq.dll" );
- }
- if ( tdsPluginInstall && !tdsPluginInstall->isOn() ) {
- plugins.remove( "qsqltds.dll" );
- }
- if ( db2PluginInstall && !db2PluginInstall->isOn() ) {
- plugins.remove( "qsqldb2.dll" );
- }
-#endif
- // patch the .qmake.cache with the correct paths
- QFile cacheFile( installDir.filePath(".qmake.cache") );
- if ( cacheFile.open( IO_ReadOnly | IO_Translate ) ) {
- QTextStream tsIn( &cacheFile );
- QString cache = tsIn.read();
- cacheFile.close();
- if ( cacheFile.open( IO_WriteOnly | IO_Translate ) ) {
- QTextStream tsOut( &cacheFile );
- if ( globalInformation.sysId() == GlobalInformation::Borland )
- tsOut << cache.replace( "C:/QtEvaluation/qtborland", installDir.absPath() );
- else
- tsOut << cache.replace( "C:/QtEvaluation/qtmsvc", installDir.absPath() );
- cacheFile.close();
- }
- }
-# endif
-#endif
- logFiles( tr("All files have been installed.\n"
- "This log has been saved to the installation directory.\n"
- "The build will start automatically in 30 seconds."), true );
- } else {
- logFiles( tr("One or more errors occurred during file installation.\n"
- "Please review the log and try to amend the situation.\n"), true );
- }
- }
- if ( copySuccessful ) {
-#if defined(Q_OS_WIN32)
- /*
- ** Then record the installation in the registry, and set up the uninstallation
- */
- QStringList uninstaller;
- uninstaller << ( QString("\"") + shell.windowsFolderName + "\\quninstall.exe" + QString("\"") );
- uninstaller << optionsPage->installPath->text();
-
- if( foldersPage->folderGroups->currentItem() == 0 )
- uninstaller << ( QString("\"") + shell.commonProgramsFolderName + QString("\\") + foldersPage->folderPath->text() + QString("\"") );
- else
- uninstaller << ( QString("\"") + shell.localProgramsFolderName + QString("\\") + foldersPage->folderPath->text() + QString("\"") );
-
- uninstaller << ( QString("\"") + globalInformation.qtVersionStr() + QString("\"") );
-
- QEnvironment::recordUninstall( QString( "Qt " ) + globalInformation.qtVersionStr(), uninstaller.join( " " ) );
-#endif
- autoContTimer.start( 1000 );
- }
- else
- emit wizardPageFailed( indexOf(currentPage()) );
- setNextEnabled( progressPage, copySuccessful );
-}
-
-void SetupWizardImpl::showPageFinish()
-{
- autoContTimer.stop();
- nextButton()->setText( "Next >" );
- QString finishMsg;
- if ( ( ( !globalInformation.reconfig() && !optionsPage->skipBuild->isChecked() )
- || ( globalInformation.reconfig() && configPage->rebuildInstallation->isChecked() ) )
-#if defined(Q_OS_WIN32)
- && qWinVersion() & WV_NT_based ) {
-#else
- ) {
-#endif
- if( globalInformation.reconfig() ) {
- finishMsg = "Qt has been reconfigured and rebuilt, and is ready for use.";
- } else {
-#if defined(Q_OS_MAC)
- finishMsg = QString( "Qt has been installed to " ) + optionsPage->installPath->text() +
- " and is ready to use.\n\nPlease try out the developer tools in the bin folder and example "
- "programs in the examples folder.\n\nFor further information please consult the "
- "README.txt file included in the installation folder.";
-#else
- finishMsg = QString( "Qt has been installed to %1 and is ready to use.\n"
- "You might have to logoff and logon for changes to the environment to have an effect.").
- arg(optionsPage->installPath->text());
-# if defined(QSA)
- finishMsg = QString( "\nQSA has been installed to " ) + optionsPageQsa->installPath->text() + " and is ready to use.";
-# endif
-#endif
- }
- } else {
- if( globalInformation.reconfig() ) {
- finishMsg = "The new configuration has been written.\nThe library needs to be rebuilt to activate the ";
- finishMsg += "new configuration.";
-#if defined(Q_OS_WIN32)
- finishMsg += "To rebuild it, use the \"Build Qt ";
- finishMsg += globalInformation.qtVersionStr();
- finishMsg += "\" icon in the Qt program group in the start menu.";
-#endif
- } else {
- finishMsg = QString( "The Qt files have been installed to " ) + optionsPage->installPath->text() + " and is ready to be compiled.\n";
-#if defined(Q_OS_WIN32)
- if( persistentEnv && qWinVersion() & WV_DOS_based ) {
- finishMsg += "The environment variables needed to use Qt have been recorded into your AUTOEXEC.BAT file.\n";
- finishMsg += "Please review this file, and take action as appropriate depending on your operating system to get them into the persistent environment. (Windows Me users, run MsConfig)\n\n";
- }
-# if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- finishMsg += QString( "To build the examples and tutorials, use the "
- "\"Build the Qt Examples and Tutorials\""
- " icon which has been installed into your Start-Menu." );
-# else
- finishMsg += QString( "To build Qt, use the "
- "\"Build Qt " ) + globalInformation.qtVersionStr() + "\""
- " icon which has been installed into your Start-Menu.";
-# endif
-#endif
- }
- }
-#if defined(EVAL_CD)
- finishMsg += "\n\n"
- "The Trolltech technical support service is available to "
- "Qt Professional and Enterprise Edition licensees. As an "
- "evaluation user, you can register for 30 days of evaluation "
- "support at\n"
- "http://qtsoftware.com/products/qt/evaluate.html";
-#endif
- finishPage->finishText->setText( finishMsg );
-}
-
-void SetupWizardImpl::licenseChanged()
-{
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- int ret = trCheckIt(
-# if defined(EVAL)
- licensePage->evalName->text().latin1(),
- licensePage->evalCompany->text().latin1(),
- licensePage->serialNumber->text().latin1()
-# elif defined(EDU)
- "",
- licensePage->university->text().latin1(),
- licensePage->serialNumber->text().latin1()
-# else
- "",
- "",
- ""
-# endif
- );
-
- if ( ret == 0 )
- setNextEnabled( licensePage, true );
- else
- setNextEnabled( licensePage, false );
- return;
-#else
- QDate date;
- uint features;
- uint testFeature;
- QString platformString;
- QString licenseKey = licensePage->key->text().stripWhiteSpace();
- if ( licenseKey.length() != 14 ) {
- goto rejectLicense;
- }
- features = featuresForKey( licenseKey.upper() );
- date = decodedExpiryDate( licenseKey.mid(9) );
- if ( !date.isValid() ) {
- goto rejectLicense;
- }
-# if defined(Q_OS_MAC)
- testFeature = Feature_Mac;
- platformString = "Mac OS X";
-# elif defined(Q_OS_WIN32)
- testFeature = Feature_Windows;
- platformString = "Windows";
-# else
- testFeature = Feature_Unix;
- platformString = "UNIX";
-# ifdef Q_CC_GNU
-# warning "What about Qtopia Core?"
-# endif
-# endif
- if ( !(features&testFeature) && currentPage() == licensePage ) {
- if ( features & (Feature_Unix|Feature_Windows|Feature_Mac|Feature_Embedded) ) {
- int ret = QMessageBox::information( this,
- tr("No %1 license").arg(platformString),
- tr("You are not licensed for the %1 platform.\n"
- "Please contact sales@trolltech.com to upgrade\n"
- "your license to include the Windows platform.").arg(platformString),
- tr("Try again"),
- tr("Abort installation")
- );
- if ( ret == 1 ) {
- QApplication::exit();
- } else {
- licensePage->key->setText( "" );
- }
- }
- goto rejectLicense;
- }
- if ( date < QDate::currentDate() && currentPage() == licensePage ) {
- static bool alreadyShown = false;
- if ( !alreadyShown ) {
- QMessageBox::warning( this,
- tr("Support and upgrade period has expired"),
- tr("Your support and upgrade period has expired.\n"
- "\n"
- "You may continue to use your last licensed release\n"
- "of Qt under the terms of your existing license\n"
- "agreement. But you are not entitled to technical\n"
- "support, nor are you entitled to use any more recent\n"
- "Qt releases.\n"
- "\n"
- "Please contact sales@trolltech.com to renew your\n"
- "support and upgrades for this license.")
- );
- alreadyShown = true;
- }
- }
- if ( features & Feature_US )
- usLicense = true;
- else
- usLicense = false;
-
- licensePage->expiryDate->setText( date.toString( Qt::ISODate ) );
- if( features & Feature_Enterprise ) {
- licensePage->productsString->setCurrentItem( 1 );
- emit editionString( "Enterprise Edition" );
- } else {
- licensePage->productsString->setCurrentItem( 0 );
- emit editionString( "Professional Edition" );
- }
- setNextEnabled( licensePage, true );
- return;
-
-rejectLicense:
- licensePage->expiryDate->setText( "" );
-# if defined(Q_OS_WIN32)
- //TODO: Is this a bug? It bus errors on MACX, ask rms.
- // it should work -- if it doesn't this seems to be a bug in the MACX code,
- // I guess (rms)
- licensePage->productsString->setCurrentItem( -1 );
-# endif
- emit editionString( "" );
- setNextEnabled( licensePage, false );
- return;
-#endif
-}
-
-void SetupWizardImpl::logFiles( const QString& entry, bool close )
-{
- if( !fileLog.isOpen() ) {
- fileLog.setName( optionsPage->installPath->text() + QDir::separator() + "install.log" );
- if( !fileLog.open( IO_WriteOnly | IO_Translate ) )
- return;
- }
-
-#if 1
- progressPage->filesDisplay->append(entry);
-#else
- progressPage->filesDisplay->setText( "Installing files...\n" + entry + "\n" );
-#endif
-
- static QTextStream outstream;
- outstream.setDevice( &fileLog );
- outstream << ( entry + "\n" );
-
- if( close )
- fileLog.close();
-}
-
-void SetupWizardImpl::logOutput( const QString& entry, bool close )
-{
- if( !outputLog.isOpen() ) {
- QDir installDir;
- if ( optionsPage )
- installDir.setPath( optionsPage->installPath->text() );
- else
- installDir.setPath( QEnvironment::getEnv( "QTDIR" ) );
- outputLog.setName( installDir.filePath("build.log") );
- if( !outputLog.open( IO_WriteOnly | IO_Translate ) )
- return;
- }
-
- buildPage->outputDisplay->append(entry);
-
- static QTextStream outstream;
- outstream.setDevice( &outputLog );
- outstream << ( entry + "\n" );
-
- if( close )
- outputLog.close();
-}
-
-void SetupWizardImpl::archiveMsg( const QString& msg )
-{
- if( msg.right( 7 ) == ".cpp..." || msg.right( 5 ) == ".c..." || msg.right( 7 ) == ".pro..." || msg.right( 6 ) == ".ui..." )
- filesToCompile++;
- qApp->processEvents();
- if ( msg.startsWith("Expanding") )
- // only show the "Expanding" entries to avoid flickering
- logFiles( msg );
-}
-
-#ifdef Q_WS_WIN
-static HANDLE createFile( const QString &entryName, DWORD attr1, DWORD attr2 )
-{
- QT_WA({
- return ::CreateFileW( entryName.ucs2(), attr1, attr2, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
- }, {
- return ::CreateFileA( entryName.local8Bit(), attr1, attr2, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL );
- })
-}
-#endif
-
-bool SetupWizardImpl::copyFiles( const QString& sourcePath, const QString& destPath, bool topLevel )
-{
- QDir dir( sourcePath );
- const QFileInfoList* list = dir.entryInfoList();
- QFileInfoListIterator it( *list );
- QFileInfo* fi;
- bool doCopy;
-
- while( ( fi = it.current() ) ) {
- if( fi->fileName()[ 0 ] != '.' ) {
- QString entryName = sourcePath + QDir::separator() + fi->fileName();
- QString targetName = destPath + QDir::separator() + fi->fileName();
- doCopy = true;
- if( fi->isDir() ) {
- if( !dir.exists( targetName ) )
- createDir( targetName );
- if( topLevel ) {
- if ( fi->fileName() == "doc" )
- doCopy = optionsPage->installDocs->isChecked();
- else if ( fi->fileName() == "tools" )
- doCopy = optionsPage->installTools->isChecked();
- else if ( fi->fileName() == "tutorial" )
- doCopy = optionsPage->installTutorials->isChecked();
- else if ( fi->fileName() == "examples" )
- doCopy = optionsPage->installExamples->isChecked();
- }
- if( doCopy )
- if( !copyFiles( entryName, targetName, false ) )
- return false;
- } else {
- if( qApp && isShown() ) {
- qApp->processEvents();
- progressPage->operationProgress->setProgress( totalFiles );
- logFiles( targetName );
- } else {
- return false;
- }
- if( entryName.right( 4 ) == ".cpp" ||
- entryName.right( 2 ) == ".c" ||
- entryName.right( 4 ) == ".pro" ||
- entryName.right( 3 ) == ".ui" )
- filesToCompile++;
- bool res = true;
- if ( !QFile::exists( targetName ) )
- res = copyFile( entryName, targetName );
-#if defined(Q_OS_WIN32)
- if ( res ) {
- totalFiles++;
- HANDLE inFile, outFile;
- if( inFile = createFile( entryName, GENERIC_READ, FILE_SHARE_READ ) ){
- if( outFile = createFile( targetName, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE ) ){
- FILETIME createTime, accessTime, writeTime;
- ::GetFileTime( inFile, &createTime, &accessTime, &writeTime );
- ::SetFileTime( outFile, &createTime, &accessTime, &writeTime );
- ::CloseHandle( outFile );
- }
- ::CloseHandle( inFile );
- }
- } else {
- QString error = QEnvironment::getLastError();
- logFiles( QString( " ERROR: " ) + error + "\n" );
- if( QMessageBox::warning( this, "File copy error", entryName + ": " + error, "Continue", "Cancel", QString(), 0 ) )
- return false;
- }
-#elif defined( Q_OS_UNIX )
- // ### TODO: keep file date the same, handle errors
-#endif
- }
- }
- ++it;
- }
- return true;
-}
-
-void SetupWizardImpl::setInstallStep( int step )
-{
- QString captionTxt;
-#if defined(QSA)
- captionTxt = tr("QSA Evaluation Version Installation Wizard");
-#elif defined(EVAL)
- captionTxt = tr("Qt Evaluation Version Installation Wizard");
-#elif defined(EDU)
- captionTxt = tr("Qt Educational Edition Installation Wizard");
-#elif defined(NON_COMMERCIAL)
- captionTxt = tr("Qt Non-Commercial Edition Installation Wizard");
-#else
- if( globalInformation.reconfig() )
- captionTxt = tr("Qt Configuration Wizard");
- else
- captionTxt = tr("Qt Installation Wizard");
-#endif
- setCaption( tr("%1 - Step %2 of %3").arg( captionTxt ).arg( step ).arg( pageCount() ) );
- emit wizardPageShowed( step-1 );
-}
-
-void SetupWizardImpl::timerFired()
-{
- QString tmp( "Next %1 >" );
-
- timeCounter--;
-
- if( timeCounter )
- nextButton()->setText( tmp.arg( timeCounter ) );
- else {
- next();
- autoContTimer.stop();
- }
-}
-
-void SetupWizardImpl::readLicense( QString filePath)
-{
-#if !defined(EVAL) && !defined(EDU) && !defined(NON_COMMERCIAL)
- QFile licenseFile( filePath );
-
- if( licenseFile.open( IO_ReadOnly ) ) {
- QString buffer;
-
- while( licenseFile.readLine( buffer, 1024 ) != -1 ) {
- if( buffer[ 0 ] != '#' ) {
- QStringList components = QStringList::split( '=', buffer );
- QStringList::Iterator it = components.begin();
- QString keyString = (*it++).stripWhiteSpace().replace( QRegExp( QString( "\"" ) ), QString() ).upper();
- QString value = (*it++).stripWhiteSpace().replace( QRegExp( QString( "\"" ) ), QString() );
-
- licenseInfo[ keyString ] = value;
- }
- }
- licenseFile.close();
-
- if ( licensePage ) {
- licensePage->customerID->setText( licenseInfo[ "CUSTOMERID" ] );
- licensePage->licenseID->setText( licenseInfo[ "LICENSEID" ] );
- licensePage->licenseeName->setText( licenseInfo[ "LICENSEE" ] );
- if( licenseInfo[ "PRODUCTS" ] == "qt-enterprise" ) {
- licensePage->productsString->setCurrentItem( 1 );
- emit editionString( "Enterprise Edition" );
- } else {
- licensePage->productsString->setCurrentItem( 0 );
- emit editionString( "Professional Edition" );
- }
- licensePage->expiryDate->setText( licenseInfo[ "EXPIRYDATE" ] );
- licensePage->key->setText( licenseInfo[ "LICENSEKEY" ] );
- }
- }
-#endif
-}
-
-void SetupWizardImpl::writeLicense( QString filePath )
-{
-#if !defined(EVAL) && !defined(EDU) && !defined(NON_COMMERCIAL)
- QFile licenseFile( filePath );
-
- if( licenseFile.open( IO_WriteOnly | IO_Translate ) ) {
- QTextStream licStream( &licenseFile );
-
- licenseInfo[ "CUSTOMERID" ] = licensePage->customerID->text();
- licenseInfo[ "LICENSEID" ] = licensePage->licenseID->text();
- licenseInfo[ "LICENSEE" ] = licensePage->licenseeName->text();
- if( licensePage->productsString->currentItem() == 0 ) {
- licenseInfo[ "PRODUCTS" ] = "qt-professional";
- emit editionString( "Professional Edition" );
- } else {
- licenseInfo[ "PRODUCTS" ] = "qt-enterprise";
- emit editionString( "Enterprise Edition" );
- }
-
- licenseInfo[ "EXPIRYDATE" ] = licensePage->expiryDate->text();
- licenseInfo[ "LICENSEKEY" ] = licensePage->key->text();
-
- licStream << "# Toolkit license file" << endl;
- licStream << "CustomerID=\"" << licenseInfo[ "CUSTOMERID" ].latin1() << "\"" << endl;
- licStream << "LicenseID=\"" << licenseInfo[ "LICENSEID" ].latin1() << "\"" << endl;
- licStream << "Licensee=\"" << licenseInfo[ "LICENSEE" ].latin1() << "\"" << endl;
- licStream << "Products=\"" << licenseInfo[ "PRODUCTS" ].latin1() << "\"" << endl;
- licStream << "ExpiryDate=" << licenseInfo[ "EXPIRYDATE" ].latin1() << endl;
- licStream << "LicenseKey=" << licenseInfo[ "LICENSEKEY" ].latin1() << endl;
-
- licenseFile.close();
- }
-#endif
-}
-
-void SetupWizardImpl::clickedLicenseFile()
-{
- QString licensePath = QFileDialog::getOpenFileName( optionsPage->installPath->text(), QString(), this, NULL, "Browse for license file" );
-
- if( !licensePath.isEmpty() )
- readLicense( licensePath );
-
-}
-
-void SetupWizardImpl::readLicenseAgreement()
-{
- // Intropage
- ResourceLoader *rcLoader;
-#if defined(QSA)
- LicenseAgreementPageImpl *lap;
- if ( currentPage() == licenseAgreementPageQsa ) {
- lap = licenseAgreementPageQsa;
- rcLoader = new ResourceLoader( "LICENSE_QSA" );
- } else {
- lap = licenseAgreementPage;
- rcLoader = new ResourceLoader( "LICENSE" );
- }
-#elif defined(EVAL) || defined(EDU)
- LicenseAgreementPageImpl *lap = licenseAgreementPage;
- rcLoader = new ResourceLoader( "LICENSE" );
-#elif defined(NON_COMMERCIAL)
- LicenseAgreementPageImpl *lap = licenseAgreementPage;
- if ( lap->countryCombo->currentItem() == 0 )
- rcLoader = new ResourceLoader( "LICENSE-US" );
- else
- rcLoader = new ResourceLoader( "LICENSE" );
-#else
- LicenseAgreementPageImpl *lap = licenseAgreementPage;
- if ( usLicense ) {
- rcLoader = new ResourceLoader( "LICENSE-US" );
- } else {
- rcLoader = new ResourceLoader( "LICENSE" );
- }
-#endif
- if ( rcLoader->isValid() ) {
- lap->introText->setText( rcLoader->data() );
- lap->acceptLicense->setEnabled( true );
- } else {
- emit wizardPageFailed( indexOf(currentPage()) );
- QMessageBox::critical( this, tr("Package corrupted"),
- tr("Could not find the LICENSE file in the package.\nThe package might be corrupted.") );
- lap->acceptLicense->setEnabled( false );
- }
- delete rcLoader;
-}
-
-void SetupWizardImpl::accept()
-{
-#if defined(Q_OS_WIN32)
- if ( finishPage->showReadmeCheck->isChecked() ) {
- QProcess proc( QString("notepad.exe") );
-#if defined(QSA)
- QString qsaDir = optionsPageQsa->installPath->text();
- proc.addArgument( qsaDir + "\\README" );
-#else
- QString qtDir = QEnvironment::getEnv( "QTDIR" );
- proc.addArgument( qtDir + "\\README" );
-#endif
- proc.start();
- }
-#endif
- QDialog::accept();
-}
diff --git a/util/install/win/setupwizardimpl.h b/util/install/win/setupwizardimpl.h
deleted file mode 100644
index 1c86f74..0000000
--- a/util/install/win/setupwizardimpl.h
+++ /dev/null
@@ -1,276 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef SETUPWIZARDIMPL_H
-#define SETUPWIZARDIMPL_H
-
-#include "pages/pages.h"
-#include "shell.h"
-
-#include <qprocess.h>
-#include <qtimer.h>
-#include <qmap.h>
-#include <qptrdict.h>
-#include <qwizard.h>
-#include <qlistview.h>
-
-class QCheckListItem;
-class QListView;
-
-class CheckListItem : public QCheckListItem
-{
-public:
- CheckListItem(QListView *listview, const QString &text, Type = RadioButtonController);
- CheckListItem(QCheckListItem *parent, const QString &text, Type = RadioButtonController);
-
- void setHelpText(const QString &help, QTextView *display);
- void setWarningText(const QString &warning, CheckListItem *conflict = 0);
- void addRequiredFiles(const QString &file);
- void setRequiredFileLocation(const QString &location);
-
- void setOpen(bool on);
- void setOn(bool on);
- void setCritical(bool on);
-
- int rtti() const;
- static int RTTI;
-
- void displayHelp();
- bool verify() const;
-
- void paintCell( QPainter *, const QColorGroup & cg, int column, int width, int alignment );
-
-protected:
- bool testAndWarn();
- void activate();
-
-private:
- QString help_text;
- QString warning_text;
- QTextView *help_display;
- QStringList required_files;
- QString file_location;
- CheckListItem *conflict_with;
- bool critical;
-};
-
-class SetupWizardImpl : public QWizard
-{
- Q_OBJECT
-public:
- SetupWizardImpl( QWidget* parent = 0, const char* name = NULL, bool modal = false, WindowFlags f = 0 );
-
- void showPage( QWidget* );
- void stopProcesses();
-
- void optionClicked( CheckListItem * );
-
-signals:
- void wizardPages( const QPtrList<Page>& );
- void wizardPageShowed( int );
- void wizardPageFailed( int );
- void editionString( const QString& );
-
-private:
- int totalFiles;
- QProcess configure;
- QProcess make;
- QProcess cleaner;
-#if defined(QSA)
- QProcess assistant;
-#endif
-
- QString programsFolder;
- QString devSysFolder;
- QString tmpPath;
-
- WinShell shell;
-
- void saveSettings();
- void saveSet( QListView* list );
-
-protected slots:
- void accept(); // reimplemented from QDialog
-
-private slots:
- void clickedSystem( int );
- void sysOtherComboChanged( int );
- void clickedFolderPath();
- void clickedDevSysPath();
- void clickedLicenseFile();
- void cleanDone();
- void configDone();
- void makeDone();
- void assistantDone();
- void restartBuild();
- void readConfigureOutput();
- void readConfigureError();
- void readCleanerOutput();
- void readCleanerError();
- void readMakeOutput();
- void readMakeError();
- void readAssistantOutput();
- void readAssistantError();
- void timerFired();
- void configPageChanged();
- void archiveMsg(const QString &);
- void licenseChanged();
- bool verifyConfig();
-
-private:
- void showPageLicense();
- void showPageOptions();
- void showPageFolders();
- void showPageConfig();
- void showPageProgress();
- void showPageBuild();
- void showPageFinish();
-
- void initPages();
- void initConnections();
-
- void fixEnvironment(const QString &var, const QString &file = QString());
- void prepareEnvironment();
-
- void makeDone( bool error );
-
- void setStaticEnabled( bool se );
- void setJpegDirect( bool jd );
- void readLicenseAgreement();
-
- bool copyFiles( const QString& sourcePath, const QString& destPath, bool topLevel );
- int totalRead;
-
- QString buildQtShortcutText;
- bool fixedPath;
- bool filesCopied;
- bool persistentEnv;
- int filesToCompile;
- int filesCompiled;
-#if !defined(EVAL) && !defined(EDU) && !defined(NON_COMMERCIAL)
- bool usLicense;
-#endif
-
- QString currentOLine;
- QString currentELine;
-
- void updateDisplay(const QString &input, QString &output);
-#if defined(Q_OS_WIN32)
- void installIcons( const QString& iconFolder, const QString& dirName, bool common );
-#endif
- void doIDEIntegration();
- void doStartMenuIntegration();
- void logFiles( const QString& entry, bool close = false );
- void logOutput( const QString& entry, bool close = false );
-
- void setInstallStep( int step );
- void readLicense( QString filePath );
- void writeLicense( QString filePath );
-
- QFile fileLog;
- QFile outputLog;
- QMap<QString,QString> licenseInfo;
- QTimer autoContTimer;
- int timeCounter;
- QStringList allModules;
-
- CheckListItem *accOn, *accOff;
- CheckListItem *bigCodecsOn, *bigCodecsOff;
- CheckListItem *tabletOn, *tabletOff;
- CheckListItem *advancedSTL, *advancedExceptions, *advancedRTTI;
-
- CheckListItem /* *mngPresent, */ *mngDirect, *mngPlugin, *mngOff;
- CheckListItem /* *jpegPresent, */ *jpegDirect, *jpegPlugin, *jpegOff;
- CheckListItem /* *pngPresent, */ *pngDirect, *pngPlugin, *pngOff;
- CheckListItem *gifDirect, *gifOff;
-
- CheckListItem *sgiDirect, *sgiPlugin, *sgiOff;
- CheckListItem *cdeDirect, *cdePlugin, *cdeOff;
- CheckListItem *motifplusDirect, *motifplusPlugin, *motifplusOff;
- CheckListItem *platinumDirect, *platinumPlugin, *platinumOff;
- CheckListItem *motifDirect, *motifPlugin, *motifOff;
- CheckListItem *xpDirect, *xpPlugin, *xpOff;
-
- CheckListItem *mysqlDirect, *mysqlPlugin, *mysqlOff;
- CheckListItem *ociDirect, *ociPlugin, *ociOff;
- CheckListItem *odbcDirect, *odbcPlugin, *odbcOff;
- CheckListItem *psqlDirect, *psqlPlugin, *psqlOff;
- CheckListItem *tdsDirect, *tdsPlugin, *tdsOff;
- CheckListItem *db2Direct, *db2Plugin, *db2Off;
- CheckListItem *sqliteDirect, *sqlitePlugin, *sqliteOff;
- CheckListItem *ibaseDirect, *ibasePlugin, *ibaseOff;
-
- CheckListItem *zlibDirect, *zlibSystem, *zlibOff;
-
- CheckListItem *dspOff, *dspOn;
- CheckListItem *vcprojOff, *vcprojOn;
-
- CheckListItem *staticItem;
-
-#if defined(EVAL) || defined(EDU)
- CheckListItem *mysqlPluginInstall;
- CheckListItem *ociPluginInstall;
- CheckListItem *odbcPluginInstall;
- CheckListItem *psqlPluginInstall;
- CheckListItem *tdsPluginInstall;
- CheckListItem *db2PluginInstall;
- CheckListItem *sqlitePluginInstall;
- CheckListItem *ibasePluginInstall;
-#elif defined(NON_COMMERCIAL)
- CheckListItem *sqlitePluginInstall;
-#endif
-
- // wizard pages
- LicenseAgreementPageImpl *licenseAgreementPage;
- LicenseAgreementPageImpl *licenseAgreementPageQsa;
- LicensePageImpl *licensePage;
- OptionsPageImpl *optionsPage;
- OptionsPageImpl *optionsPageQsa;
- FoldersPageImpl *foldersPage;
- ConfigPageImpl *configPage;
- ProgressPageImpl *progressPage;
- BuildPageImpl *buildPage;
- FinishPageImpl *finishPage;
-#if defined(Q_OS_WIN32)
- WinIntroPageImpl *winIntroPage;
-#endif
-};
-
-#endif
diff --git a/util/install/win/setupwizardimpl_config.cpp b/util/install/win/setupwizardimpl_config.cpp
deleted file mode 100644
index a5959fb..0000000
--- a/util/install/win/setupwizardimpl_config.cpp
+++ /dev/null
@@ -1,1564 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "setupwizardimpl.h"
-#include "environment.h"
-#include <qfiledialog.h>
-#include <qlineedit.h>
-#include <qlabel.h>
-#include <qprogressbar.h>
-#include <qtextview.h>
-#include <qmultilineedit.h>
-#include <qbuttongroup.h>
-#include <qsettings.h>
-#include <qlistview.h>
-#include <qlistbox.h>
-#include <qapplication.h>
-#include <qcheckbox.h>
-#include <qtextstream.h>
-#include <qpushbutton.h>
-#include <qcombobox.h>
-#include <qmessagebox.h>
-#include <qregexp.h>
-#include <qtabwidget.h>
-#include <qarchive.h>
-#include <qvalidator.h>
-#include <qdatetime.h>
-#include <qpainter.h>
-
-bool findFile(const QString &);
-
-CheckListItem::CheckListItem(QListView *listview, const QString &text, Type type)
-: QCheckListItem(listview, text, type), help_display(0), conflict_with(0), critical(false)
-{
- if (type == RadioButtonController || type == CheckBoxController)
- setOpen(true);
-}
-
-CheckListItem::CheckListItem(QCheckListItem *parent, const QString &text, Type type)
-: QCheckListItem(parent, text, type), help_display(0), conflict_with(0), critical(false)
-{
- if (type == RadioButtonController || type == CheckBoxController)
- setOpen(true);
-}
-
-int CheckListItem::RTTI = 666;
-
-int CheckListItem::rtti() const
-{
- return RTTI;
-}
-
-void CheckListItem::setHelpText(const QString &help, QTextView *display)
-{
- help_text = help;
- help_display = display;
-}
-
-void CheckListItem::setWarningText(const QString &warning, CheckListItem *conflict)
-{
- conflict_with = conflict;
- warning_text = warning;
-}
-
-void CheckListItem::addRequiredFiles(const QString &file)
-{
- QStringList files = QStringList::split(",", file);
- for (QStringList::ConstIterator it = files.begin(); it != files.end(); ++it) {
- QString f(*it);
- required_files << f;
- if (!findFile(f)) {
- if (type() == QCheckListItem::RadioButtonController
- || type() == QCheckListItem::CheckBoxController) {
- setOpen(false);
- } else {
- setOn(false);
- setEnabled(false);
- }
- }
- }
-}
-
-void CheckListItem::setRequiredFileLocation(const QString &location)
-{
- file_location = location;
-}
-
-bool CheckListItem::verify() const
-{
- if (text(0) == "Off")
- return true;
-
- if (!required_files.count()) {
- if (parent() && parent()->rtti() == RTTI)
- return ((CheckListItem*)parent())->verify();
- return true;
- }
-
- QStringList::ConstIterator it;
- for (it = required_files.begin(); it != required_files.end(); ++it) {
- QString file(*it);
- if (!findFile(file))
- return false;
- }
- return true;
-}
-
-bool CheckListItem::testAndWarn()
-{
- if (!warning_text.isEmpty()) {
- if (!conflict_with || conflict_with->isOn()) {
- int r = QMessageBox::warning(listView()->window(), "Warning",
- warning_text + "<br>Select anyway?", "Yes", "No" );
- return r == 0;
- } else {
- return true;
- }
- }
-
- QStringList files(required_files);
- if (!required_files.count() && text(0) != "Off") {
- if (parent() && parent()->rtti() == RTTI)
- return ((CheckListItem*)parent())->testAndWarn();
- return true;
- }
-
- if (!verify()) {
- QString message = QString("<p>The option '%1' is <b>not verified</b> by the installer. One or more of the following "
- "files could not be located on the system:"
- "<p>%2"
- "<p>Continuing with this option selected might <b>break the installation</b> process.")
- .arg(text(0)).arg(required_files.join(", "));
- if (!file_location.isEmpty()) {
- message += QString("<p>The requested files are %1 and need to be installed "
- "in the INCLUDE, PATH and LIBS environment as appropriate.").arg(file_location);
- }
-
- int r = QMessageBox::warning(listView()->window(), "Option not Verified",
- message + "<p>Select anyway?", "Yes", "No" );
- return r == 0;
- }
- return true;
-}
-
-void CheckListItem::displayHelp()
-{
- if (help_display) {
- help_display->setText(help_text);
- return;
- }
- QListViewItem *p = parent();
- if (p && p->rtti() == RTTI)
- ((CheckListItem*)p)->displayHelp();
-}
-
-void CheckListItem::setOn(bool on)
-{
- if (on && (type() == RadioButton || type() == CheckBox) && !testAndWarn())
- return;
- QCheckListItem::setOn(on);
-
- SetupWizardImpl* wizard = qobject_cast<SetupWizardImpl*>(listView()->window());
- if (wizard && listView()->isVisible() && listView()->updatesEnabled())
- wizard->optionClicked(this);
-}
-
-void CheckListItem::activate()
-{
- displayHelp();
- QCheckListItem::activate();
-}
-
-void CheckListItem::setOpen(bool on)
-{
- if (on && listView()->isVisible()) {
- if (!testAndWarn())
- return;
- displayHelp();
- }
- QCheckListItem::setOpen(on);
-}
-
-void CheckListItem::setCritical(bool on)
-{
- if (critical == on)
- return;
-
- critical = on;
- repaint();
-}
-
-void CheckListItem::paintCell( QPainter *p, const QColorGroup & cg, int column, int width, int alignment )
-{
- QColorGroup group(cg);
- if (critical)
- group.setColor(QColorGroup::Text, red);
- QCheckListItem::paintCell(p, group, column, width, alignment);
-}
-
-
-
-void SetupWizardImpl::setStaticEnabled( bool se )
-{
- bool enterprise = licenseInfo[ "PRODUCTS" ] == "qt-enterprise";
- if ( se ) {
- if ( accOn->isOn() ) {
- accOn->setOn( false );
- accOff->setOn( true );
- }
- if ( bigCodecsOff->isOn() ) {
- bigCodecsOn->setOn( true );
- bigCodecsOff->setOn( false );
- }
- if ( mngPlugin->isOn() ) {
- mngDirect->setOn( true );
- mngPlugin->setOn( false );
- mngOff->setOn( false );
- }
- if ( pngPlugin->isOn() ) {
- pngDirect->setOn( true );
- pngPlugin->setOn( false );
- pngOff->setOn( false );
- }
- if ( jpegPlugin->isOn() ) {
- jpegDirect->setOn( true );
- jpegPlugin->setOn( false );
- jpegOff->setOn( false );
- }
- if ( sgiPlugin->isOn() ) {
- sgiPlugin->setOn( false );
- sgiDirect->setOn( true );
- }
- if ( cdePlugin->isOn() ) {
- cdePlugin->setOn( false );
- cdeDirect->setOn( true );
- }
- if ( motifplusPlugin->isOn() ) {
- motifplusPlugin->setOn( false );
- motifplusDirect->setOn( true );
- }
- if ( motifPlugin->isOn() ) {
- motifPlugin->setOn( false );
- motifDirect->setOn( true );
- }
- if ( platinumPlugin->isOn() ) {
- platinumPlugin->setOn( false );
- platinumDirect->setOn( true );
- }
- if ( xpPlugin->isOn() ) {
- xpPlugin->setOn( false );
- xpOff->setOn( true );
- }
- if ( enterprise ) {
- if ( mysqlPlugin->isOn() ) {
- mysqlPlugin->setOn( false );
- mysqlDirect->setOn( true );
- }
- if ( ociPlugin->isOn() ) {
- ociPlugin->setOn( false );
- ociDirect->setOn( true );
- }
- if ( odbcPlugin->isOn() ) {
- odbcPlugin->setOn( false );
- odbcDirect->setOn( true );
- }
- if ( psqlPlugin->isOn() ) {
- psqlPlugin->setOn( false );
- psqlDirect->setOn( true );
- }
- if ( tdsPlugin->isOn() ) {
- tdsPlugin->setOn( false );
- tdsDirect->setOn( true );
- }
- if ( db2Plugin->isOn() ) {
- db2Plugin->setOn( false );
- db2Direct->setOn( true );
- }
- if ( sqlitePlugin->isOn() ) {
- sqlitePlugin->setOn( false );
- sqliteDirect->setOn( true );
- }
- if ( ibasePlugin->isOn() ) {
- ibasePlugin->setOn( false );
- ibaseDirect->setOn( true );
- }
- }
- accOn->setEnabled( false );
- bigCodecsOff->setEnabled( false );
- mngPlugin->setEnabled( false );
- pngPlugin->setEnabled( false );
- jpegPlugin->setEnabled( false );
- sgiPlugin->setEnabled( false );
- cdePlugin->setEnabled( false );
- motifPlugin->setEnabled( false );
- motifplusPlugin->setEnabled( false );
- motifPlugin->setEnabled( false );
- platinumPlugin->setEnabled( false );
- xpPlugin->setEnabled( false );
- if ( enterprise ) {
- mysqlPlugin->setEnabled( false );
- ociPlugin->setEnabled( false );
- odbcPlugin->setEnabled( false );
- psqlPlugin->setEnabled( false );
- tdsPlugin->setEnabled( false );
- db2Plugin->setEnabled( false );
- sqlitePlugin->setEnabled( false );
- ibasePlugin->setEnabled( false );
- }
- } else {
- accOn->setEnabled( true );
- bigCodecsOff->setEnabled( true );
- mngPlugin->setEnabled( true );
- pngPlugin->setEnabled( true );
- jpegPlugin->setEnabled( true );
- sgiPlugin->setEnabled( true );
- cdePlugin->setEnabled( true );
- motifplusPlugin->setEnabled( true );
- motifPlugin->setEnabled( true );
- platinumPlugin->setEnabled( true );
- xpPlugin->setEnabled( true );
- if ( enterprise ) {
- mysqlPlugin->setEnabled( true );
- ociPlugin->setEnabled( true );
- odbcPlugin->setEnabled( true );
- psqlPlugin->setEnabled( true );
- tdsPlugin->setEnabled( true );
- db2Plugin->setEnabled( true );
- sqlitePlugin->setEnabled( true );
- ibasePlugin->setEnabled( true );
- }
- }
- setJpegDirect( mngDirect->isOn() );
-}
-
-void SetupWizardImpl::setJpegDirect( bool jd )
-{
- // direct MNG support requires also direct JPEG support
- if ( jd ) {
- jpegOff->setOn( false );
- jpegPlugin->setOn( false );
- jpegDirect->setOn( true );
-
- jpegOff->setEnabled( false );
- jpegPlugin->setEnabled( false );
- jpegDirect->setEnabled( true );
- } else {
- jpegOff->setEnabled( true );
- if ( !staticItem->isOn() )
- jpegPlugin->setEnabled( true );
- jpegDirect->setEnabled( true );
- }
-}
-
-void SetupWizardImpl::optionClicked( CheckListItem *item )
-{
- if ( !item || item->type() != CheckListItem::RadioButton )
- return;
-
- if ( item->text(0) == "Static" && item->isOn() ) {
- setStaticEnabled( true );
- return;
- } else if ( item->text( 0 ) == "Shared" && item->isOn() ) {
- setStaticEnabled( false );
- return;
- } else if ( item==mngDirect || item==mngPlugin || item==mngOff ) {
- setJpegDirect( mngDirect->isOn() );
- } else if ( item==db2Direct && odbcDirect->isOn() ) {
- if ( odbcPlugin->isEnabled() )
- odbcPlugin->QCheckListItem::setOn(true);
- else
- odbcOff->QCheckListItem::setOn(true);
- } else if ( item==odbcDirect && db2Direct->isOn() ) {
- if ( db2Plugin->isEnabled() )
- db2Plugin->QCheckListItem::setOn(true);
- else
- db2Off->QCheckListItem::setOn(true);
- }
-}
-
-
-void SetupWizardImpl::configPageChanged()
-{
- if ( configPage->configList->isVisible() ) {
- configPage->configList->setSelected( configPage->configList->currentItem(), true );
- } else if ( configPage->advancedList->isVisible() ) {
- configPage->advancedList->setSelected( configPage->advancedList->currentItem(), true );
- }
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- else if ( configPage->installList->isVisible() ) {
- configPage->installList->setSelected( configPage->installList->currentItem(), true );
- }
-#endif
-}
-
-void SetupWizardImpl::cleanDone()
-{
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- prepareEnvironment();
-# if defined(Q_OS_WIN32)
- QString qtdir = QEnvironment::getEnv( "QTDIR" );
-
- // adjust the .qmake.cache
- QFile qmakeCache( qtdir + "/.qmake.cache" );
- if ( qmakeCache.open( IO_ReadOnly ) ) {
- QString content = qmakeCache.readAll();
- qmakeCache.close();
- if ( globalInformation.sysId() == GlobalInformation::Borland )
- content.replace( "C:\\QtEvaluation\\qtborland", qtdir );
- else
- content.replace( "C:\\QtEvaluation\\qtmsvc", qtdir );
-
- if ( qmakeCache.open( IO_WriteOnly ) ) {
- QTextStream ts( &qmakeCache );
- ts << content;
- qmakeCache.close();
- } else {
- logOutput( QString("Warning: can't open the .qmake.cache file for writing: %1\n").arg( qmakeCache.errorString() ) );
- }
- } else {
- logOutput( QString("Warning: can't open the .qmake.cache file for reading: %1\n").arg( qmakeCache.errorString() ) );
- }
-
- QStringList args;
- args << ( qtdir + "\\bin\\configure.exe" );
- args << "-spec";
- args << globalInformation.text(GlobalInformation::Mkspec);
- if ( globalInformation.sysId() == GlobalInformation::MSVC )
- args << "-dsp";
- else if ( globalInformation.sysId() == GlobalInformation::MSVCNET )
- args << "-vcproj";
-
- if( qWinVersion() & WV_NT_based ) {
- logOutput( "Execute configure...\n" );
- logOutput( args.join( " " ) + "\n" );
-
- configure.setWorkingDirectory( qtdir );
- configure.setArguments( args );
- // Start the configure process
- buildPage->compileProgress->setTotalSteps( int(double(filesToCompile) * 2.6) );
- buildPage->restartBuild->setText( "Stop configure" );
- buildPage->restartBuild->setEnabled( true );
- buildPage->restartBuild->show();
- buildPage->compileProgress->show();
- if( !configure.start() ) {
- logOutput( "Could not start configure process" );
- emit wizardPageFailed( indexOf(currentPage()) );
- }
- } else { // no proper process handling on DOS based systems - create a batch file instead
- logOutput( "Generating batch file...\n" );
- QDir installDir;
- if ( optionsPage )
- installDir.setPath( optionsPage->installPath->text() );
- else
- installDir.setPath( qtdir );
- QFile outFile( installDir.filePath("build.bat") );
- QTextStream outStream( &outFile );
-
- if( outFile.open( IO_WriteOnly | IO_Translate ) ) {
- if ( installDir.absPath()[1] == ':' )
- outStream << installDir.absPath().left(2) << endl;
- outStream << "cd %QTDIR%" << endl;
- outStream << args.join( " " ) << endl;
- if( !globalInformation.reconfig() ) {
- outStream << globalInformation.text(GlobalInformation::MakeTool) << endl;
- }
- outFile.close();
- }
- logOutput( "Doing the final integration steps..." );
- doIDEIntegration();
- buildPage->compileProgress->setTotalSteps( buildPage->compileProgress->totalSteps() );
- showPage( finishPage );
- }
-# elif defined(Q_OS_UNIX)
- buildPage->compileProgress->show();
- buildPage->restartBuild->show();
-
- buildPage->compileProgress->setProgress( 0 );
- buildPage->compileProgress->setTotalSteps( int(double(filesToCompile) * 1.8) );
- configDone();
-# endif
-#else
- QStringList args;
- QStringList entries;
- QSettings settings;
- QString entry;
- QStringList::Iterator it;
- QFile tmpFile;
- QTextStream tmpStream;
- bool settingsOK;
-
-# if defined(Q_OS_WIN32)
- args << ( QEnvironment::getEnv( "QTDIR" ) + "\\bin\\configure.exe" );
-# elif defined(Q_OS_UNIX)
- args << ( QEnvironment::getEnv( "QTDIR" ) + QDir::separator() + "configure" );
-# endif
-
- entry = settings.readEntry( "/Trolltech/Qt/Build", "Debug", &settingsOK );
- if ( entry == "Debug" )
- args += "-debug";
- else
- args += "-release";
-
- entry = settings.readEntry( "/Trolltech/Qt/Library", "Shared", &settingsOK );
- if ( entry == "Static" )
- args += "-static";
- else
- args += "-shared";
-
- entry = settings.readEntry( "/Trolltech/Qt/Threading", QString(), &settingsOK );
- if ( entry == "Threaded" )
- args += "-thread";
- else
- args += "-no-thread";
-
- entries = settings.readListEntry( "/Trolltech/Qt/Modules", ',', &settingsOK );
- for( it = allModules.begin(); it != allModules.end(); ++it ) {
- entry = *it;
- if ( entries.find( entry ) != entries.end() )
- args += QString( "-enable-" ) + entry;
- else
- args += QString( "-disable-") + entry;
- }
-
- entry = settings.readEntry( "/Trolltech/Qt/SQL Drivers/MySQL", "Off", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-sql-mysql";
- else if ( entry == "Plugin" )
- args += "-plugin-sql-mysql";
- else if ( entry == "Off" )
- args += "-no-sql-mysql";
-
- entry = settings.readEntry( "/Trolltech/Qt/SQL Drivers/OCI", "Off", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-sql-oci";
- else if ( entry == "Plugin" )
- args += "-plugin-sql-oci";
- else if ( entry == "Off" )
- args += "-no-sql-oci";
-
- entry = settings.readEntry( "/Trolltech/Qt/SQL Drivers/ODBC", "Off", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-sql-odbc";
- else if ( entry == "Plugin" )
- args += "-plugin-sql-odbc";
- else if ( entry == "Off" )
- args += "-no-sql-odbc";
-
- entry = settings.readEntry( "/Trolltech/Qt/SQL Drivers/PostgreSQL", "Off", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-sql-psql";
- else if ( entry == "Plugin" )
- args += "-plugin-sql-psql";
- else if ( entry == "Off" )
- args += "-no-sql-psql";
-
- entry = settings.readEntry( "/Trolltech/Qt/SQL Drivers/TDS", "Off", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-sql-tds";
- else if ( entry == "Plugin" )
- args += "-plugin-sql-tds";
- else if ( entry == "Off" )
- args += "-no-sql-tds";
-
- entry = settings.readEntry( "/Trolltech/Qt/SQL Drivers/DB2", "Off", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-sql-db2";
- else if ( entry == "Plugin" )
- args += "-plugin-sql-db2";
- else if ( entry == "Off" )
- args += "-no-sql-db2";
-
- entry = settings.readEntry( "/Trolltech/Qt/SQL Drivers/SQLite", "Off", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-sql-sqlite";
- else if ( entry == "Plugin" )
- args += "-plugin-sql-sqlite";
- else if ( entry == "Off" )
- args += "-no-sql-sqlite";
-
- entry = settings.readEntry( "/Trolltech/Qt/SQL Drivers/iBase", "Off", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-sql-ibase";
- else if ( entry == "Plugin" )
- args += "-plugin-sql-ibase";
- else if ( entry == "Off" )
- args += "-no-sql-ibase";
-
-# if defined(Q_OS_WIN32)
-//TODO: Win only, remove these options from wizard on mac?
- entry = settings.readEntry( "/Trolltech/Qt/Accessibility", "On", &settingsOK );
- if ( entry == "On" )
- args += "-accessibility";
- else
- args += "-no-accessibility";
-# endif
-
- entry = settings.readEntry( "/Trolltech/Qt/Big Textcodecs", "On", &settingsOK );
- if ( entry == "On" )
- args += "-big-codecs";
- else
- args += "-no-big-codecs";
-
- entry = settings.readEntry( "/Trolltech/Qt/Tablet Support", "Off", &settingsOK );
- if ( entry == "On" )
- args += "-tablet";
- else
- args += "-no-tablet";
-
- entries = settings.readListEntry( "/Trolltech/Qt/Advanced C++", ',', &settingsOK );
- if ( entries.contains( "STL" ) )
- args += "-stl";
- else
- args += "-no-stl";
- if ( entries.contains( "Exceptions" ) )
- args += "-exceptions";
- else
- args += "-no-exceptions";
- if ( entries.contains( "RTTI" ) )
- args += "-rtti";
- else
- args += "-no-rtti";
-
-# if defined(Q_OS_WIN32)
-//TODO: Win only, remove these options from wizard on mac?
- entry = settings.readEntry( "/Trolltech/Qt/Image Formats/PNG", "Direct", &settingsOK );
- if ( entry == "Plugin" )
- args += "-plugin-imgfmt-png";
- else if ( entry == "Direct" )
- args += "-qt-imgfmt-png";
- else if ( entry == "Off" )
- args += "-no-imgfmt-png";
- args += "-qt-png";
-
- entry = settings.readEntry( "/Trolltech/Qt/Image Formats/JPEG", "Direct", &settingsOK );
- if ( entry == "Plugin" )
- args += "-plugin-imgfmt-jpeg";
- else if ( entry == "Direct" )
- args += "-qt-imgfmt-jpeg";
- else if ( entry == "Off" )
- args += "-no-imgfmt-jpeg";
- args += "-qt-jpeg";
-
- entry = settings.readEntry( "/Trolltech/Qt/Image Formats/MNG", "Direct", &settingsOK );
- if ( entry == "Plugin" )
- args += "-plugin-imgfmt-mng";
- else if ( entry == "Direct" )
- args += "-qt-imgfmt-mng";
- else if ( entry == "Off" )
- args += "-no-imgfmt-mng";
- args += "-qt-mng";
-# endif
-
- entry = settings.readEntry( "/Trolltech/Qt/Image Formats/GIF", "Direct", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-gif";
- else if ( entry == "Off" )
- args += "-no-gif";
-
-# if defined(Q_OS_WIN32)
-//TODO: Win only, remove these options from wizard on mac?
- entry = settings.readEntry( "/Trolltech/Qt/Styles/Windows", "Direct", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-style-windows";
- else if ( entry == "Plugin" )
- args += "-plugin-style-windows";
- else if ( entry == "Off" )
- args += "-no-style-windows";
-
- entry = settings.readEntry( "/Trolltech/Qt/Styles/Windows XP", "Off", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-style-windowsxp";
- else if ( entry == "Plugin" )
- args += "-plugin-style-windowsxp";
- else if ( entry == "Off" )
- args += "-no-style-windowsxp";
-
- entry = settings.readEntry( "/Trolltech/Qt/Styles/Motif", "Plugin", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-style-motif";
- else if ( entry == "Plugin" )
- args += "-plugin-style-motif";
- else if ( entry == "Off" )
- args += "-no-style-motif";
-
- entry = settings.readEntry( "/Trolltech/Qt/Styles/Platinum", "Plugin", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-style-platinum";
- else if ( entry == "Plugin" )
- args += "-plugin-style-platinum";
- else if ( entry == "Off" )
- args += "-no-style-platinum";
-
- entry = settings.readEntry( "/Trolltech/Qt/Styles/MotifPlus", "Plugin", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-style-motifplus";
- else if ( entry == "Plugin" )
- args += "-plugin-style-motifplus";
- else if ( entry == "Off" )
- args += "-no-style-motifplus";
-
- entry = settings.readEntry( "/Trolltech/Qt/Styles/CDE", "Plugin", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-style-cde";
- else if ( entry == "Plugin" )
- args += "-plugin-style-cde";
- else if ( entry == "Off" )
- args += "-no-style-cde";
-
- entry = settings.readEntry( "/Trolltech/Qt/Styles/SGI", "Plugin", &settingsOK );
- if ( entry == "Direct" )
- args += "-qt-style-sgi";
- else if ( entry == "Plugin" )
- args += "-plugin-style-sgi";
- else if ( entry == "Off" )
- args += "-no-style-sgi";
-# endif
-
- if ( globalInformation.sysId() == GlobalInformation::MSVC ) {
- entry = settings.readEntry( "/Trolltech/Qt/DSP Generation", "On", &settingsOK );
- if ( entry == "On" )
- args += "-dsp";
- else if ( entry == "Off" )
- args += "-no-dsp";
- } else if ( globalInformation.sysId() == GlobalInformation::MSVCNET ) {
- entry = settings.readEntry( "/Trolltech/Qt/VCPROJ Generation", "On", &settingsOK );
- if ( entry == "On" )
- args += "-vcproj";
- else if ( entry == "Off" )
- args += "-no-vcproj";
- } else if ( globalInformation.sysId() != GlobalInformation::MSVC && globalInformation.sysId() == GlobalInformation::MSVCNET ) {
- args += "-no-dsp";
- args += "-no-vcproj";
- }
-
- if ( ( ( !globalInformation.reconfig() && !optionsPage->skipBuild->isChecked() )
- || ( globalInformation.reconfig() && configPage->rebuildInstallation->isChecked() ) )
-# if defined(Q_OS_WIN32)
- && qWinVersion() & WV_NT_based ) {
-# else
- ) {
-# endif
- logOutput( "Execute configure...\n" );
- logOutput( args.join( " " ) + "\n" );
-
- configure.setWorkingDirectory( QEnvironment::getEnv( "QTDIR" ) );
- configure.setArguments( args );
- // Start the configure process
- buildPage->compileProgress->setTotalSteps( int(double(filesToCompile) * 2.6) );
- buildPage->restartBuild->setText( "Stop configure" );
- buildPage->restartBuild->setEnabled( true );
- buildPage->restartBuild->show();
- buildPage->compileProgress->show();
- if( !configure.start() ) {
- logOutput( "Could not start configure process" );
- emit wizardPageFailed( indexOf(currentPage()) );
- }
- } else { // no proper process handling on DOS based systems - create a batch file instead
- logOutput( "Generating batch file...\n" );
- QDir installDir;
- if ( optionsPage )
- installDir.setPath( optionsPage->installPath->text() );
- else
- installDir.setPath( QEnvironment::getEnv( "QTDIR" ) );
- QFile outFile( installDir.filePath("build.bat") );
- QTextStream outStream( &outFile );
-
- if( outFile.open( IO_WriteOnly | IO_Translate ) ) {
- if ( installDir.absPath()[1] == ':' )
- outStream << installDir.absPath().left(2) << endl;
- outStream << "cd %QTDIR%" << endl;
-
- if ( globalInformation.reconfig() )
- outStream << globalInformation.text(GlobalInformation::MakeTool) << " clean" << endl;
-
- // There is a limitation on Windows 9x regarding the length of the
- // command line. So rather use the configure.cache than specifying
- // all configure options on the command line.
- QFile configureCache( installDir.filePath("configure.cache") );
- if( configureCache.open( IO_WriteOnly | IO_Translate ) ) {
- QTextStream confCacheStream( &configureCache );
- QStringList::Iterator it = args.begin();
- ++it; // skip args[0] (configure)
- while ( it != args.end() ) {
- confCacheStream << *it << endl;
- ++it;
- }
- configureCache.close();
- outStream << args[0] << " -redo" << endl;
- } else {
- outStream << args.join( " " ) << endl;
- }
-
- outStream << globalInformation.text(GlobalInformation::MakeTool) << endl;
- outFile.close();
- }
- logOutput( "Doing the final integration steps..." );
- // No need to redo the integration step
- if ( !globalInformation.reconfig() )
- doIDEIntegration();
- buildPage->compileProgress->setTotalSteps( buildPage->compileProgress->totalSteps() );
- showPage( finishPage );
- }
-#endif
-}
-
-void SetupWizardImpl::prepareEnvironment()
-{
- QByteArray pathBuffer;
- QStringList path;
- QString qtDir;
- int envSpec = QEnvironment::LocalEnv;
-
- if( globalInformation.reconfig() ) {
- qtDir = QEnvironment::getEnv( "QTDIR" );
- if ( configPage ) {
- configPage->currentInstallation->setText( qtDir );
- }
- }
- else {
- qtDir = QDir::toNativeSeparators( QEnvironment::getFSFileName( optionsPage->installPath->text() ) );
- }
-
-#if defined(Q_OS_WIN32)
- if( qWinVersion() & Qt::WV_NT_based ) {
- // under Windows 9x, we don't compile from the installer -- so there is
- // no need to set the local environment; and doing so, results in not
- // setting the persistent since qtDir\bin is already in the PATH
- path = QStringList::split( QRegExp("[;,]"), QEnvironment::getEnv( "PATH" ) );
- if( path.findIndex( qtDir + "\\bin" ) == -1 ) {
- path.prepend( qtDir + "\\bin" );
- QEnvironment::putEnv( "PATH", path.join( ";" ) );
- }
- }
-#elif defined(Q_OS_UNIX)
- path = QStringList::split( QRegExp("[:]"), QEnvironment::getEnv( "PATH" ) );
- if( path.findIndex( qtDir + "/bin" ) == -1 ) {
- path.prepend( qtDir + "/bin" );
- QEnvironment::putEnv( "PATH", path.join( ":" ) );
- }
- QStringList dyld = QStringList::split( QRegExp("[:]"), QEnvironment::getEnv( "DYLD_LIBRARY_PATH" ) );
- if( dyld.findIndex( qtDir + "/lib" ) == -1 ) {
- dyld.prepend( qtDir + "/lib" );
- QEnvironment::putEnv( "DYLD_LIBRARY_PATH", dyld.join( ":" ) );
- }
-#endif
-
-#if defined(Q_OS_WIN32)
- if( foldersPage && foldersPage->qtDirCheck->isChecked() ) {
- envSpec |= QEnvironment::PersistentEnv;
-/*
- if( folderGroups->currentItem() == 0 )
- envSpec |= QEnvironment::GlobalEnv;
-*/
- path.clear();
-
- if( int( qWinVersion() ) & int( Qt::WV_NT_based ) ) {
- path = QStringList::split( ';', QEnvironment::getEnv( "PATH", QEnvironment::PersistentEnv ) );
- if( path.findIndex( qtDir + "\\bin" ) == -1 ) {
- path.prepend( qtDir + "\\bin" );
- QEnvironment::putEnv( "PATH", path.join( ";" ), QEnvironment::PersistentEnv );
- }
- } else {
- if( path.findIndex( qtDir + "\\bin" ) == -1 ) {
- QEnvironment::putEnv( "PATH", qtDir + "\\bin;%PATH%", QEnvironment::PersistentEnv );
- }
- }
- }
-#elif defined(Q_OS_UNIX)
-//Persistent environment not supported
-#endif
-
- QEnvironment::putEnv( "QTDIR", qtDir, envSpec );
- if ( globalInformation.sysId() != GlobalInformation::Other )
- QEnvironment::putEnv( "QMAKESPEC", globalInformation.text(GlobalInformation::Mkspec), envSpec );
- else
- QEnvironment::putEnv( "QMAKESPEC", optionsPage->sysOtherCombo->currentText(), envSpec );
-#if defined(Q_OS_WIN32)
- if( qWinVersion() & WV_NT_based ) {
- SendNotifyMessageA( HWND_BROADCAST, WM_WININICHANGE, 0, (LPARAM)"Environment" );
- SendNotifyMessageA( HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0 );
- }
-#endif
-}
-
-void SetupWizardImpl::showPageConfig()
-{
- if (autoContTimer.isActive()) {
- autoContTimer.stop();
- timeCounter = 30;
- nextButton()->setText("Next >");
- }
-#if defined(EVAL) || defined(EDU) || defined(NON_COMMERCIAL)
- setBackEnabled( buildPage, false );
-
- static bool alreadyInitialized = false;
- if ( !alreadyInitialized ) {
- configPage->installList->setSorting( -1 );
- configPage->installList->setUpdatesEnabled(false);
-
- CheckListItem *item;
- CheckListItem *folder;
-
- folder = new CheckListItem( configPage->installList, "Database drivers" );
-
-#if !defined(NON_COMMERCIAL)
-#if !defined(Q_OS_MACX)
- item = new CheckListItem( folder, "DB2", QCheckListItem::CheckBox );
- item->addRequiredFiles("db2cli.dll");
- db2PluginInstall = item;
- db2PluginInstall->setHelpText( tr(
- "Installs the DB2 driver. This driver can "
- "be used to access DB2 databases."
- "<p><font color=\"red\">Choosing this option requires "
- "that the DB2 Client is installed and set up. "
- "The driver depends on the db2cli.dll.</font></p>"
- ), configPage->explainOption );
-
- item = new CheckListItem( folder, "TDS", QCheckListItem::CheckBox );
- item->addRequiredFiles("ntwdblib.dll");
- tdsPluginInstall = item;
- tdsPluginInstall->setHelpText( tr(
- "Installs the TDS driver to access Sybase Adaptive "
- "Server and Microsoft SQL Server (it is recommended "
- "to rather use ODBC instead of TDS where applicable). "
- "<p><font color=\"red\">Choosing this option requires "
- "that the ntwdblib.dll is available.</font></p>"
- ), configPage->explainOption );
-
- item = new CheckListItem( folder, "Oracle (OCI)", QCheckListItem::CheckBox );
- item->addRequiredFiles( "oci.dll" );
- ociPluginInstall = item;
- ociPluginInstall->setHelpText( tr(
- "<p>Installs the Oracale Call Interface (OCI) driver.</p> "
- "<p><font color=\"red\">Choosing this option requires "
- "that the Oracle Client is installed and set up. "
- "The driver depends on the oci.dll.</font></p>"
- ), configPage->explainOption );
-#endif
-
- if ( globalInformation.sysId() != GlobalInformation::Borland ) {
- // I was not able to make Postgres work with Borland
- item = new CheckListItem( folder, "PostgreSQL", QCheckListItem::CheckBox );
-#ifndef Q_OS_MACX
- item->addRequiredFiles( "libpq.dll" );
-#endif
- item->setOn( item->verify() );
- psqlPluginInstall = item;
- psqlPluginInstall->setHelpText( tr(
- "Installs the PostgreSQL 7.x driver. This driver can "
- "be used to access PostgreSQL 6 databases as well "
- "as PostgreSQL 7 databases."
-#ifdef Q_OS_MACX
- "\n\nRequires a proper PostgreSQL installation."
-#endif
- ), configPage->explainOption );
- } else {
- psqlPluginInstall = 0;
- }
-
- item = new CheckListItem( folder, "MySQL", QCheckListItem::CheckBox );
-#ifndef Q_OS_MACX
- item->addRequiredFiles( "libmySQL.dll" );
-#endif
- item->setOn( item->verify() );
- mysqlPluginInstall = item;
- mysqlPluginInstall->setHelpText( tr(
- "Installs the MySQL 3.x database driver."
-#ifdef Q_OS_MACX
- "\n\nRequires a proper MySQL installation."
-#endif
- ), configPage->explainOption );
-
-#if !defined(Q_OS_MAC)
- item = new CheckListItem( folder, "ODBC", QCheckListItem::CheckBox );
- item->setOn( findFile( "odbc32.dll" ) );
- odbcPluginInstall = item;
- odbcPluginInstall->setHelpText( tr(
- "Installs the Open Database Connectivity (ODBC) driver. "
- "This driver depends on the odbc32.dll which should be "
- "available on all modern Windows installations."
- ), configPage->explainOption );
-#endif
-#else
- item = new CheckListItem( folder, "SQLite", QCheckListItem::CheckBox );
- item->setOn( true );
- sqlitePluginInstall = item;
- sqlitePluginInstall->setHelpText( tr(
- "Installs the SQLite driver.\n"
- "This driver is an in-process SQL database "
- "driver. It is needed for some of the "
- "examples used in the book."
- ), configPage->explainOption );
-#endif
-
- configPage->installList->setUpdatesEnabled(true);
- alreadyInitialized = true;
- }
-#else
-
- prepareEnvironment();
-
- bool enterprise = licenseInfo[ "PRODUCTS" ] == "qt-enterprise";
- configPage->configList->setUpdatesEnabled(false);
- configPage->advancedList->setUpdatesEnabled(false);
-
- if( configPage->configList->childCount() ) {
- QListViewItem* current = configPage->configList->firstChild();
-
- while( current ) {
- QListViewItem* next = current->nextSibling();
- delete current;
- current = next;
- }
-
- current = configPage->advancedList->firstChild();
- while( current ) {
- QListViewItem* next = current->nextSibling();
- delete current;
- current = next;
- }
- }
- QSettings settings;
- configPage->configList->setSorting( -1 );
- configPage->advancedList->setSorting( -1 );
- CheckListItem *item;
- CheckListItem *folder;
- QStringList::Iterator it;
-
- // general
- folder = new CheckListItem ( configPage->configList, "Modules" );
- folder->setHelpText(tr("<p>Some of these modules are optional."
- "<p>You can deselect the modules that you "
- "don't require for your development."
- "<p>By default, all modules are selected."), configPage->explainOption);
- bool settingsOK;
- QStringList entries = settings.readListEntry( "/Trolltech/Qt/Modules", ',', &settingsOK );
- QStringList licensedModules = QStringList::split( " ", "network canvas table xml opengl sql" );
- for( it = licensedModules.begin(); it != licensedModules.end(); ++it ) {
- item = new CheckListItem( folder, (*it), QCheckListItem::CheckBox );
- bool on = entries.isEmpty() || entries.find( *it ) != entries.end();
- item->setOn( enterprise && on );
- item->setEnabled( enterprise );
- if ( enterprise )
- allModules << *it;
- }
-
- licensedModules = QStringList::split( " ", "iconview workspace" );
- for( it = licensedModules.begin(); it != licensedModules.end(); ++it ) {
- item = new CheckListItem( folder, (*it), QCheckListItem::CheckBox );
- bool on = entries.isEmpty() || entries.find( *it ) != entries.end();
- item->setOn( on );
- allModules << *it;
- }
-
- QStringList requiredModules = QStringList::split( " ", "styles dialogs widgets tools kernel" );
- for( it = requiredModules.begin(); it != requiredModules.end(); ++it ) {
- item = new CheckListItem( folder, (*it), QCheckListItem::CheckBox );
- bool on = entries.isEmpty() || entries.find( *it ) != entries.end();
- item->setOn( on );
- item->setEnabled( false );
- allModules << *it;
- }
-
- folder = new CheckListItem ( configPage->configList, "Threading" );
- folder->setHelpText(tr("<p>Build the Qt library with or without thread support."
- "<p>By default, threading is supported. Some classes will "
- "not be available without thread support."), configPage->explainOption);
- QString entry = settings.readEntry( "/Trolltech/Qt/Threading", "Threaded", &settingsOK );
- item = new CheckListItem( folder, "Threaded", QCheckListItem::RadioButton );
- item->setOn( entry == "Threaded" );
- item = new CheckListItem( folder, "Non-threaded", QCheckListItem::RadioButton );
- item->setOn( entry == "Non-threaded" );
- CheckListItem *singleThreaded = item;
-
- folder = new CheckListItem ( configPage->configList, "Library" );
- folder->setHelpText(tr("<p>Build a shared or a static Qt library."
- "<p>A shared Qt library makes it necessary to "
- "distribute the Qt DLL together with your software. "
- "Applications and libraries linked against a shared Qt library "
- "are small and can make use of components and plugins."
- "<p>All applications created with a static "
- "library will be at least 1.5MB big. "
- "<font color=\"red\">It is not possible to "
- "build or use any components or plugins with a "
- "static Qt library!</font>"), configPage->explainOption);
- entry = settings.readEntry( "/Trolltech/Qt/Library", "Shared", &settingsOK );
- staticItem = new CheckListItem( folder, "Static", QCheckListItem::RadioButton );
- staticItem->setOn( entry == "Static" );
- staticItem->setWarningText("<p>It will not be possible to build components "
- "or plugins if you select the static build of the Qt library."
- "<p>New features, e.g souce code editing in Qt Designer, will not "
- "be available, and you or users of your software might not be able "
- "to use all or new features, e.g. new styles.");
-
- item = new CheckListItem( folder, "Shared", QCheckListItem::RadioButton );
- item->setOn( entry == "Shared" );
- item->setWarningText("<p>Single-threaded, shared configurations "
- "may cause instabilities because of runtime "
- "library conflicts.", singleThreaded);
- singleThreaded->setWarningText("<p>Single-threaded, shared configurations "
- "may cause instabilities because of runtime "
- "library conflicts.", item);
-
- folder = new CheckListItem ( configPage->configList, "Build" );
- folder->setHelpText(tr("<p>Build a Qt library with or without debug symbols."
- "<p>Use the debug build of the Qt library to enhance "
- "debugging of your application. The release build "
- "is both smaller and faster."), configPage->explainOption);
- entry = settings.readEntry( "/Trolltech/Qt/Build", "Release", &settingsOK );
- item = new CheckListItem( folder, "Debug", QCheckListItem::RadioButton );
- item->setOn( entry == "Debug" );
- item = new CheckListItem( folder, "Release", QCheckListItem::RadioButton );
- item->setOn( entry == "Release" );
-
- // Advanced options
- if ( globalInformation.sysId() == GlobalInformation::MSVC ) {
- entry = settings.readEntry( "/Trolltech/Qt/DSP Generation", "On", &settingsOK );
- folder = new CheckListItem( configPage->advancedList, "DSP Generation" );
- folder->setHelpText(tr("qmake can generate the Visual Studio 6 project files (dsp) as well "
- "as makefiles when Qt is being configured."),
- configPage->explainOption);
- dspOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- dspOff->setOn( entry == "Off" );
- dspOn = new CheckListItem( folder, "On", QCheckListItem::RadioButton );
- dspOn->setOn( entry == "On" );
- } else if ( globalInformation.sysId() == GlobalInformation::MSVCNET ) {
- entry = settings.readEntry( "/Trolltech/Qt/VCPROJ Generation", "On", &settingsOK );
- folder = new CheckListItem( configPage->advancedList, "VCPROJ Generation" );
- folder->setHelpText(tr("qmake can generate the Visual Studio.NET project files (vcproj) as well "
- "as makefiles when Qt is being configured."),
- configPage->explainOption);
- vcprojOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- vcprojOff->setOn( entry == "Off" );
- vcprojOn = new CheckListItem( folder, "On", QCheckListItem::RadioButton );
- vcprojOn->setOn( entry == "On" );
- }
-
- CheckListItem *imfolder = new CheckListItem( configPage->advancedList, "Image Formats" );
- imfolder->setHelpText(tr("<p>Qt ships with support for a wide range of common image formats. "
- "<p>Standard formats are always included in Qt, and some more special formats "
- "can be left out from the Qt library itself and provided by a plugin instead."),
- configPage->explainOption);
-
- folder = new CheckListItem( imfolder, "GIF" );
- folder->setHelpText(tr("<p>Support for GIF images in Qt."
- "<p><font color=\"red\">If you are in a country "
- "which recognizes software patents and in which "
- "Unisys holds a patent on LZW compression and/or "
- "decompression and you want to use GIF, Unisys "
- "may require you to license the technology. Such "
- "countries include Canada, Japan, the USA, "
- "France, Germany, Italy and the UK.</font>"),
- configPage->explainOption);
- entry = settings.readEntry( "/Trolltech/Qt/Image Formats/GIF", "Off", &settingsOK );
- gifOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- gifOff->setOn( entry == "Off" );
- gifDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- gifDirect->setOn( entry == "Direct" );
-
- folder = new CheckListItem( imfolder, "MNG" );
- folder->setHelpText(tr("<p>Qt can support the \"Multiple-Image Network Graphics\" format."
- "<p>MNG support can be compiled into Qt, provided by a plugin ",
- "or turned off completely."),
- configPage->explainOption);
- entry = settings.readEntry( "/Trolltech/Qt/Image Formats/MNG", "Plugin", &settingsOK );
-#if 0
- // ### disable using system MNG for now -- please someone take a closer look
- entryPresent = settings.readEntry( "/Trolltech/Qt/Image Formats/MNG Present", "No", &settingsOK );
- mngPresent = new CheckListItem( folder, "Present", QCheckListItem::CheckBox );
- mngPresent->setOn( entry == "Yes" );
-#endif
- mngOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- mngOff->setOn( entry == "Off" );
- mngPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- mngPlugin->setOn( entry == "Plugin" );
- mngDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- mngDirect->setOn( entry == "Direct" );
-
- folder = new CheckListItem( imfolder, "JPEG" );
- folder->setHelpText(tr("<p>Qt can support the \"Joint Photographic Experts Group\" format."
- "<p>JPEG support can be compiled into Qt, provided by a plugin ",
- "or turned off completely."),
- configPage->explainOption);
- entry = settings.readEntry( "/Trolltech/Qt/Image Formats/JPEG", "Direct", &settingsOK );
-#if 0
- // ### disable using system JPEG for now -- please someone take a closer look
- entryPresent = settings.readEntry( "/Trolltech/Qt/Image Formats/JPEG Present", "No", &settingsOK );
- jpegPresent = new CheckListItem( folder, "Present", QCheckListItem::CheckBox );
- jpegPresent->setOn( entry == "Yes" );
-#endif
- jpegOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- jpegOff->setOn( entry == "Off" );
- jpegPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- jpegPlugin->setOn( entry == "Plugin" );
- jpegDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- jpegDirect->setOn( entry == "Direct" );
-
- folder = new CheckListItem( imfolder, "PNG" );
- folder->setHelpText(tr("<p>Qt can support the \"Portable Network Graphics\" format."
- "<p>PNG support can be compiled into Qt, provided by a plugin ",
- "or turned off completely."),
- configPage->explainOption);
- entry = settings.readEntry( "/Trolltech/Qt/Image Formats/PNG", "Direct", &settingsOK );
-#if 0
- // ### disable using system PNG for now -- please someone take a closer look
- entryPresent = settings.readEntry( "/Trolltech/Qt/Image Formats/PNG Present", "No", &settingsOK );
- pngPresent = new CheckListItem( folder, "Present", QCheckListItem::CheckBox );
- pngPresent->setOn( entry == "Yes" );
-#endif
- pngOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- pngOff->setOn( entry == "Off" );
- // PNG is required by the build system (ie. we use PNG), so don't allow it to be turned off
- pngOff->setEnabled( false );
- pngPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- pngPlugin->setOn( entry == "Plugin" );
- pngDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- pngDirect->setOn( entry == "Direct" );
-
- CheckListItem *sqlfolder = new CheckListItem( configPage->advancedList, "Sql Drivers" );
- sqlfolder->setHelpText(tr("<p>Select the SQL Drivers you want to support."
- "<p>SQL Drivers can be built into Qt or built as plugins to be more flexible "
- "for later extensions."
- "<p><font color=#FF0000>You must have the appropriate client libraries "
- "and header files installed correctly before you can build the Qt SQL drivers.</font>"),
- configPage->explainOption);
-
- folder = new CheckListItem( sqlfolder, "iBase" );
- folder->addRequiredFiles("ibase.h");
- entry = settings.readEntry( "/Trolltech/Qt/Sql Drivers/iBase", "Off", &settingsOK );
- ibaseOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- ibaseOff->setOn( true );
- ibaseOff->setEnabled( enterprise );
- ibasePlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- ibasePlugin->setOn( entry == "Plugin" && folder->verify() && enterprise );
- ibasePlugin->setEnabled( enterprise );
- ibaseDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- ibaseDirect->setOn( entry == "Direct" && folder->verify() && enterprise );
- ibaseDirect->setEnabled( enterprise );
- if (globalInformation.sysId() == GlobalInformation::Borland)
- folder->addRequiredFiles("gds32.lib");
- else
- folder->addRequiredFiles("gds32_ms.lib");
-
- folder = new CheckListItem( sqlfolder, "DB2" );
- folder->addRequiredFiles("db2cli.lib,sqlcli1.h");
- entry = settings.readEntry( "/Trolltech/Qt/Sql Drivers/DB2", "Off", &settingsOK );
- db2Off = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- db2Off->setOn( true );
- db2Off->setEnabled( enterprise );
- db2Plugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- db2Plugin->setOn( entry == "Plugin" && folder->verify() && enterprise );
- db2Plugin->setEnabled( enterprise );
- db2Direct = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- db2Direct->setOn( entry == "Direct" && folder->verify() && enterprise );
- db2Direct->setEnabled( enterprise );
-
- folder = new CheckListItem( sqlfolder, "TDS" );
- folder->addRequiredFiles("ntwdblib.lib,sqldb.h");
- entry = settings.readEntry( "/Trolltech/Qt/Sql Drivers/TDS", "Off", &settingsOK );
- tdsOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- tdsOff->setOn( true );
- tdsOff->setEnabled( enterprise );
- tdsPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- tdsPlugin->setOn( entry == "Plugin" && folder->verify() && enterprise );
- tdsPlugin->setEnabled( enterprise );
- tdsDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- tdsDirect->setOn( entry == "Direct" && folder->verify() && enterprise );
- tdsDirect->setEnabled( enterprise );
-
- folder = new CheckListItem( sqlfolder, "PostgreSQL" );
- folder->addRequiredFiles("libpqdll.lib,libpq-fe.h");
- entry = settings.readEntry( "/Trolltech/Qt/Sql Drivers/PostgreSQL", "Off", &settingsOK );
- psqlOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- psqlOff->setOn( true );
- psqlOff->setEnabled( enterprise );
- psqlPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- psqlPlugin->setOn( entry == "Plugin" && folder->verify() && enterprise );
- psqlPlugin->setEnabled( enterprise );
- psqlDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- psqlDirect->setOn( entry == "Direct" && folder->verify() && enterprise );
- psqlDirect->setEnabled( enterprise );
-
- folder = new CheckListItem( sqlfolder, "OCI" );
- folder->addRequiredFiles("oci.lib,oci.h");
- entry = settings.readEntry( "/Trolltech/Qt/Sql Drivers/OCI", "Off", &settingsOK );
- ociOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- ociOff->setOn( true );
- ociOff->setEnabled( enterprise );
- ociPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- ociPlugin->setOn( entry == "Plugin" && folder->verify() && enterprise );
- ociPlugin->setEnabled( enterprise );
- ociDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- ociDirect->setOn( entry == "Direct" && folder->verify() && enterprise );
- ociDirect->setEnabled( enterprise );
-
- folder = new CheckListItem( sqlfolder, "MySQL" );
- folder->addRequiredFiles("libmysql.lib,mysql.h");
- entry = settings.readEntry( "/Trolltech/Qt/Sql Drivers/MySQL", "Off", &settingsOK );
- mysqlOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- mysqlOff->setOn( true );
- mysqlOff->setEnabled( enterprise );
- mysqlPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- mysqlPlugin->setOn( entry == "Plugin" && folder->verify() && enterprise );
- mysqlPlugin->setEnabled( enterprise );
- mysqlDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- mysqlDirect->setOn( entry == "Direct" && folder->verify() && enterprise );
- mysqlDirect->setEnabled( enterprise );
-
- folder = new CheckListItem( sqlfolder, "SQLite" );
- entry = settings.readEntry( "/Trolltech/Qt/Sql Drivers/SQLite", "Off", &settingsOK );
- sqliteOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- sqliteOff->setOn( true );
- sqliteOff->setEnabled( enterprise );
- sqlitePlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- sqlitePlugin->setOn( entry == "Plugin" && folder->verify() && enterprise );
- sqlitePlugin->setEnabled( enterprise );
- sqliteDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- sqliteDirect->setOn( entry == "Direct" && folder->verify() && enterprise );
- sqliteDirect->setEnabled( enterprise );
-
- folder = new CheckListItem( sqlfolder, "ODBC" );
- folder->addRequiredFiles("odbc32.lib,sql.h");
- entry = settings.readEntry( "/Trolltech/Qt/Sql Drivers/ODBC", "Off", &settingsOK );
- odbcOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- odbcOff->setOn( true );
- odbcOff->setEnabled( enterprise );
- odbcPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- odbcPlugin->setOn( entry == "Plugin" && folder->verify() && enterprise );
- odbcPlugin->setEnabled( enterprise );
- odbcDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- odbcDirect->setOn( entry == "Direct" && folder->verify() && enterprise );
- odbcDirect->setEnabled( enterprise );
-
- CheckListItem *stfolder = new CheckListItem( configPage->advancedList, "Styles" );
- stfolder->setHelpText(tr("Select support for the various GUI styles that Qt supports." ),configPage->explainOption);
-
- folder = new CheckListItem( stfolder, "SGI" );
- entry = settings.readEntry( "/Trolltech/Qt/Styles/SGI", "Plugin", &settingsOK );
- sgiOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- sgiOff->setOn( entry == "Off" );
- sgiPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- sgiPlugin->setOn( entry == "Plugin" );
- sgiDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- sgiDirect->setOn( entry == "Direct" );
-
- folder = new CheckListItem( stfolder, "CDE" );
- entry = settings.readEntry( "/Trolltech/Qt/Styles/CDE", "Plugin", &settingsOK );
- cdeOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- cdeOff->setOn( entry == "Off" );
- cdePlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- cdePlugin->setOn( entry == "Plugin" );
- cdeDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- cdeDirect->setOn( entry == "Direct" );
-
- folder = new CheckListItem( stfolder, "MotifPlus" );
- entry = settings.readEntry( "/Trolltech/Qt/Styles/MotifPlus", "Plugin", &settingsOK );
- motifplusOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- motifplusOff->setOn( entry == "Off" );
- motifplusPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- motifplusPlugin->setOn( entry == "Plugin" );
- motifplusDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- motifplusDirect->setOn( entry == "Direct" );
-
- folder = new CheckListItem( stfolder, "Platinum" );
- entry = settings.readEntry( "/Trolltech/Qt/Styles/Platinum", "Plugin", &settingsOK );
- platinumOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- platinumOff->setOn( entry == "Off" );
- platinumPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- platinumPlugin->setOn( entry == "Plugin" );
- platinumDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- platinumDirect->setOn( entry == "Direct" );
-
- folder = new CheckListItem( stfolder, "Motif" );
- entry = settings.readEntry( "/Trolltech/Qt/Styles/Motif", "Plugin", &settingsOK );
- motifOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- motifOff->setOn( entry == "Off" );
- motifPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- motifPlugin->setOn( entry == "Plugin" );
- motifDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- motifDirect->setOn( entry == "Direct" );
-
- folder = new CheckListItem( stfolder, "Windows XP" );
- folder->addRequiredFiles("uxtheme.h");
- folder->setRequiredFileLocation("part of the Microsoft Platform SDK, which is usually available for "
- "download from the following location:"
- "<p>http://www.microsoft.com/msdownload/platformsdk/sdkupdate/<p>");
-
- entry = settings.readEntry( "/Trolltech/Qt/Styles/Windows XP", "Direct", &settingsOK );
- xpOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- xpOff->setOn( true );
- xpPlugin = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- xpPlugin->setOn( entry == "Plugin" && folder->verify() );
- xpPlugin->setEnabled( folder->verify() );
- xpDirect = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- xpDirect->setOn( entry == "Direct" && folder->verify() );
- xpDirect->setEnabled( folder->verify() );
-
- folder = new CheckListItem( stfolder, "Windows" );
- entry = settings.readEntry( "/Trolltech/Qt/Styles/Windows", "Direct", &settingsOK );
- item = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- item->setEnabled( false );
- item->setOn( entry == "Off" );
- item = new CheckListItem( folder, "Plugin", QCheckListItem::RadioButton );
- item->setEnabled( false );
- item->setOn( entry == "Plugin" );
- item = new CheckListItem( folder, "Direct", QCheckListItem::RadioButton );
- item->setOn( entry == "Direct" );
-
- entries = settings.readListEntry( "/Trolltech/Qt/Advanced C++", ',', &settingsOK );
- folder = new CheckListItem( configPage->advancedList, "Advanced C++" );
- folder->setHelpText(tr("Qt can be built with exception handling, STL support and RTTI support "
- "enabled or disabled. Qt itself doesn't use any of those features."
- "The default is to disable all advanced C++ features."),
- configPage->explainOption);
- advancedRTTI = new CheckListItem( folder, "RTTI", QCheckListItem::CheckBox );
- advancedRTTI->setOn( entries.contains( "RTTI" ) );
- advancedExceptions = new CheckListItem( folder, "Exceptions", QCheckListItem::CheckBox );
- advancedExceptions->setOn( entries.contains( "Exceptions" ) );
- advancedSTL = new CheckListItem( folder, "STL", QCheckListItem::CheckBox );
- advancedSTL->setOn( entries.contains( "STL" ) );
-
- folder = new CheckListItem( configPage->advancedList, "Tablet Support" );
- folder->addRequiredFiles("wintab.h,wintab.lib");
- folder->setRequiredFileLocation("available at http://www.pointing.com/FTP.HTM");
- folder->setHelpText(tr("Qt can support the Wacom brand tablet device."), configPage->explainOption);
- entry = settings.readEntry( "/Trolltech/Qt/Tablet Support", "Off", &settingsOK );
- tabletOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- tabletOff->setOn( true );
- tabletOn = new CheckListItem( folder, "On", QCheckListItem::RadioButton );
- tabletOn->setOn( entry == "On" && folder->verify() );
-
- folder = new CheckListItem( configPage->advancedList, "Accessibility" );
- folder->setHelpText(tr("<p>Accessibility means making software usable and accessible to a wide "
- "range of users, including those with disabilities."
- "This feature is only available with a shared Qt library."),
- configPage->explainOption);
- entry = settings.readEntry( "/Trolltech/Qt/Accessibility", "On", &settingsOK );
- accOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- accOff->setOn( entry == "Off" );
- accOn = new CheckListItem( folder, "On", QCheckListItem::RadioButton );
- accOn->setOn( entry == "On" );
-
- entry = settings.readEntry( "/Trolltech/Qt/Big Textcodecs", "On", &settingsOK );
- folder = new CheckListItem( configPage->advancedList, "Big Textcodecs" );
- folder->setHelpText(tr("Textcodecs provide translations between text encodings. For "
- "languages and script systems with many characters it is necessary "
- "to have big data tables that provide the translation. Those codecs "
- "can be left out of the Qt library and will be loaded on demand.\n"
- "Having the codecs in a plugin is not available with a static Qt "
- "library."), configPage->explainOption);
- bigCodecsOff = new CheckListItem( folder, "Off", QCheckListItem::RadioButton );
- bigCodecsOff->setOn( entry == "Off" );
- bigCodecsOn = new CheckListItem( folder, "On", QCheckListItem::RadioButton );
- bigCodecsOn->setOn( entry == "On" );
-
- setStaticEnabled( staticItem->isOn() );
- setJpegDirect( mngDirect->isOn() );
-
- configPage->configList->setUpdatesEnabled(true);
- configPage->advancedList->setUpdatesEnabled(true);
-
- // Needed to force the scrollbars to appear on Windows 9x...
- QListViewItem *dummy = new QListViewItem(configPage->configList, "Dummy Item");
- delete dummy;
-
- setBackEnabled( buildPage, false );
-#endif
-}
-
-void SetupWizardImpl::showPageBuild()
-{
- autoContTimer.stop();
- nextButton()->setText( "Next >" );
- saveSettings();
-
-#if defined(Q_OS_WIN32)
- if( globalInformation.reconfig() && configPage->rebuildInstallation->isChecked() && qWinVersion() & WV_NT_based ) {
- QStringList args;
-
- buildPage->compileProgress->hide();
- buildPage->restartBuild->hide();
-
- args << globalInformation.text(GlobalInformation::MakeTool) << "clean";
- logOutput( "Starting cleaning process" );
- connect( &cleaner, SIGNAL( processExited() ), this, SLOT( cleanDone() ) );
- connect( &cleaner, SIGNAL( readyReadStdout() ), this, SLOT( readCleanerOutput() ) );
- connect( &cleaner, SIGNAL( readyReadStderr() ), this, SLOT( readCleanerError() ) );
- cleaner.setWorkingDirectory( QEnvironment::getEnv( "QTDIR" ) );
- cleaner.setArguments( args );
- if( !cleaner.start() ) {
- logOutput( "Could not start cleaning process" );
- emit wizardPageFailed( indexOf(currentPage()) );
- }
- } else
-#endif
- cleanDone(); // We're not doing a reconfig, so skip the clean step
-
-}
-
-static bool verifyHelper(QListView *listview, bool result)
-{
- QListViewItemIterator it(listview);
- while (it.current()) {
- QListViewItem *item = it.current();
- ++it;
- if (item->rtti() != CheckListItem::RTTI)
- continue;
-
- CheckListItem *checkItem = (CheckListItem*)item;
- if (!checkItem->isOn())
- continue;
-
- bool r = checkItem->verify();
- checkItem->setCritical(!r);
- if (result) result = r;
- }
- return result;
-}
-
-bool SetupWizardImpl::verifyConfig()
-{
- bool result = true;
-#if !defined(EVAL) && !defined(EDU) && !defined(NON_COMMERCIAL)
- result = verifyHelper(configPage->configList, result);
- result = verifyHelper(configPage->advancedList, result);
-#endif
- return result;
-}
diff --git a/util/install/win/shell.cpp b/util/install/win/shell.cpp
deleted file mode 100644
index b1303a7..0000000
--- a/util/install/win/shell.cpp
+++ /dev/null
@@ -1,472 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "shell.h"
-#include "environment.h"
-#include "dialogs/folderdlgimpl.h"
-#include <qnamespace.h>
-#include <qdir.h>
-#include <qlibrary.h>
-#if defined(Q_OS_WIN32)
-#include <windows.h>
-#include <shlobj.h>
-#else
-#include <sys/param.h>
-#include <sys/mount.h>
-#endif
-
-static const char* folder_closed_xpm[]={
- "16 16 9 1",
- "g c #808080",
- "b c #c0c000",
- "e c #c0c0c0",
- "# c #000000",
- "c c #ffff00",
- ". c None",
- "a c #585858",
- "f c #a0a0a4",
- "d c #ffffff",
- "..###...........",
- ".#abc##.........",
- ".#daabc#####....",
- ".#ddeaabbccc#...",
- ".#dedeeabbbba...",
- ".#edeeeeaaaab#..",
- ".#deeeeeeefe#ba.",
- ".#eeeeeeefef#ba.",
- ".#eeeeeefeff#ba.",
- ".#eeeeefefff#ba.",
- ".##geefeffff#ba.",
- "...##gefffff#ba.",
- ".....##fffff#ba.",
- ".......##fff#b##",
- ".........##f#b##",
- "...........####."
-};
-
-static const char* folder_open_xpm[]={
- "16 16 11 1",
- "# c #000000",
- "g c #c0c0c0",
- "e c #303030",
- "a c #ffa858",
- "b c #808080",
- "d c #a0a0a4",
- "f c #585858",
- "c c #ffdca8",
- "h c #dcdcdc",
- "i c #ffffff",
- ". c None",
- "....#ab##.......",
- "....###.........",
- "....#acab####...",
- "###.#acccccca#..",
- "#ddefaaaccccca#.",
- "#bdddbaaaacccab#",
- ".eddddbbaaaacab#",
- ".#bddggdbbaaaab#",
- "..edgdggggbbaab#",
- "..#bgggghghdaab#",
- "...ebhggghicfab#",
- "....#edhhiiidab#",
- "......#egiiicfb#",
- "........#egiibb#",
- "..........#egib#",
- "............#ee#"
-};
-
-static const char* file_xpm []={
- "16 16 7 1",
- "# c #000000",
- "b c #ffffff",
- "e c #000000",
- "d c #404000",
- "c c #c0c000",
- "a c #ffffc0",
- ". c None",
- "................",
- ".........#......",
- "......#.#a##....",
- ".....#b#bbba##..",
- "....#b#bbbabbb#.",
- "...#b#bba##bb#..",
- "..#b#abb#bb##...",
- ".#a#aab#bbbab##.",
- "#a#aaa#bcbbbbbb#",
- "#ccdc#bcbbcbbb#.",
- ".##c#bcbbcabb#..",
- "...#acbacbbbe...",
- "..#aaaacaba#....",
- "...##aaaaa#.....",
- ".....##aa#......",
- ".......##......."
-};
-
-static const char* info_xpm[] = {
- "16 16 6 1",
- "# c #0000ff",
- "a c #6868ff",
- "b c #d0d0ff",
- "c c #ffffff",
- "- c #000000",
- ". c none",
- ".....------.....",
- "...--######--...",
- "..-###acca###-..",
- ".-####cccc####-.",
- ".-####acca####-.",
- "-##############-",
- "-######bcc#####-",
- "-####ccccc#####-",
- "-#####cccc#####-",
- "-#####cccc#####-",
- "-#####cccc#####-",
- ".-####cccc####-.",
- ".-###cccccc###-.",
- "..-##########-..",
- "...--#######-...",
- ".....------....."
-};
-
-static QPixmap* closedImage = NULL;
-static QPixmap* openImage = NULL;
-static QPixmap* fileImage = NULL;
-static QPixmap* infoImage = NULL;
-
-#if defined(Q_OS_WIN32)
-typedef BOOL (WINAPI *PtrSHGetPathFromIDListW)(LPITEMIDLIST,LPWSTR);
-static PtrSHGetPathFromIDListW ptrSHGetPathFromIDListW = 0;
-
-static void resolveLibs()
-{
- static bool triedResolve = false;
-
- if ( !triedResolve ) {
- triedResolve = true;
- if( int( qWinVersion() ) & int( Qt::WV_NT_based ) ) {
- QLibrary lib("shell32");
- lib.setAutoUnload( false );
- ptrSHGetPathFromIDListW = (PtrSHGetPathFromIDListW) lib.resolve( "SHGetPathFromIDListW" );
- }
- }
-}
-#endif
-
-WinShell::WinShell()
-{
-#if defined(Q_OS_WIN32)
- HRESULT hr;
- LPITEMIDLIST item;
-#endif
-
- localProgramsFolderName.clear();
- commonProgramsFolderName.clear();
- windowsFolderName.clear();
-
-#if defined(Q_OS_WIN32)
- resolveLibs();
- if( ptrSHGetPathFromIDListW && int( qWinVersion() ) & int( Qt::WV_NT_based ) ) {
- ushort buffer[MAX_PATH];
- if( SUCCEEDED( hr = SHGetSpecialFolderLocation( NULL, CSIDL_PROGRAMS, &item ) ) ) {
- if( ptrSHGetPathFromIDListW( item, (wchar_t*) buffer ) ) {
- localProgramsFolderName = QString::fromUcs2( buffer );
- if( SUCCEEDED( hr = SHGetSpecialFolderLocation( NULL, CSIDL_COMMON_PROGRAMS, &item ) ) ) {
- if( ptrSHGetPathFromIDListW( item, (wchar_t*) buffer ) )
- commonProgramsFolderName = QString::fromUcs2( buffer );
- else
- qDebug( "Could not get name of common programs folder" );
- }
- else
- qDebug( "Could not get common programs folder location" );
-
- if( GetWindowsDirectoryW( (wchar_t*) buffer, MAX_PATH ) )
- windowsFolderName = QString::fromUcs2( buffer );
- else
- qDebug( "Could not get Windows directory" );
- }
- else
- qDebug( "Could not get name of programs folder" );
- }
- else
- qDebug( "Could not get programs folder location" );
- }
- else {
- QByteArray buffer( MAX_PATH );
- if( SUCCEEDED( hr = SHGetSpecialFolderLocation( NULL, CSIDL_PROGRAMS, &item ) ) ) {
- if( SHGetPathFromIDListA( item, buffer.data() ) ) {
- localProgramsFolderName = buffer.data();
- commonProgramsFolderName = buffer.data();
- }
- else
- qDebug( "Could not get name of programs folder" );
- }
- else
- qDebug( "Could not get programs folder location" );
- }
-#endif
-
- closedImage = new QPixmap( folder_closed_xpm );
- openImage = new QPixmap( folder_open_xpm );
- fileImage = new QPixmap( file_xpm );
- infoImage = new QPixmap( info_xpm );
-}
-
-WinShell::~WinShell()
-{
-}
-
-QString WinShell::selectFolder( QString folderName, bool common )
-{
- QStringList folders;
- FolderDlgImpl dlg;
-
- if( common )
- dlg.setup( commonProgramsFolderName, folderName );
- else
- dlg.setup( localProgramsFolderName, folderName );
-
- if( dlg.exec() ) {
- return dlg.getFolderName();
- }
- else
- return folderName;
-}
-
-QString WinShell::createFolder( QString folderName, bool common )
-{
- QDir folderDir;
- QString folderPath;
-
- if( common )
- folderPath = commonProgramsFolderName + QString( "\\" ) + folderName;
- else
- folderPath = localProgramsFolderName + QString( "\\" ) + folderName;
-
- folderDir.setPath( folderPath );
-
- if( !folderDir.exists( folderPath ) )
- if( !createDir( folderPath ) )
- return QString();
-
- return folderPath;
-}
-
-
-#if defined(Q_OS_WIN32)
-HRESULT WinShell::createShortcut( QString folderName, bool, QString shortcutName, QString target, QString description, QString arguments, QString wrkDir )
-{
- IPersistFile* linkFile;
- HRESULT hr;
-
- // Add .lnk to shortcut name if needed
- if( shortcutName.right( 4 ) != ".lnk" )
- shortcutName += ".lnk";
-
- folderName = QEnvironment::getFSFileName( folderName );
- if( int( qWinVersion() ) & int( Qt::WV_NT_based ) ) {
- IShellLinkW* link;
- if( SUCCEEDED( hr = CoCreateInstance( CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkW, (void**)&link ) ) ) {
- if( SUCCEEDED( hr = link->QueryInterface( IID_IPersistFile, (void**)&linkFile ) ) ) {
- link->SetPath( (const wchar_t*) target.ucs2() );
- QString _wrkDir = wrkDir;
- if( !_wrkDir.length() ) {
- _wrkDir = QDir::toNativeSeparators( target );
- // remove the filename
- int pos = _wrkDir.findRev( '\\' );
- if ( pos > 0 )
- _wrkDir = _wrkDir.left( pos );
- else
- _wrkDir = "";
- }
-
- link->SetWorkingDirectory( (const wchar_t*) _wrkDir.ucs2() );
- if( description.length() )
- link->SetDescription( (const wchar_t*) description.ucs2() );
- if( arguments.length() )
- link->SetArguments( (const wchar_t*) arguments.ucs2() );
-
- hr = linkFile->Save( (const wchar_t*) QString( folderName + QString( "\\" ) + shortcutName ).ucs2(), false );
-
- linkFile->Release();
- }
- else
- qDebug( "Could not get link file interface" );
-
- link->Release();
- }
- else
- qDebug( "Could not instantiate link object" );
- }
- else {
- IShellLinkA* link;
- if( SUCCEEDED( hr = CoCreateInstance( CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, IID_IShellLinkA, (void**)&link ) ) ) {
- if( SUCCEEDED( hr = link->QueryInterface( IID_IPersistFile, (void**)&linkFile ) ) ) {
- link->SetPath( target.local8Bit().data() );
- QString wrkDir = QDir::toNativeSeparators( target );
-
- // remove the filename
- int pos = wrkDir.findRev( '\\' );
- if ( pos > 0 )
- wrkDir = wrkDir.left( pos );
- else
- wrkDir = "";
-
- link->SetWorkingDirectory( wrkDir );
- if( description.length() )
- link->SetDescription( description.local8Bit() );
- if( arguments.length() )
- link->SetArguments( arguments.local8Bit() );
-
- hr = linkFile->Save( (const wchar_t*) QString( folderName + QString( "\\" ) + shortcutName ).ucs2(), false );
-
- linkFile->Release();
- }
- else
- qDebug( "Could not get link file interface" );
-
- link->Release();
- }
- else
- qDebug( "Could not instantiate link object" );
- }
-
- return hr;
-}
-#endif
-
-#if defined(Q_OS_WIN32)
-void WinShell::createInternetShortcut( QString folderName, bool, QString shortcutName, QString url )
-{
- // Add .url to shortcut name if needed
- if( shortcutName.right( 4 ) != ".url" )
- shortcutName += ".url";
-
- // ### maybe we should use some Microsoft API instead (IShellLink, e.g.)?
- QDir dir( folderName );
- QFile f( dir.filePath( shortcutName ) );
- if ( f.open( IO_WriteOnly | IO_Translate ) ) {
- QTextStream ts( &f );
- ts << "[InternetShortcut]" << endl
- << "URL=" << url;
- }
-}
-#endif
-
-bool WinShell::createDir( QString fullPath )
-{
- QStringList hierarchy = QStringList::split( QString( "\\" ), fullPath );
- QString pathComponent, tmpPath;
- QDir dirTmp;
- bool success;
-
- for( QStringList::Iterator it = hierarchy.begin(); it != hierarchy.end(); ++it ) {
- pathComponent = *it + "\\";
- tmpPath += pathComponent;
- success = dirTmp.mkdir( tmpPath );
- }
- return success;
-}
-
-QPixmap* WinShell::getClosedFolderImage()
-{
- return closedImage;
-}
-
-QPixmap* WinShell::getOpenFolderImage()
-{
- return openImage;
-}
-
-QPixmap* WinShell::getFileImage()
-{
- return fileImage;
-}
-
-QPixmap* WinShell::getInfoImage()
-{
- return infoImage;
-}
-
-#if defined(Q_OS_WIN32)
-QString WinShell::OLESTR2QString( LPOLESTR str )
-{
- QString tmp;
-
- for( int i = 0; str[ i ]; i++ )
- tmp += QChar( str[ i ] );
-
- return tmp;
-}
-#endif
-
-/*!
- Returns the free space for the directory. The space is returned in bytes,
- and should only be considered valid for this particular directory.
-*/
-#if defined(Q_OS_WIN32)
-ULARGE_INTEGER WinShell::dirFreeSpace( QString dirPath )
-{
- QString drive = dirPath.left( dirPath.find( '\\' ) );
- ULARGE_INTEGER freeSpace;
-
- freeSpace.QuadPart = 0;
-
- if( GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetDiskFreeSpaceExA" ) ) {
- ULARGE_INTEGER ulBytesAvailable, ulBytesTotal;
- if( GetDiskFreeSpaceExA( drive.local8Bit(), &ulBytesAvailable, &ulBytesTotal, NULL ) )
- freeSpace = ulBytesAvailable;
- }
- else if( GetProcAddress( GetModuleHandleA( "kernel32.dll" ), "GetDiskFreeSpaceA" ) ) {
- DWORD dwSPC, dwBPS, dwClusters, dwTotalClusters;
- if( GetDiskFreeSpaceA( drive.local8Bit(), &dwSPC, &dwBPS, &dwClusters, &dwTotalClusters ) )
- freeSpace.QuadPart = dwSPC * dwBPS * dwClusters;
- }
- return freeSpace;
-}
-#elif defined(Q_OS_MAC)
-long WinShell::dirFreeSpace( QString dirPath )
-{
- struct statfs buf;
- if (statfs( dirPath.local8Bit(), &buf ) != -1)
- return buf.f_bavail * buf.f_bsize;
- return 0;
-}
-#endif
-
diff --git a/util/install/win/shell.h b/util/install/win/shell.h
deleted file mode 100644
index 4d5f9af..0000000
--- a/util/install/win/shell.h
+++ /dev/null
@@ -1,87 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#ifndef SHELL_H
-#define SHELL_H
-
-#include <qstring.h>
-#include <qstringlist.h>
-#include <qpixmap.h>
-#if defined(Q_OS_WIN32)
-#include <windows.h>
-#include <shlobj.h>
-#endif
-
-class WinShell
-{
-public:
- WinShell();
- ~WinShell();
-
-private:
- bool createDir( QString fullPath );
-#if defined(Q_OS_WIN32)
- QString OLESTR2QString( LPOLESTR str );
-#endif
-public:
- QString localProgramsFolderName;
- QString commonProgramsFolderName;
- QString windowsFolderName;
- QString selectFolder( QString folderName, bool common );
-
- QString createFolder( QString folderName, bool common );
-
-#if defined(Q_OS_WIN32)
- HRESULT createShortcut( QString folderName, bool common, QString shortcutName, QString target, QString description = QString(), QString arguments = QString(), QString wrkDir = QString() );
- void createInternetShortcut( QString folderName, bool common, QString shortcutName, QString url );
-#endif
-
- static QPixmap* getOpenFolderImage();
- static QPixmap* getClosedFolderImage();
- static QPixmap* getFileImage();
- static QPixmap* getInfoImage();
-#if defined(Q_OS_WIN32)
- static ULARGE_INTEGER dirFreeSpace( QString dirPath );
-#elif defined(Q_OS_MAC)
- static long dirFreeSpace( QString dirPath );
-#endif
-};
-
-#endif
diff --git a/util/install/win/uninstaller/quninstall.pro b/util/install/win/uninstaller/quninstall.pro
deleted file mode 100644
index c64e8d2..0000000
--- a/util/install/win/uninstaller/quninstall.pro
+++ /dev/null
@@ -1,7 +0,0 @@
-TEMPLATE = app
-CONFIG += qt
-HEADERS = ../environment.h uninstallimpl.h
-SOURCES = uninstaller.cpp ../environment.cpp uninstallimpl.cpp
-INTERFACES = uninstall.ui
-TARGET = quninstall
-DESTDIR = ../../../../dist/win/bin
diff --git a/util/install/win/uninstaller/uninstall.ui b/util/install/win/uninstaller/uninstall.ui
deleted file mode 100644
index 88f27a7..0000000
--- a/util/install/win/uninstaller/uninstall.ui
+++ /dev/null
@@ -1,167 +0,0 @@
-<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
-<class>UninstallDlg</class>
-<widget class="QDialog">
- <property name="name">
- <cstring>UninstallDlg</cstring>
- </property>
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>527</width>
- <height>365</height>
- </rect>
- </property>
- <property name="caption">
- <string>Uninstalling Qt</string>
- </property>
- <grid>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QLabel" row="0" column="0" rowspan="2" colspan="1">
- <property name="name">
- <cstring>sideBar</cstring>
- </property>
- <property name="pixmap">
- <pixmap>image0</pixmap>
- </property>
- <property name="scaledContents">
- <bool>false</bool>
- </property>
- <property name="alignment">
- <set>AlignTop</set>
- </property>
- </widget>
- <widget class="QGroupBox" row="0" column="1">
- <property name="name">
- <cstring>progressBox</cstring>
- </property>
- <property name="title">
- <string>Uninstallation progress</string>
- </property>
- <vbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <property name="margin">
- <number>11</number>
- </property>
- <property name="spacing">
- <number>6</number>
- </property>
- <widget class="QTextView">
- <property name="name">
- <cstring>filesDisplay</cstring>
- </property>
- <property name="font">
- <font>
- <family>Courier</family>
- </font>
- </property>
- <property name="wordWrap">
- <enum>NoWrap</enum>
- </property>
- </widget>
- </vbox>
- </widget>
- <widget class="QLayoutWidget" row="1" column="1">
- <property name="name">
- <cstring>layout2</cstring>
- </property>
- <hbox>
- <property name="name">
- <cstring>unnamed</cstring>
- </property>
- <spacer>
- <property name="name">
- <cstring>Spacer1</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>90</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- <widget class="QPushButton">
- <property name="name">
- <cstring>cleanRegButton</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>Clean Registry</string>
- </property>
- </widget>
- <widget class="QPushButton">
- <property name="name">
- <cstring>okButton</cstring>
- </property>
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="text">
- <string>OK</string>
- </property>
- </widget>
- <spacer>
- <property name="name">
- <cstring>Spacer2</cstring>
- </property>
- <property name="orientation">
- <enum>Horizontal</enum>
- </property>
- <property name="sizeType">
- <enum>Expanding</enum>
- </property>
- <property name="sizeHint">
- <size>
- <width>100</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </hbox>
- </widget>
- </grid>
-</widget>
-<images>
- <image name="image0">
- <data format="XPM.GZ" length="26835">789ced5c595323bb927e3fbfa2e3e8edc6842ed8982526e601b0318bd97726e62125956df0868d59cc8df9ef93ca452e6f34f4e1ccf4c37405747fae2a293fe5a24c49ee7ffee3c7cdc9e18f7ffcf38fa7210ceffd0fdf84c18f7f84e74e67f49ffff51ffffae3cfe5a5a51ff1a7b8b1f1a3f0e7bffdf1a7811ffe8759a23f842b09af13be51bcccf78de015797e27617efe5ab13c6f05afcbf3eb09d3f3f0a0989ff7cd84f9fea360cfef879030dfef335e16f9bd172cf2c125e1f524ef6dc22cef9a62e9ff30616eff4ab0ca5f4d98efaf2a96f7af13e6fb15c122bfbf4f98fbbf532ce355669cf81c27cced9d28e6f68d132cfcec86609117b6044bff8efac7d6a43f7fc358fb0be78af9beeb09d6f1eb0bd6f1180896f6cd2ae382b467af04cbfb595bb0bcef6b84d7f579680896e7c32061e26b2f056bffbb82d53e2e222e2cebfbb02158c7635bb03c6faf1917d5febd6079df497b45ed8fdfdfd0e7c36dc2ac9f4cb0eae342b0f67f2c58ede18d319a1ff747fe541cf7772258f5779430f75767acefdb9b84d93eae0497e4fd52c2743ff4148bbedf046fc8f3649fc5241f5c0bd6f61e12e6fe1e15737b765db0b4679e12e6e797040791ff3c61baef8b8ab9bdb0c1b824fd7b8a072b056dcfef0a96f6fc4ac2ccf75531b707cf8c4bcacf254ccfbb8162f14fe92ff55f4a989fbf51cccf674dc1c2dfde26cccf9f12067d1e7604ebfd57c5c27f59b0f07119e35591cf913d940aa5c0f1213c292e6c90bc7b8c57d53e8e158bbece048b3ce12061eeef50716199da7b16acfadd502cf25c0ad6f1e7f651de22bdefac60b59f9262894f2058ed654bb1c8e7046bfb7a5ff4ebd37d89c79b8a597e77ce784dc7634fb1c8ff9e30bf7fa498df0f6b82d51eb61366794031bfefc9de578bab1b45d6c750b0c8e7cf14cbf8de2ae6f10a59c2f47e28325679a19530b7b7af58f8ae254cefc3bd60912f5414f3f3504a98fb6b286679b28e60d1bfdf51ccedd953c5dc5ea6f2a93ec85f565deaff5eb18c6f2b61eebfad58fad7e7c51e7c3b61e67fa958c6f324616acf6482351e0c1266f9de15cbfbdd84599e3ae3f582f0bd532ccfaf27ccfd51bc5d2beafb6e55b1e8b7c038bd6f13e6f79705aff27dbb9630cb73ad98db83a66090fb778aa5bf15c199d8073fefd2f325c5d25e59b03c6f2e13667b0a8ac5bf1f196fc8f86446b1f02b24ccef8f14f3fbf644b0f009f23e1464fe23fb5a5f49efbf28e6e7fd51c274df2e0996f18243c5624f8d84d93fdf05cb78002816796cc23c5ebb82753cf719abbc7ea458f8937daffbf4fe9260194fbbaa58ee737b1e94af572c7cb384f9f9a160b58fae62d1e75bc26c8f34be1b2bda7e962996f1a80b96f7dd71c22ccfabe215aa2fc263c240f6a2efeb78d6144bff4131bfef5612a6f7dd48b08ecfb26296c79c26ccf755be4cda1b32760589572f8a25de541366be65c5a2ef31e6f6453eb72af9d046c2acef55c532de5630c87c799830c7bf9162997f760567d2de9d62c947683edbf03a7efe5cb1f07d4a98c60f2e04cbf89815c5fc7cc6e3ef95af394a989fef2a16fd5e264cedfb8660198ff09230cb7fa058e66f9f30c707ab58e2db96628907db09b33cfb8a459ee384499e50535ce27af741b08eff5bc21cbf1f154b3e344c98e5bf502cfedb4f98ed6153b1f8632f61bedf129c493ed84b98fbd7f115fdda4ec29c9f14154b7c394898fd27bd2fe3c5f6e57d51fa6b24ccfdd5154b7fed8439dfeb2816ffd84e98f948ff7e4dc6f33e6196f755b1d86b53b093f84df90d94923ddd24ccf6baa698f517fa82355e9d29e6f7cd30618e17d78af97d58162cfa74a058f479a558f455562cfeb49930dbfb4031b7ef2a82459f50502cfeec12e6feb57dd127ec25ccf1f149b1e8f33d6196afa498e5f3a97fe19ffa17f99e19277b6826ccf610148b3db884f9fe9362f1cfd784599e37c5226f2161e673a098e5b535c1623f1612a6fe4e878a451e9330cbd3572ce3b79f30dbc78b62f1c76ac23c1fea7838e97f9030b7ef154bff59c27c5ffb73e28f7b09733c5e532cfdeb78d5a5bfe784d95f54debad8cb56c21c7f78fc83eadf9f2ae6f1846ac26c9f5b8a59ff9eed37a8fe602961d6cf9d6289ffe709b37e2b8ac5df2e12667b2b2a167b6b0b16fd413161f68f8e62c927d3f3228ff62ffab3a384f9be512cfc571266fe0f8a85bff627fa75278a45bff709b37e5f14cb78f512e6f1d8532cf2ed26ccf3d3b362b1f79d8479bcd6154b7cea0a16fbf08f09b37db4148bbc0f09f3fd9a62f1cfa384595e1dffbae46fd58459de03c5920fb0ff8720f1c12d2996f8b5ad58e687a384d9ff68be7125d58f3709f3fcbcaa58f4b3ac78d5d1fd75c132deaea558f2b1f78459fe8e62b18776c23cde5eb1cc27cd84e97e0682653c61a858f4aff2c8f89946c2dcff9962d17735616ebfae58fadf4b98e5bb659cc6b7af58eabf9162d15f2d611e9f65c5325f5d25cce3fd2658fc2bec2816f90b8ae579b22f17923e3a8ad78a844f05bb35ba0fbb8295df49c2cc9fc73fa83c70a658f4bf9130f77f2558ec276c26ccf70f154b7e47f6e05715670f8245dfa7c3bfefb226ff6fbe1206bdbea7afbf9bcb873c7f3b2e6389f2d7d7defbbdb94c4a19fffe2e89ff4e2e3f67b7f0b9e83d2eef51bf1f9769361f3c67be8fc9ff0e97cf58e1efcbe56bec7e372ed6d3ef803f99cdf0771d2f379e51d49a6cc0cf3dfe3408d51167bf1717dbb40dbc82c857174ef77865c22590dc863ee57f33e7f05d4cbe878b7dd091c6bf513fc42b5a4f64d8b22d7a263047d154db76f0a74bd7b7b1f9361b6b3213e2a29ed0144ebda83389c01dfb88bf9dede365488b8ddf870bca1a251e208f28355eb97b461844cf89d23f219721fe76a88ff86c7ceff9b79af7077479b224635f50d627fb6adfec08af77bb89d796ddc6ab6c2b76c756f1d35dbb67f7f1598fef1dfc665c6af610ff756f8f50c6114a7c6c4feca93db3e7f6c25eda2bba2eedb5bdc14f6eed9d5db2cbb6608bf87cb02bdfc3e4735c16cd03b939a28136f3842c4a76d5aed975947a038dcbd08f31902e439f59e38c37c164a66e47a64136e7c62dfe7d5c62eba6893ff78464c6c088da340f76605af8bb6bdaa663baa6671e4ddfe4ffc082cb08ab8179b2a766689e519f6df49f8179c17189712e4687f849dd3e7c3717bceecdab796526e60d6de3017b5ab1c18cccbbd9345b66db9449fa8a5cf359e8dd1d53256c91fdaed933fbe600a5c788877d64e44b6deca7763a34877f0797a9cf7b18938aa88f23736c4e8407a08c1f311973613e207ca2cded99537386fa79b45d8aef4d9a6f8d7dfc3e2e910deae45e6c2c5a345a16feab63cecd85b93457288bdacdce420e7936d7e6062f66738bfab9a3b79d5932cb76db144c112d4bfd9074f37d5c50cfaf631de175883a79428dac989259257d5c9bb54ff198af9fc86c9dc66260363006eedabef4e52503fa543efa152ed44acd0258fb82e200b8e4213acef33d7e9ed5ed4c71b9a127908dbd006f0b6684f6d520368dcfe6d65f995f948b7d4261026424355bd6acacd3e39e8f0855bc7684d10ebd0de91e4637a8e30cf46e62bed68833d7dfc605305a8eec1d348409cbcd32cdf298c479a620acc6ade4e23564d0b465d3c63ebf990bc5e1a8e926c6e2275b817b7b99fa372411244b1beb607a36512daec3c384eceb53fae4c8368016b4a1631ea01b638048d28b59c25fe3821cc0b46c0f7ad8cd9d30614de4b513795ce335b69647bcfa6695b31894af9f63b54eefb39759c910d48bf0137b0d037882a191b99233f158612c92f3937a0914f19d39473f6924bb998cb3636d187844b93378c6b17d81579c81f6f1eac21b8ce01d368d872d923d8ec7383aabff2832b00d65d3414b88594686b3f3540d3a6d6f9fe2d2c339be8133e3ae5d128fbf9e60b233c1a38223ba831caab08b71fb1cf630677e857d9c0563de398203a8c1211cc13132c6c7e184343a393215eac5e233a77046f99ae64e58d1fd152e1883bbd6c1395cc0738ac131285fc2a530d9812bd6075cc30ddcda77b8832558b68f508022e6cf5c6dc68aa58bd21c9906acc02b94306fde9016d76035c727d91db6b786d583c36ca013ab37bcee7f9d0be5f42bb06e2eec19ce27b9a8434c40626a1cc50d4c778d1d3970b1fa8a36d1c46b1c7d6a78c54a07301b2dda5de75d7099ccb69022a17a21406cb7ecea186d7a54c3f5a9aa7b99643266f3192e3163710dd7a45e351ae5628fbb8f4cdc03bcd88a6bd9e0dae38b183562fea31534e7429841765cc7beb9ae3d866bd74b3151a322a47efaeed1ee219b2155a59db4a2b390cbfc3827cfb65c1fedab2e79faa45d9304f0e806ee09da76e886f4fc336924c895f25264508fb646ccf8efccbd9815f74abe63a83dcea04dcab98d7b7358e5a0263be437d98c7c135ca62d0f7b7aa0d5141fad020a98d51f4b5fe319f136f61475027df7ee36cd798c38d33dc41acbdcdb81dbc2485427ddc4567beac7b6e1b63132acb8776403e4339319048fd6b1adbab2abd07a889f9275ca5fe6cda6d4a7c759b78995d6a6db99885e791b2b9b3d3772558c545df6ef311f696980ad34a256dc2e3eb3eff6dcbe3b7035db41dbddc2cfeaf6d59cba43f2c6e90c957a7447ee18ce5dc53dbb13f5405d3f9cf5fd692e512bf89eb72ddb8536565a65b2e44a9a1d53ede14edd1946eb23b29eb13ef2baf1d1e7b0b55e8c86b6e4cedd85bbb4658c4f435a8b69d8babb72d7ee862cd8cce1d2335bb612e389bb8dda1119a7d6d5e771a19991b8c4bf016739ac19c7d589915c9066007707afb680d6554f2b4b7e0e97815bc2df1db7ec0af694d6020670e48a587be13c8e36e863beea565c89e65998b90c4ab082e3e030be371745a9b95ceae358807adc75ab512b3c83249fa7fc1e67e65317d71e7aa293c3b4129bcf0407a8dd1eb5b4e9d6900979b6dd4036eb68391bf8ce3356db43388391e44733191d3ce22099983b2f8eb8f3b990a7504687b1b0e41e482bf9e842f334b60f18abcb927946af68e98aea049798eb764cc315bdc3ead1c4bc05f34be33d66a965f782b3cd7dacefb0af0a3e61139bc405c7d1f86086381a1bd15a66ed6b968be822482dd7b37d38f71945ff9d892c728dc6aaeeebb0ee1b1421984b8357c3a7b99c4629cedc1aadd2ecf8267259f5f7d842c39efa07f49b3aaf7aba1abcd98b592e64dd03dfc2ececf1e75cf29a49b27471a40ad09c8ac540d930c62fdf76719db8e63bc2a541ab0d7569ad46751bb588ba2bfb2ee52beb390b224bf3ce791be71d6cc3d47ccfdba499299f895606058d6193f178924bce4732f1e410ab15bb4e5cf2b912fd1b33c85b8cf96d9c1761721c38eff18fc40545432b2f430b7532ae4fc6d50fd271efb6644698f51d5aeffb7e60af932de73583f5266671059a63781eceb15ac8c5c4bc23fe1b73dc636a79ba468cd9d78e7f722ecf25f95b13a53ac08b2201ce1d177e680624dd0d6998ffac4b1566ec957ff62ff625b680b35419b3ecc789fc42ac0c2539c248f6352e7564136533c8e5842c23af15cecf0798d5df59e432e1191ab70efc2b45af3aeaa4847e32c8555a9c3bdae47b7189fccd8f6c912478c1faeb0533bf692ed827dae3bbdf642e7979177121a61db432e2825e799a7a555fb9a178bcedb76029e691b35cd0ba0e69a6e9da2266ffef34cf82bfcf79b4b6c9bc56fdb62fbb3249807a749b5825cdd10b0ef000e798e698cb22dfcf718933127319619e6f66b8c4569f6117eb93c8a539473387942f9cfb8adfc11a723a1bd55c987e63cdf38e1e5fb5d1b6c13cd8bef37e773a17e7c8e9b19a438f69ce9f2fe772c17a876cdda0e79fcfd14b9c59f6a1ed0f629b5098994f6256d2715564e290c958aaea4c9c35bee687b68439fd3e56270fb427d8c76a744ff492bcd41f92069750a238677c854b866dc6d5a37789f6d35c2afe08abdf3842017f4fed38e2db9477d9d3c8c41f27265593d750b4bb9a3f3117d08bb500e76d3886680de831e5296f21cbb617fef4ab5cf087b8f85e6ef548b950b58715ee1356bf8099deccde2946f2375b82f71835fcf18cb568348eda3d33170e682dbc213b7ed163defc39653aa9c214ebc49c09e7a90baa5703658d33be9f8f07c42748ad14b95c4d8d0f676203d3c5f9ed9eaca919eb13ca7a0632c7efa1846b98ade8cad8e42a66bcee62eeeb2ffd55f439aa64d016503b9e6a9b27bb8d3d68ed92e30f0dcc1eca24a7a3e83c91dde7b950d536ced963fbdb73b850e431fb36f65c8bbb326419547fc69d3e57f6a738330ee4f97c362a6bad1eb3067fe36f3d4525df31affe8e6cac473553166d1b7b48fa1b5fbef6552eb46ad2a4597f5b56c326ed1c6737b38fde4a5a20ff68989669d17acd9e3b8396afcd5421f919ea9a3c6ec92f9b4e8c1f51bba4939e39a4117cb225e132a5196c17ed81463a71996f63b19e652e34ef13177b39870b604f2835ad5c7baec089bfc3aa7c1fbd39669096e693d93a91dbd8211bdb47de7bf63166c9a8df17b2af9e6dc7b97f3e171cd92e2c7dc425f98ae694bc9a15b9948d9fcba58ff9ec1ef6cb5c62dd1e57be767d45ea135d1f9a8c5dd3ad386841d58e5027713e8a7b95b1e73eec432dd9e824976d64cf5ccc4fe6fddc7d64e2ec93b9b03773a290813ec4bdfb5eb4b1681d58b33bb71ce713ca5676644556198ded6b1cd3382b1bf87d8c137bb4e3daa295278c0438c716a03f6399f1ed13cc09f6347e7d860bb61bada66b3b381f1693f7e6e3a9c1883bc2e706317b4349ea581f16a12459fde4eaf26495388eb13b340bf7fd99ddc2da621f47a6c5f9821df91dcad8c66fc93abc5f714517a3f657b8dca3e520175bf5a539352b5601b00907685903b4f506feecdb12fac94098e47763e654bc546d4b4484b8dbb9ec57fd9a6d4bef31db38a33a769a0be6e638ba179c214f3359646314f3a3778dfc3a6513158e3e867328e482f9f729f468ed0be328f41ccf6ed7fe7ac2c6c5c66095b2b87ced32b12b00f77e036b65ac196d0b3a18d3b74d7eb7ad223fb430825e1ce631c9d7c853fe1253f1981d16bc97fa85d7c36505db6e046b77a586ac07e32ec862388baeca1ca9bab9a3dfb713316d3ce3c4bd968d0058b79cd3999f57ff2e33a572d9911f0760474ea3ed4fb8089b40d598b1bd1851a816d35d09b59db84f74845e5b8e953ace8f0781bdfe5ab8b2eda4f8eb6f40a59a7792816a65cc272fcc79f080d970b285c425ae5ea02438ba792e9355ff78dd32c7a54e3b3731bfecdb8209c976930c013f83637835cfe85371a5aee62bc8cda177de8b4759d105c5de90858c6ae4f1a84c44465ac7d8827b3374de0cc9c2c69625f6859f05da594a6b563c23cece95e2757a263272f174f66837d48d31d3e729e2483d864668ba0e9d5979c47cf001eb80be548cb9fac494c3bdbb0e0fa145eb49f35625a4d2c416dba1e34f2447ce5b24a9ce64a6813d8dcf4cb80fb938e16288cb01d6dfbdd095550765531564422f3cba17591b1cba65b70ef7b4bf9cab1931ab3f0b7dcce2dbee0ce792c1148bf1dc110712c2203c996d33b32f12239faf852156076fb2a6c435e34fb968c61c9e914dd756cc13594c75c263aea3ffbbcc75e94cc1033ef74875e4258dbe445168f813a8622edc0c2fb0075564d39f5b01ac139f9b5c9c9bcaf671705f6dc5391b7ce7335c267dc9367ccc2d56dc55e0f520e5c2b6738dd189727fd80f6f9855229f30827358c15af2912d8deb139ea7d1f71ec3bb2be227d367cad4ce62a45ccb696aacb5e87565bf1f36dd068e5a3355b1661197e90897f83d61deb04d5e2d71992c425794eb66c5be9957136b9903f49d57f41b17d751ec15d6f157710e42e1b12e88b5a35f3347762db706336b6bf36dd0982b8ca87b719e10d9682551e3d5ec5c39ffc24cab1178cfe246b9a0fd5634db75a7e6226cdb36fa57b4c93ad6352577e9dfdca5dd76555a9fad637dd2c0bf0fd11ef7423954c6b5b3c4bdc96b5a6fd17de3690f8763a52bbcc265d1fad8222e582776692ffc36ed5d731c208b404b7250735718bf57ec8169d910764235ecfa327a7cdc5fea51ce1635d742a6fbbe1af6bca319787ef59ce724cce038ecbb3e8d869fb49a4539cc022ec139ac998654f3e6aac3fcbc1d0e420d87af432bb787e60df3b322f2883ba571353766f21e3350debb6863b65272716eb733ab60f3195918d85d6ca386d1a8c12bf7f9959fcf7389b52b2c99158c66d32710d9ce622470eec6ad844388b514d52274923c9e637c88a7e87844cd4bccdeb0bdb82fbc82f19b56fd930fceea43d1921b8523db0acf188d7a93fb3b5fd40bf80e143063b6a93e9aae2beea2a59927ac692a389bbd9ceaf96bde278b3bfa8714e978cd08fbc7d8fa168e431b6b5e909c75f6d2334c58f741f4fa1a5d1336f62b5c5cc5b542df94d25afdf45e2fcd8bf612fd20b3dbd833ed286335f0403a1aa41d70a0b5aa26ce1217e1249c86b3dcf8cf6a07d984f370112e319e681696fd35bd60ff4d28842bb34911c08ca5cff9afe159c55e846b33c40a64944eb1c4d3ee9eeacf8c90818e7d05136e3063b99dcbc44cfcee873b5ba27dda8c2cb79ee7b2a8de5f74b9b6bd376f387b8fc29239c9d51ff99ec7d114f9986338c4f93e9e5a3ea7d32c2656f1a68d33c42e3e7401876119f80c703aef30e327a94dac6f8efc168e0e674b8df1ac32c9e753beefa018d78da1034fa1202795389b3126bff39776bba00f0d7b01cfa1c867aeecb6efd9edd00d2b98d91fc3b6ecc6c4eb26c76591ad617e019b7e60ce62a4744bb23ae67e89cb13edb3c4b5e3755b0e258aa6e3b596492e12a5f942bb73e863ab66151a98750e481379b9179f63ce5f96779d7d05e75e23fb152ebf2bfa697f09d089395ddc298022d67e9819718501bca6397bce72d2eea7adb06ac6275fa76bb2ea825c2d66775b7ec716ec4bfefb32bf30bf38bfc967745c0596e13cacc23bd0770fa0924e5c4df63d89afa7e49ec7587fcf5d4fa33d3fccf0c29a1dcaded02fc5319adb5e502385b8328b6c8a61dd3f41597633ccbc3a51fc293fa74eea6c71f6b2e0f31825b156dbc8ec787dff97b8c4dd2f172300fe8df39579806178cf0c5c93fd7f7c823f56fe553927fa310bba1bce17446964622fdc23c6423e3bf4933df1455706e60173ac389ff7dcb3ad650e671c97f970e9ea0b6aab8f477ad2fb75a5c9d05c7221df3a99e0819eff68af83b5551cd37a9ecb97e3d8cc7e646ccb95e10973c447f7f65336d30ca6b954e47b3f4bf0162ec3ddc4c95f5af18d7316bc99675a1b7b9895ead7b9d02ec50b7d93ad688b59b067eec8f5a4ef49df9d97edec4c31a281876318b811d6d17b31878ef50dd612c774d7114b0f712fa39b4e5dc3f770a1959718581eed10f6b12e6e6759d8c25830fe0e0c9d8d356bfe70e6b42eafcfc673b3fcc7e25b57c1857dbb8bb9705c2d7d7345d8a49569cb1e1fbfad8039f879acf778de9f94ec2bfe32c988a3017d5faf4f15ca10f38173730e711ff50933dfc9aa645e54d075166b2fc36bace4ecc8c56f89b4688770689efd80d858ca20b63d3a2c32c17e4deb23097fe57b7c5895189a6f0cd999336ff19c3f46b6badbcce2ca4b3d7df76dba7634921338c8b266768fdaa8640f98a539ac0562a555a34c7868776d296b656dd2c921f9499b7aa66f917c2b178e8a3dfd0eae3b89fbc958e33ca17e3ad0861573e4df61e0f7cc12cab20d0d5ff335cc62b6cd895f811d2c63c09d61e6d9809e8ba7a84dace0a8d2e2d34021ee15da42d6c99a188523932e8d6083f2ca6fb0b1f185759527dddcd3faa6c1eae6c4dde22721bc8417db45569829a0558cc0f8535b7667eecc744d17e5afbaa2f358b19ddb5757768ecf06d82e65f371573ceebcd6716c1ae891fd80c510f42876d573f2f7266dfe6bbe3f473319ed686696ce50b35e62ce879c4e520f58f3a0b50cfd054a5dc62abb0d4bc4009ce373e52a91ec30f08e7da073be4b74a2f881b4dfa3bff99bdb916ff6bd5c26753ca969cb67a29ae3d3d6136fcc7c92eecc9cd4fbf9b746ffba8d7dc4843e6f4e5ed3cfce709f7edf8cbf053bf1e94ffe6f8cefe52265cbc4c8d32e2e5f33e7f0e5d23548c5462bad31afefe2323b72935c663e5fc065fe08d87432339757b8f1897065f01d5ce6dbd124978fff97a485d625dafac8fabe32ce5fe1f2c1fab9997dfe6326b2b7bb405f133afa80d157e3d867b87cae8585f7276a11f120c8e3c5ed86e7f0fc9d5ce6c42133fdd4873d4c7d5f624a83dfc8e5e7e3faddd767fb9b1ec9ffcbff7fecbbafffe7f27b5e7ffef7bffff13fdcf4c93e</data>
- </image>
-</images>
-<connections>
- <connection>
- <sender>okButton</sender>
- <signal>clicked()</signal>
- <receiver>UninstallDlg</receiver>
- <slot>accept()</slot>
- </connection>
- <connection>
- <sender>cleanRegButton</sender>
- <signal>clicked()</signal>
- <receiver>UninstallDlg</receiver>
- <slot>cleanRegistry()</slot>
- </connection>
-</connections>
-<slots>
- <slot access="protected">init()</slot>
- <slot access="protected">destroy()</slot>
- <slot>cleanRegistry()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
-</UI>
diff --git a/util/install/win/uninstaller/uninstaller.cpp b/util/install/win/uninstaller/uninstaller.cpp
deleted file mode 100644
index 9a7c529..0000000
--- a/util/install/win/uninstaller/uninstaller.cpp
+++ /dev/null
@@ -1,142 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qdir.h>
-#include <qtextview.h>
-#include <qpushbutton.h>
-#include <qmessagebox.h>
-#include "uninstallimpl.h"
-#include "../environment.h"
-
-#ifdef Q_OS_WIN32
-#include <windows.h>
-#endif
-
-QApplication* app;
-UninstallDlg* progress;
-
-void rmDirRecursive( const QDir &dir )
-{
- const QFileInfoList* list = dir.entryInfoList( QDir::All | QDir::System | QDir::Hidden );
- if ( list ) {
- QFileInfoListIterator it( *list );
- QFileInfo* fi;
-
- while( ( fi = it.current() ) ) {
- if( ( fi->fileName() != "." ) && ( fi->fileName() != ".." ) ){
- progress->filesDisplay->append( fi->absFilePath() + "\n" );
- progress->filesDisplay->scrollToBottom();
- app->processEvents();
- if( fi->isDir() )
- rmDirRecursive( QDir(fi->absFilePath()) );
- else
- QFile::remove( fi->absFilePath() );
- }
- ++it;
- }
- }
- // Remove this dir as well
- dir.rmdir( dir.absPath() );
-}
-
-int main( int argc, char** argv )
-{
- app = new QApplication( argc, argv );
- progress = new UninstallDlgImpl( 0, 0, 0, Qt::WStyle_Customize|Qt::WStyle_NormalBorder|Qt::WStyle_Title);
-
- if( argc != 4 )
- qFatal( "Incorrect parameters" );
-
- if( !QMessageBox::information( 0,
- QString( "Uninstalling Qt %1" ).arg(argv[3]),
- QString("Are you sure you want to uninstall Qt %1?\n"
- "This will remove the directory this version\n"
- "of Qt was installed to, along with ALL its contents.").arg(argv[3]),
- "Yes", "No" ) )
- {
- progress->setCaption( QString( "Uninstalling Qt " ) + argv[ 3 ] );
- progress->show();
-
- app->setMainWidget( progress );
-
- // Delete the two directories we have written files to during the installation.
- // The OK button is disabled at this point.
- // Messages will be processed during the delete process.
-
- // Check if moc.exe exists, if not this could potentially be a
- // corrupted registry setting
-
- if ( QFile::exists( QString( argv[1] ) + QString( "\\bin\\moc.exe" ) ) )
- rmDirRecursive( QDir(argv[1]) );
- else
- QMessageBox::warning( 0, "Uninstalling failed", "Qt could not be uninstalled, you will "
- "need to remove Qt manually" );
-
- rmDirRecursive( QDir(argv[2]) );
-
- progress->okButton->setEnabled( true );
- progress->cleanRegButton->setEnabled( true );
- /*
- ** Just hang around until someone clicks the "OK" button
- */
- app->exec();
-#if defined(Q_OS_WIN32)
- QEnvironment::removeUninstall( QString( "Qt " ) + argv[ 3 ] );
- QString qtEnv = QEnvironment::getEnv( "QTDIR", QEnvironment::LocalEnv );
- QString pathEnv = QEnvironment::getEnv( "PATH", QEnvironment::PersistentEnv );
- if ( qtEnv == QString(argv[1]) )
- QEnvironment::removeEnv( "QTDIR", QEnvironment::LocalEnv | QEnvironment::PersistentEnv );
- else
- qtEnv = argv[1];
-
- qtEnv.append("\\bin;");
- pathEnv.replace( qtEnv, "" );
- QEnvironment::putEnv( "PATH", pathEnv, QEnvironment::PersistentEnv );
- if( qWinVersion() & Qt::WV_NT_based ) {
- SendNotifyMessageA( HWND_BROADCAST, WM_WININICHANGE, 0, (LPARAM)"Environment" );
- SendNotifyMessageA( HWND_BROADCAST, WM_SETTINGCHANGE, 0, 0 );
- }
-#endif
- }
-
- return 0;
-}
diff --git a/util/install/win/uninstaller/uninstallimpl.cpp b/util/install/win/uninstaller/uninstallimpl.cpp
deleted file mode 100644
index d30358b..0000000
--- a/util/install/win/uninstaller/uninstallimpl.cpp
+++ /dev/null
@@ -1,75 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "uninstallimpl.h"
-#include <qsettings.h>
-#include <qmessagebox.h>
-
-UninstallDlgImpl::UninstallDlgImpl( QWidget* parent, const char* name, bool modal, WindowFlags f )
- : UninstallDlg( parent, name, modal, f )
-{
-}
-
-UninstallDlgImpl::~UninstallDlgImpl()
-{
-}
-
-void UninstallDlgImpl::cleanRegistry()
-{
- cleanRegistryHelper( "/Trolltech/Qt" );
- cleanRegistryHelper( "/Trolltech/Qt Designer" );
- cleanRegistryHelper( "/Trolltech/Qt Assistant" );
- cleanRegistryHelper( "/Trolltech/Qt Linguist" );
-}
-
-void UninstallDlgImpl::cleanRegistryHelper( const QString& key )
-{
- QSettings settings;
- QStringList::Iterator it;
- QStringList keys = settings.subkeyList( key );
- for ( it = keys.begin(); it != keys.end(); ++it ) {
- cleanRegistryHelper( key + "/" + *it );
- }
- QStringList entries = settings.entryList( key );
- for ( it = entries.begin(); it != entries.end(); ++it ) {
- settings.removeEntry( key + "/" + *it );
- }
- settings.removeEntry( key + "/." );
-}
diff --git a/util/install/win/uninstaller/uninstallimpl.h b/util/install/win/uninstaller/uninstallimpl.h
deleted file mode 100644
index b3bff36..0000000
--- a/util/install/win/uninstaller/uninstallimpl.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
-** Contact: Qt Software Information (qt-info@nokia.com)
-**
-** This file is part of the utils of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** No Commercial Usage
-** This file contains pre-release code and may not be distributed.
-** You may use this file in accordance with the terms and conditions
-** contained in the either Technology Preview License Agreement or the
-** Beta Release License Agreement.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 2.1 requirements
-** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain
-** additional rights. These rights are described in the Nokia Qt LGPL
-** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this
-** package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3.0 as published by the Free Software
-** Foundation and appearing in the file LICENSE.GPL included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 3.0 requirements will be
-** met: http://www.gnu.org/copyleft/gpl.html.
-**
-** If you are unsure which license is appropriate for your use, please
-** contact the sales department at qt-sales@nokia.com.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-#include "uninstall.h"
-
-class UninstallDlgImpl : public UninstallDlg
-{
- Q_OBJECT
-public:
- UninstallDlgImpl( QWidget* parent = 0, const char* name = 0, bool modal = false, WindowFlags fl = 0 );
- ~UninstallDlgImpl();
-public slots:
- void cleanRegistry();
-private:
- void cleanRegistryHelper( const QString& key );
-
-};
diff --git a/util/install/win/win.pro b/util/install/win/win.pro
deleted file mode 100644
index 470fa03..0000000
--- a/util/install/win/win.pro
+++ /dev/null
@@ -1,136 +0,0 @@
-TEMPLATE = app
-CONFIG += windows qt
-
-HEADERS = globalinformation.h \
- setupwizardimpl.h \
- environment.h \
- shell.h \
- resource.h \
- dialogs/folderdlgimpl.h \
- pages/pages.h \
- pages/sidedecorationimpl.h
-
-SOURCES = main.cpp \
- globalinformation.cpp \
- setupwizardimpl.cpp \
- setupwizardimpl_config.cpp \
- environment.cpp \
- shell.cpp \
- resource.cpp \
- dialogs/folderdlgimpl.cpp \
- pages/pages.cpp \
- pages/sidedecorationimpl.cpp
-
-INTERFACES = dialogs/folderdlg.ui \
- pages/buildpage.ui \
- pages/configpage.ui \
- pages/finishpage.ui \
- pages/folderspage.ui \
- pages/licenseagreementpage.ui \
- pages/licensepage.ui \
- pages/optionspage.ui \
- pages/progresspage.ui \
- pages/sidedecoration.ui \
- pages/winintropage.ui
-
-win32 {
- SOURCES += archive.cpp
- HEADERS += archive.h
-}
-
-TARGET = install
-DESTDIR = ../../../dist/win
-INCLUDEPATH += $$QT_SOURCE_TREE/src/3rdparty $$QT_SOURCE_TREE/util/install/archive
-
-win32:RC_FILE = install.rc
-
-# Comment out one of the following lines to build the installer for:
-#
-# - a Qt/Windows evaluation version (eval),
-# - a Qt/Windows evaluation version that can be burned on CD and
-# distributed on tradeshows (eval-cd)
-# - the QSA evaluation version (qsa)
-# - educational version (edu)
-# - non-commercial version (noncommercial)
-#
-#CONFIG += eval
-#CONFIG += eval-cd
-#CONFIG += qsa
-#CONFIG += edu
-#CONFIG += noncommercial
-
-
-unix:LIBS += -L$$QT_BUILD_TREE/util/install/archive -larq
-win32:LIBS += ../archive/arq.lib
-INCLUDEPATH += ../keygen
-
-# We have the following dependencies on config:
-#
-# qsa -> eval
-# eval-cd -> eval
-# eval -> (none)
-# edu -> (none)
-# noncommercial -> (none)
-#
-# For the code this means that the following defines are defined:
-#
-# eval : EVAL
-# eval-cd : EVAL, EVAL_CD
-# qsa : EVAL, QSA
-# edu : EDU
-# noncommercial: NON_COMMERCIAL
-#
-
-qsa {
- CONFIG += eval
- DEFINES += QSA
-}
-
-eval-cd {
- CONFIG += eval
- DEFINES += EVAL_CD
-}
-
-eval {
- !exists($(QTEVAL)/src) {
- error(You must set the QTEVAL environment variable to the directory where you checked out //depot/qteval/main in order to be able to build the evaluation version of install.)
- }
- DEFINES += EVAL
- qsa {
- win32:RC_FILE = install-qsa.rc
- } else {
- win32:RC_FILE = install-eval.rc
- }
- mac:RC_FILE = ../../../tools/designer/app/designer.icns
- SOURCES += $(QTEVAL)/src/check-and-patch.cpp
- INCLUDEPATH += $(QTEVAL)/src
- DESTDIR = ../../../bin
-}
-
-edu {
- !exists($(QTEVAL)/src) {
- error(You must set the QTEVAL environment variable to the directory where you checked out //depot/qteval/main in order to be able to build the evaluation version of install.)
- }
- DEFINES += EDU
- win32:RC_FILE = install-edu.rc
- SOURCES += $(QTEVAL)/src/check-and-patch.cpp
- INCLUDEPATH += $(QTEVAL)/src
- DESTDIR = ../../../bin
-}
-
-noncommercial {
- !exists($(QTEVAL)/src) {
- error(You must set the QTEVAL environment variable to the directory where you checked out //depot/qteval/main in order to be able to build the evaluation version of install.)
- }
- DEFINES += NON_COMMERCIAL
- win32:RC_FILE = install-noncommercial.rc
- SOURCES += $(QTEVAL)/src/check-and-patch.cpp
- INCLUDEPATH += $(QTEVAL)/src
- DESTDIR = ../../../bin
-}
-
-mystaticconfig {
- QMAKE_LIBS_QT =
- QMAKE_LIBS_QT_THREAD =
- LIBS += ../../../lib/libqt-mt.a -lz -framework Carbon
-}
diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit
index d4e6d9e..c26fdc1 100755
--- a/util/webkit/mkdist-webkit
+++ b/util/webkit/mkdist-webkit
@@ -185,7 +185,7 @@ fi
rev=`git ls-remote $repository | grep -E "^.+$tag$" | awk '{print $1}'`
-tarball=`mktemp /tmp/webkit-snapshot.tar` || exit 1
+tarball=`mktemp /tmp/webkit-snapshot.tar.XXXXXX` || exit 1
echo "creating $tarball"
echo "archiving webkit from $repository $tag ( $rev )"