summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSamuel Rødal <sroedal@trolltech.com>2009-05-20 16:43:10 (GMT)
committerSamuel Rødal <sroedal@trolltech.com>2009-05-20 16:43:10 (GMT)
commitbfde87dcc8d0f363ecf1da59482c15445b00484c (patch)
tree0d0c01b1611caf91ba900bd2b67a8806590254cc
parent27fadaa7eb2d58b47e7f0f508e3402e7a8de3894 (diff)
parentf9d26f0bebd5bcc32d15c4a627251c44cf78389e (diff)
downloadQt-bfde87dcc8d0f363ecf1da59482c15445b00484c.zip
Qt-bfde87dcc8d0f363ecf1da59482c15445b00484c.tar.gz
Qt-bfde87dcc8d0f363ecf1da59482c15445b00484c.tar.bz2
Merge commit 'qt/master'
-rwxr-xr-x.hgignore4
-rwxr-xr-xconfigure1
-rw-r--r--configure.exebin860160 -> 856064 bytes
-rw-r--r--demos/boxes/glextensions.h7
-rw-r--r--demos/chip/chip.cpp17
-rw-r--r--demos/demos.pro2
-rw-r--r--dist/changes-4.5.227
-rw-r--r--dist/changes-4.6.012
-rw-r--r--doc/src/3rdparty.qdoc136
-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/contiguouscache.qdoc97
-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/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/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/code/src_gui_image_qpixmapcache.cpp2
-rw-r--r--doc/src/snippets/widgets-tutorial/template.cpp14
-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/tutorials/addressbook-fr.qdoc7
-rw-r--r--doc/src/tutorials/addressbook.qdoc9
-rw-r--r--doc/src/tutorials/widgets-tutorial.qdoc132
-rw-r--r--doc/src/xquery-introduction.qdoc2
-rw-r--r--examples/tools/contiguouscache/contiguouscache.pro9
-rw-r--r--examples/tools/contiguouscache/main.cpp56
-rw-r--r--examples/tools/contiguouscache/randomlistmodel.cpp97
-rw-r--r--examples/tools/contiguouscache/randomlistmodel.h66
-rw-r--r--examples/tools/tools.pro1
-rw-r--r--examples/tutorials/addressbook-fr/part1/main.cpp4
-rw-r--r--examples/tutorials/addressbook-fr/part2/main.cpp4
-rw-r--r--examples/tutorials/addressbook-fr/part3/main.cpp4
-rw-r--r--examples/tutorials/addressbook-fr/part4/main.cpp4
-rw-r--r--examples/tutorials/addressbook-fr/part5/main.cpp4
-rw-r--r--examples/tutorials/addressbook-fr/part6/main.cpp4
-rw-r--r--examples/tutorials/addressbook-fr/part7/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part1/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part2/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part3/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part4/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part5/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part6/main.cpp4
-rw-r--r--examples/tutorials/addressbook/part7/main.cpp4
-rw-r--r--examples/tutorials/widgets/childwidget/childwidget.pro7
-rw-r--r--examples/tutorials/widgets/childwidget/main.cpp61
-rw-r--r--examples/tutorials/widgets/nestedlayouts/main.cpp104
-rw-r--r--examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro7
-rw-r--r--examples/tutorials/widgets/toplevel/main.cpp57
-rw-r--r--examples/tutorials/widgets/toplevel/toplevel.pro7
-rw-r--r--examples/tutorials/widgets/widgets.pro8
-rw-r--r--examples/tutorials/widgets/windowlayout/main.cpp63
-rw-r--r--examples/tutorials/widgets/windowlayout/windowlayout.pro7
-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/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--qmake/project.cpp2
-rw-r--r--src/3rdparty/phonon/phonon/phonon_export.h6
-rw-r--r--src/3rdparty/webkit/VERSION2
-rw-r--r--src/3rdparty/webkit/WebCore/ChangeLog101
-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/qt/RenderThemeQt.cpp4
-rw-r--r--src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp3
-rw-r--r--src/3rdparty/webkit/WebKit/qt/ChangeLog11
-rw-r--r--src/3rdparty/webkit/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp39
-rw-r--r--src/corelib/concurrent/qfuturewatcher.cpp2
-rw-r--r--src/corelib/io/qdebug.h19
-rw-r--r--src/corelib/io/qdiriterator.cpp4
-rw-r--r--src/corelib/io/qiodevice.cpp7
-rw-r--r--src/corelib/io/qresource.cpp2
-rw-r--r--src/corelib/io/qsettings.cpp2
-rw-r--r--src/corelib/io/qurl.cpp6
-rw-r--r--src/corelib/kernel/kernel.pri3
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp4
-rw-r--r--src/corelib/kernel/qobject.cpp79
-rw-r--r--src/corelib/kernel/qsharedmemory.cpp4
-rw-r--r--src/corelib/kernel/qtimer.cpp2
-rw-r--r--src/corelib/kernel/qvariant.cpp10
-rw-r--r--src/corelib/tools/qbytearraymatcher.h2
-rw-r--r--src/corelib/tools/qcontiguouscache.cpp435
-rw-r--r--src/corelib/tools/qcontiguouscache.h424
-rw-r--r--src/corelib/tools/qdumper.cpp1157
-rw-r--r--src/corelib/tools/qhash.h5
-rw-r--r--src/corelib/tools/qlocale.cpp4
-rw-r--r--src/corelib/tools/qmap.h2
-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/qstringlist.cpp2
-rw-r--r--src/corelib/tools/qtimeline.cpp4
-rw-r--r--src/corelib/tools/qvector.h170
-rw-r--r--src/corelib/tools/tools.pri3
-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.cpp14
-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.cpp82
-rw-r--r--src/gui/graphicsview/qgraphicsitem.h4
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h19
-rw-r--r--src/gui/graphicsview/qgraphicslayoutitem.cpp2
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp87
-rw-r--r--src/gui/graphicsview/qgraphicssceneevent.cpp14
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp129
-rw-r--r--src/gui/graphicsview/qgraphicsview_p.h7
-rw-r--r--src/gui/graphicsview/qgraphicswidget_p.cpp1
-rw-r--r--src/gui/image/image.pri1
-rw-r--r--src/gui/image/qicon.cpp2
-rw-r--r--src/gui/image/qimage.cpp2
-rw-r--r--src/gui/image/qpixmap.cpp2
-rw-r--r--src/gui/image/qpixmapcache.cpp365
-rw-r--r--src/gui/image/qpixmapcache.h27
-rw-r--r--src/gui/image/qpixmapcache_p.h96
-rw-r--r--src/gui/itemviews/qabstractitemview.cpp8
-rw-r--r--src/gui/itemviews/qfileiconprovider.cpp12
-rw-r--r--src/gui/itemviews/qitemdelegate.cpp2
-rw-r--r--src/gui/itemviews/qlistwidget.cpp2
-rw-r--r--src/gui/itemviews/qtreeview.cpp4
-rw-r--r--src/gui/kernel/qapplication.cpp6
-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/qwidget.cpp23
-rw-r--r--src/gui/kernel/qwidget_mac.mm28
-rw-r--r--src/gui/painting/qcolor.cpp4
-rw-r--r--src/gui/painting/qpainterpath.cpp2
-rw-r--r--src/gui/painting/qprinter.cpp32
-rw-r--r--src/gui/painting/qtextureglyphcache.cpp11
-rw-r--r--src/gui/painting/qtransform.cpp8
-rw-r--r--src/gui/painting/qtransform.h14
-rw-r--r--src/gui/styles/qcommonstyle.cpp1
-rw-r--r--src/gui/styles/qmacstyle_mac.mm161
-rw-r--r--src/gui/styles/qmotifstyle.cpp4
-rw-r--r--src/gui/styles/qstyle.cpp2
-rw-r--r--src/gui/styles/qstyleoption.cpp44
-rw-r--r--src/gui/styles/qstyleoption.h1
-rw-r--r--src/gui/styles/qstylesheetstyle.cpp12
-rw-r--r--src/gui/styles/qwindowsxpstyle.cpp7
-rw-r--r--src/gui/text/qcssparser.cpp19
-rw-r--r--src/gui/text/qcssparser_p.h6
-rw-r--r--src/gui/text/qfontdatabase_x11.cpp2
-rw-r--r--src/gui/text/qfontengine_win.cpp6
-rw-r--r--src/gui/text/qtextformat.cpp2
-rw-r--r--src/gui/util/qundostack.cpp2
-rw-r--r--src/gui/widgets/qabstractscrollarea.cpp7
-rw-r--r--src/gui/widgets/qabstractspinbox.cpp1
-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/qslider.cpp10
-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.cpp4
-rw-r--r--src/network/access/qhttpnetworkconnection.cpp47
-rw-r--r--src/network/access/qnetworkaccesshttpbackend.cpp42
-rw-r--r--src/network/access/qnetworkdiskcache.cpp6
-rw-r--r--src/network/kernel/qnetworkinterface.cpp2
-rw-r--r--src/network/socket/qabstractsocket.cpp2
-rw-r--r--src/opengl/qgl.cpp2
-rw-r--r--src/opengl/qpaintengine_opengl.cpp22
-rw-r--r--src/plugins/accessible/widgets/rangecontrols.h2
-rw-r--r--src/plugins/imageformats/tiff/qtiffhandler.cpp20
-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/script/qscriptengine_p.cpp5
-rw-r--r--src/script/qscriptenginefwd_p.h1
-rw-r--r--src/script/qscriptextqobject.cpp33
-rw-r--r--src/sql/drivers/ibase/qsql_ibase.cpp18
-rw-r--r--src/sql/drivers/mysql/qsql_mysql.cpp8
-rw-r--r--src/sql/kernel/qsqlquery.cpp2
-rw-r--r--src/svg/qsvghandler.cpp15
-rw-r--r--src/testlib/qtestcase.cpp8
-rw-r--r--src/testlib/qtestlogger.cpp21
-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/auto.pro1
-rw-r--r--tests/auto/macgui/tst_gui.cpp7
-rw-r--r--tests/auto/network-settings.h9
-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/qcontiguouscache/qcontiguouscache.pro8
-rw-r--r--tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp479
-rw-r--r--tests/auto/qcssparser/tst_cssparser.cpp13
-rw-r--r--tests/auto/qfuture/tst_qfuture.cpp2
-rw-r--r--tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp123
-rw-r--r--tests/auto/qgraphicsscene/tst_qgraphicsscene.cpp4
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp2
-rw-r--r--tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp99
-rw-r--r--tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp9
-rw-r--r--tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp25
-rw-r--r--tests/auto/qimage/images/image.tifbin0 -> 2242 bytes
-rw-r--r--tests/auto/qimage/tst_qimage.cpp9
-rw-r--r--tests/auto/qimagereader/images/image_100dpi.tifbin0 -> 2242 bytes
-rw-r--r--tests/auto/qimagereader/qimagereader.pro2
-rw-r--r--tests/auto/qimagereader/qimagereader.qrc1
-rw-r--r--tests/auto/qimagereader/tst_qimagereader.cpp421
-rw-r--r--tests/auto/qimagewriter/tst_qimagewriter.cpp44
-rw-r--r--tests/auto/qiodevice/tst_qiodevice.cpp4
-rw-r--r--tests/auto/qitemmodel/tst_qitemmodel.cpp2
-rw-r--r--tests/auto/qitemview/tst_qitemview.cpp2
-rw-r--r--tests/auto/qmake/testcompiler.cpp6
-rw-r--r--tests/auto/qmap/tst_qmap.cpp17
-rw-r--r--tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp16
-rw-r--r--tests/auto/qnetworkdiskcache/tst_qnetworkdiskcache.cpp3
-rw-r--r--tests/auto/qnetworkreply/tst_qnetworkreply.cpp58
-rw-r--r--tests/auto/qobjectrace/tst_qobjectrace.cpp113
-rw-r--r--tests/auto/qpixmapcache/tst_qpixmapcache.cpp258
-rw-r--r--tests/auto/qprinter/tst_qprinter.cpp5
-rw-r--r--tests/auto/qscriptqobject/tst_qscriptqobject.cpp66
-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.cpp46
-rw-r--r--tests/auto/qspinbox/tst_qspinbox.cpp6
-rw-r--r--tests/auto/qsplitter/tst_qsplitter.cpp5
-rw-r--r--tests/auto/qsslsocket/qsslsocket.pro6
-rw-r--r--tests/auto/qsslsocket/tst_qsslsocket.cpp69
-rw-r--r--tests/auto/qtcpserver/tst_qtcpserver.cpp2
-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/qwidget/tst_qwidget.cpp1
-rw-r--r--tests/auto/selftests/expected_xunit.txt13
-rw-r--r--tests/auto/selftests/xunit/tst_xunit.cpp29
-rw-r--r--tests/auto/uic/baseline/languagesdialog.ui.h12
-rw-r--r--tests/auto/utf8/tst_utf8.cpp2
-rw-r--r--tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp1
-rw-r--r--tests/benchmarks/qpixmapcache/qpixmapcache.pro6
-rw-r--r--tests/benchmarks/qpixmapcache/tst_qpixmapcache.cpp226
-rw-r--r--tools/assistant/compat/mainwindow.cpp11
-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.cpp43
-rw-r--r--tools/configure/configureapp.cpp13
-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/designer/versiondialog.cpp6
-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/kmap2qmap/main.cpp2
-rw-r--r--tools/linguist/linguist/mainwindow.cpp6
-rw-r--r--tools/linguist/lupdate/java.cpp16
-rw-r--r--tools/macdeployqt/shared/shared.cpp4
-rw-r--r--tools/porting/src/portingrules.cpp2
-rw-r--r--tools/qdbus/qdbusviewer/qdbusviewer.cpp11
-rw-r--r--tools/qdoc3/htmlgenerator.cpp874
-rw-r--r--tools/qdoc3/htmlgenerator.h30
-rw-r--r--tools/qdoc3/test/classic.css76
-rw-r--r--tools/qtestlib/chart/benchmark_template.html16
-rw-r--r--tools/qtestlib/chart/reportgenerator.cpp3
-rw-r--r--tools/tools.pro2
-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--translations/qt_ja_JP.ts3558
-rwxr-xr-xutil/webkit/mkdist-webkit2
324 files changed, 8903 insertions, 5263 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/configure b/configure
index ea1bc34..740f95a 100755
--- a/configure
+++ b/configure
@@ -2718,6 +2718,7 @@ if [ "$PLATFORM_MAC" = "yes" ]; then
# 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}"
+ CFG_MAC_ARCHS_GCC_FORMAT="${CFG_MAC_ARCHS/i386_64/x86_64}"
for ARCH in $CFG_MAC_ARCHS_GCC_FORMAT; do
MAC_ARCHS_COMMANDLINE="$MAC_ARCHS_COMMANDLINE -arch $ARCH"
done
diff --git a/configure.exe b/configure.exe
index ff71f08..40843b4 100644
--- a/configure.exe
+++ b/configure.exe
Binary files differ
diff --git a/demos/boxes/glextensions.h b/demos/boxes/glextensions.h
index 4755532..af36e29 100644
--- a/demos/boxes/glextensions.h
+++ b/demos/boxes/glextensions.h
@@ -103,8 +103,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
@@ -135,7 +138,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/chip/chip.cpp b/demos/chip/chip.cpp
index c2b22da..4b6579e 100644
--- a/demos/chip/chip.cpp
+++ b/demos/chip/chip.cpp
@@ -74,8 +74,9 @@ void Chip::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
if (option->state & QStyle::State_MouseOver)
fillColor = fillColor.light(125);
- if (option->levelOfDetail < 0.2) {
- if (option->levelOfDetail < 0.125) {
+ const qreal lod = option->levelOfDetailFromTransform(painter->worldTransform());
+ if (lod < 0.2) {
+ if (lod < 0.125) {
painter->fillRect(QRectF(0, 0, 110, 70), fillColor);
return;
}
@@ -100,7 +101,7 @@ void Chip::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
painter->drawRect(QRect(14, 14, 79, 39));
painter->setBrush(b);
- if (option->levelOfDetail >= 1) {
+ if (lod >= 1) {
painter->setPen(QPen(Qt::gray, 1));
painter->drawLine(15, 54, 94, 54);
painter->drawLine(94, 53, 94, 15);
@@ -108,7 +109,7 @@ void Chip::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
}
// Draw text
- if (option->levelOfDetail >= 2) {
+ if (lod >= 2) {
QFont font("Times", 10);
font.setStyleStrategy(QFont::ForceOutline);
painter->setFont(font);
@@ -122,17 +123,17 @@ void Chip::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWid
// Draw lines
QVarLengthArray<QLineF, 36> lines;
- if (option->levelOfDetail >= 0.5) {
- for (int i = 0; i <= 10; i += (option->levelOfDetail > 0.5 ? 1 : 2)) {
+ if (lod >= 0.5) {
+ for (int i = 0; i <= 10; i += (lod > 0.5 ? 1 : 2)) {
lines.append(QLineF(18 + 7 * i, 13, 18 + 7 * i, 5));
lines.append(QLineF(18 + 7 * i, 54, 18 + 7 * i, 62));
}
- for (int i = 0; i <= 6; i += (option->levelOfDetail > 0.5 ? 1 : 2)) {
+ for (int i = 0; i <= 6; i += (lod > 0.5 ? 1 : 2)) {
lines.append(QLineF(5, 18 + i * 5, 13, 18 + i * 5));
lines.append(QLineF(94, 18 + i * 5, 102, 18 + i * 5));
}
}
- if (option->levelOfDetail >= 0.4) {
+ if (lod >= 0.4) {
const QLineF lineData[] = {
QLineF(25, 35, 35, 35),
QLineF(35, 30, 35, 40),
diff --git a/demos/demos.pro b/demos/demos.pro
index 9248ab8..6084550 100644
--- a/demos/demos.pro
+++ b/demos/demos.pro
@@ -30,7 +30,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..b3e808f 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)
+ Plugins (r41346, r43550)
+ 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/dist/changes-4.6.0 b/dist/changes-4.6.0
index db4ab5f..6a94f26 100644
--- a/dist/changes-4.6.0
+++ b/dist/changes-4.6.0
@@ -38,4 +38,14 @@ information about a particular change.
- The experimental Direct3D paint engine has been removed. The
reasons for this is that Qt Software focuses on OpenGL for desktop
- hardware accelerated rendering. \ No newline at end of file
+ hardware accelerated rendering.
+
+ - QStyleOptionGraphicsItem::exposedRect and QStyleOptionGraphicsItem::matrix
+ does no longer contain fine-grained values when passed in drawItems()/paint()
+ unless the QGraphicsItem::ItemUsesExtendedStyleOptions flag is enabled.
+ By default, exposedRect is initialized to the item's bounding rect
+ and the matrix is untransformed.
+
+ - QStyleOptionGraphicsItem::levelOfDetails is obsoleted and its value
+ is always initialized to 1. For a more fine-grained value use
+ QStyleOptionGraphicsItem::levelOfDetailFromTransform(const QTransform &).
diff --git a/doc/src/3rdparty.qdoc b/doc/src/3rdparty.qdoc
index a87878e..23dfb12 100644
--- a/doc/src/3rdparty.qdoc
+++ b/doc/src/3rdparty.qdoc
@@ -61,6 +61,15 @@
\tableofcontents
+ \section1 DES (\c des.cpp)
+
+ \e{Implementation of DES encryption for NTLM\br
+ Copyright 1997-2005 Simon Tatham.\br
+ This software is released under the MIT license.}
+
+ See \c src/3rdparty/des/des.cpp for more information about the terms and
+ conditions under which the code is supplied.
+
\section1 FreeType 2 (\c freetype) version 2.3.6
\e{The FreeType project is a team of volunteers who develop free, portable
@@ -108,18 +117,6 @@
See \c src/3rdparty/harfbuzz/COPYING.FTL and src/3rdparty/harfbuzz/COPYING.GPL
for license details.
- \section1 MD5 (\c md5.cpp and \c md5.h)
-
- \e{This code implements the MD5 message-digest algorithm.
- The algorithm is due to Ron Rivest. This code was
- written by Colin Plumb in 1993, no copyright is claimed.
- This code is in the public domain; do with it what you wish.} -- quoted from
- \c src/3rdparty/md5/md5.h
-
- See \c src/3rdparty/md5/md5.cpp and \c src/3rdparty/md5/md5.h for more
- information about the terms and conditions under which the code is
- supplied.
-
\section1 The Independent JPEG Group's JPEG Software (\c libjpeg) version 6b
\e{This package contains C software to implement JPEG image compression and
@@ -132,6 +129,29 @@
See \c src/3rdparty/libjpeg/README for license details.
+ \section1 MD4 (\c md4.cpp and \c md4.h)
+
+ \e{MD4 (RFC-1320) message digest.\br
+ Modified from MD5 code by Andrey Panin <pazke@donpac.ru>\br\br
+ Written by Solar Designer <solar@openwall.com> in 2001, and placed in\br
+ the public domain. There's absolutely no warranty.}
+
+ See \c src/3rdparty/md4/md4.cpp and \c src/3rdparty/md4/md4.h for more
+ information about the terms and conditions under which the code is
+ supplied.
+
+ \section1 MD5 (\c md5.cpp and \c md5.h)
+
+ \e{This code implements the MD5 message-digest algorithm.
+ The algorithm is due to Ron Rivest. This code was
+ written by Colin Plumb in 1993, no copyright is claimed.
+ This code is in the public domain; do with it what you wish.} -- quoted from
+ \c src/3rdparty/md5/md5.h
+
+ See \c src/3rdparty/md5/md5.cpp and \c src/3rdparty/md5/md5.h for more
+ information about the terms and conditions under which the code is
+ supplied.
+
\section1 MNG Library (\c libmng) version 1.0.10
\e{The libmng library supports decoding, displaying, encoding, and various
@@ -152,6 +172,56 @@
See \c src/3rdparty/libpng/LICENSE for license details.
+ \section1 The ptmalloc memory allocator (\c ptmalloc3) version 1.8
+
+ \e ptmcalloc3 is a scalable concurrent memory allocator suitable
+ for use in multi-threaded programs.
+
+ \hr
+
+ Copyright (c) 2001-2006 Wolfram Gloger
+
+ Permission to use, copy, modify, distribute, and sell this software
+ and its documentation for any purpose is hereby granted without fee,
+ provided that (i) the above copyright notices and this permission
+ notice appear in all copies of the software and related documentation,
+ and (ii) the name of Wolfram Gloger may not be used in any advertising
+ or publicity relating to the software.
+
+ THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
+ EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
+ WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+
+ IN NO EVENT SHALL WOLFRAM GLOGER BE LIABLE FOR ANY SPECIAL,
+ INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY
+ DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
+ WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY
+ OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+ PERFORMANCE OF THIS SOFTWARE.
+
+ \hr
+
+ See \c src/3rdparty/ptmalloc/COPYRIGHT for license details.
+
+ \section1 SHA-1 (\c sha1.cpp)
+
+ \e{Based on the public domain implementation of the SHA-1 algorithm\br
+ Copyright (C) Dominik Reichl <dominik.reichl@t-online.de>}
+
+ See \c src/3rdparty/sha1/sha1.cpp for more information about the terms and
+ conditions under which the code is supplied.
+
+ \section1 SQLite (\c sqlite) version 3.5.9
+
+ \e{SQLite is a small C library that implements a
+ self-contained, embeddable, zero-configuration SQL database engine.}
+ -- quoted from \l{http://www.sqlite.org/}{www.sqlite.org}.
+
+ According to the comments in the source files, the code is in the public
+ domain. See the
+ \l{http://www.sqlite.org/copyright.html}{SQLite Copyright} page on the
+ SQLite web site for further information.
+
\section1 TIFF Software Distribution (\c libtiff) version 3.8.2
\e {libtiff is a set of C functions (a library) that support the
@@ -212,17 +282,6 @@
See \c src/3rdparty/libtiff/COPYRIGHT for license details.
- \section1 SQLite (\c sqlite) version 3.5.9
-
- \e{SQLite is a small C library that implements a
- self-contained, embeddable, zero-configuration SQL database engine.}
- -- quoted from \l{http://www.sqlite.org/}{www.sqlite.org}.
-
- According to the comments in the source files, the code is in the public
- domain. See the
- \l{http://www.sqlite.org/copyright.html}{SQLite Copyright} page on the
- SQLite web site for further information.
-
\section1 Wintab API (\c wintab)
Wintab is a de facto API for pointing devices on Windows. The
@@ -238,35 +297,4 @@
src/3rdparty/zlib/README.
See \c src/3rdparty/zlib/README for license details.
-
- \section1 The ptmalloc memory allocator (\c ptmalloc3) version 1.8
-
- \e ptmcalloc3 is a scalable concurrent memory allocator suitable
- for use in multi-threaded programs.
-
- \hr
-
- Copyright (c) 2001-2006 Wolfram Gloger
-
- Permission to use, copy, modify, distribute, and sell this software
- and its documentation for any purpose is hereby granted without fee,
- provided that (i) the above copyright notices and this permission
- notice appear in all copies of the software and related documentation,
- and (ii) the name of Wolfram Gloger may not be used in any advertising
- or publicity relating to the software.
-
- THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND,
- EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY
- WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
-
- IN NO EVENT SHALL WOLFRAM GLOGER BE LIABLE FOR ANY SPECIAL,
- INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY
- DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
- WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY
- OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- PERFORMANCE OF THIS SOFTWARE.
-
- \hr
-
- See \c src/3rdparty/ptmalloc/COPYRIGHT for license details.
*/
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/contiguouscache.qdoc b/doc/src/examples/contiguouscache.qdoc
new file mode 100644
index 0000000..fbfde3f
--- /dev/null
+++ b/doc/src/examples/contiguouscache.qdoc
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+/*!
+ \example tools/contiguouscache
+ \title Contiguous Cache Example
+
+ The Contiguous Cache example shows how to use QContiguousCache to manage memory usage for
+ very large models. In some environments memory is limited and, even when it
+ isn't, users still dislike an application using excessive memory.
+ Using QContiguousCache to manage a list, rather than loading
+ the entire list into memory, allows the application to limit the amount
+ of memory it uses, regardless of the size of the data set it accesses
+
+ The simplest way to use QContiguousCache is to cache as items are requested. When
+ a view requests an item at row N it is also likely to ask for items at rows near
+ to N.
+
+ \snippet examples/tools/contiguouscache/randomlistmodel.cpp 0
+
+ After getting the row, the class determines if the row is in the bounds
+ of the contiguous cache's current range. It would have been equally valid to
+ simply have the following code instead.
+
+ \code
+ while (row > m_rows.lastIndex())
+ m_rows.append(fetchWord(m_rows.lastIndex()+1);
+ while (row < m_rows.firstIndex())
+ m_rows.prepend(fetchWord(m_rows.firstIndex()-1);
+ \endcode
+
+ However a list will often jump rows if the scroll bar is used directly, resulting in
+ the code above causing every row between the old and new rows to be fetched.
+
+ Using QContiguousCache::lastIndex() and QContiguousCache::firstIndex() allows
+ the example to determine what part of the list the cache is currently caching.
+ These values don't represent the indexes into the cache's own memory, but rather
+ a virtual infinite array that the cache represents.
+
+ By using QContiguousCache::append() and QContiguousCache::prepend() the code ensures
+ that items that may be still on the screen are not lost when the requested row
+ has not moved far from the current cache range. QContiguousCache::insert() can
+ potentially remove more than one item from the cache as QContiguousCache does not
+ allow for gaps. If your cache needs to quickly jump back and forth between
+ rows with significant gaps between them consider using QCache instead.
+
+ And thats it. A perfectly reasonable cache, using minimal memory for a very large
+ list. In this case the accessor for getting the words into the cache
+ generates random information rather than fixed information. This allows you
+ to see how the cache range is kept for a local number of rows when running the
+ example.
+
+ \snippet examples/tools/contiguouscache/randomlistmodel.cpp 1
+
+ It is also worth considering pre-fetching items into the cache outside of the
+ application's paint routine. This can be done either with a separate thread
+ or using a QTimer to incrementally expand the range of the cache prior to
+ rows being requested out of the current cache range.
+*/
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/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/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/code/src_gui_image_qpixmapcache.cpp b/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
index c4b6353..2a04f64 100644
--- a/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
+++ b/doc/src/snippets/code/src_gui_image_qpixmapcache.cpp
@@ -13,7 +13,7 @@ painter->drawPixmap(0, 0, p);
//! [1]
QPixmap pm;
-if (!QPixmapCache::find("my_big_image", pm)) {
+if (!QPixmapCache::find("my_big_image", &pm)) {
pm.load("bigimage.png");
QPixmapCache::insert("my_big_image", pm);
}
diff --git a/doc/src/snippets/widgets-tutorial/template.cpp b/doc/src/snippets/widgets-tutorial/template.cpp
new file mode 100644
index 0000000..5958676
--- /dev/null
+++ b/doc/src/snippets/widgets-tutorial/template.cpp
@@ -0,0 +1,14 @@
+#include <QtGui>
+
+// Include header files for application components.
+// ...
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+
+ // Set up and show widgets.
+ // ...
+
+ return app.exec();
+}
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/tutorials/addressbook-fr.qdoc b/doc/src/tutorials/addressbook-fr.qdoc
index 2847f1b..512a404 100644
--- a/doc/src/tutorials/addressbook-fr.qdoc
+++ b/doc/src/tutorials/addressbook-fr.qdoc
@@ -239,13 +239,16 @@
\snippet tutorials/addressbook/part1/main.cpp main function
- On construit un nouveau widget \c AddressBook sur le tas en utilisant le mot-cl
- \c new et en invoquant sa mthode \l{QWidget::show()}{show()} pour l'afficher.
+ On construit un nouveau widget \c AddressBook sur la pile et on invoque
+ sa mthode \l{QWidget::show()}{show()} pour l'afficher.
Cependant, le widget ne sera pas visible tant que la boucle d'vnements
n'aura pas t lance. On dmarre la boucle d'vnements en appelant la
mthode \l{QApplication::}{exec()} de l'application; le rsultat renvoy
par cette mthode est lui mme utilis comme valeur de retour pour la mthode
\c main().
+ On comprend maintenant pourquoi \c AddressBook a t cr sur la pile: la fin
+ du programme, l'objet sort du scope de la fonction \c main() et tous ses widgets enfants
+ sont supprims, assurant ainsi qu'il n'y aura pas de fuites de mmoire.
*/
/*!
diff --git a/doc/src/tutorials/addressbook.qdoc b/doc/src/tutorials/addressbook.qdoc
index 3b0d2bc..38200b0 100644
--- a/doc/src/tutorials/addressbook.qdoc
+++ b/doc/src/tutorials/addressbook.qdoc
@@ -242,12 +242,15 @@
\snippet tutorials/addressbook/part1/main.cpp main function
- We construct a new \c AddressBook widget on the heap using the \c new
- keyword and invoke its \l{QWidget::show()}{show()} function to display it.
+ We construct a new \c AddressBook widget on the stack and invoke
+ its \l{QWidget::show()}{show()} function to display it.
However, the widget will not be shown until the application's event loop
is started. We start the event loop by calling the application's
\l{QApplication::}{exec()} function; the result returned by this function
- is used as the return value from the \c main() function.
+ is used as the return value from the \c main() function. At this point,
+ it becomes apparent why we instanciated \c AddressBook on the stack: It
+ will now go out of scope. Therefore, \c AddressBook and all its child widgets
+ will be deleted, thus preventing memory leaks.
*/
/*!
diff --git a/doc/src/tutorials/widgets-tutorial.qdoc b/doc/src/tutorials/widgets-tutorial.qdoc
index ead44af..1e89431 100644
--- a/doc/src/tutorials/widgets-tutorial.qdoc
+++ b/doc/src/tutorials/widgets-tutorial.qdoc
@@ -41,11 +41,14 @@
/*!
\page widgets-tutorial.html
+ \startpage {index.html}{Qt Reference Documentation}
+ \nextpage {tutorials/widgets/toplevel}{Creating a Window}
\title Widgets Tutorial
\ingroup tutorials
- \brief This tutorial covers basic usage of widgets and layouts, showing how they are used to build GUI applications.
+ \brief This tutorial covers basic usage of widgets and layouts, showing how
+ they are used to build GUI applications.
\section1 Introduction
@@ -68,7 +71,60 @@
occupied by its parent. This means that, when a window is deleted, all
the widgets it contains are automatically deleted.
- \section1 Creating a Window
+ \section1 Writing a main Function
+
+ Many of the GUI examples in Qt follow the pattern of having a \c{main.cpp}
+ file containing code to initialize the application, and a number of other
+ source and header files containing the application logic and custom GUI
+ components.
+
+ A typical \c main() function, written in \c{main.cpp}, looks like this:
+
+ \quotefile doc/src/snippets/widgets-tutorial/template.cpp
+
+ We first construct a QApplication object which is configured using any
+ arguments passed in from the command line. After any widgets have been
+ created and shown, we call QApplication::exec() to start Qt's event loop.
+ Control passes to Qt until this function returns, at which point we return
+ the value we obtain from this function.
+
+ In each part of this tutorial, we provide an example that is written
+ entirely within a \c main() function. In more sophisticated examples, the
+ code to set up widgets and layouts is written in other parts of the
+ example. For example, the GUI for a main window may be set up in the
+ constructor of a QMainWindow subclass.
+
+ The \l{Qt Examples#Widgets}{Widgets examples} are a good place to look for
+ more complex and complete examples and applications.
+
+ \section1 Building Examples and Tutorials
+
+ If you obtained a binary package of Qt or compiled it yourself, the
+ examples described in this tutorial should already be ready to run.
+ However, if you may wish to modify them and recompile them, you need to
+ perform the following steps:
+
+ \list 1
+ \o At the command line, enter the directory containing the example you
+ wish to recompile.
+ \o Type \c qmake and press \key{Return}. If this doesn't work, make sure
+ that the executable is on your path, or enter its full location.
+ \o On Linux/Unix and Mac OS X, type \c make and press \key{Return};
+ on Windows with Visual Studio, type \c nmake and press \key{Return}.
+ \endlist
+
+ An executable file should have been created within the current directory.
+ On Windows, this file may be located within a \c debug or \c release
+ subdirectory. You can run this file to see the example code at work.
+*/
+
+/*!
+ \page widgets-tutorial-toplevel.html
+ \contentspage {Widgets Tutorial}{Contents}
+ \previouspage {Widgets Tutorial}
+ \nextpage {Widgets Tutorial - Child Widgets}
+ \example tutorials/widgets/toplevel
+ \title Widgets Tutorial - Creating a Window
If a widget is created without a parent, it is treated as a window, or
\e{top-level widget}, when it is shown. Since it has no parent object to
@@ -82,7 +138,7 @@
<table align="left" width="100%">
<tr class="qt-code"><td>
\endraw
- \snippet snippets/widgets-tutorial/toplevel/main.cpp create, resize and show
+ \snippet tutorials/widgets/toplevel/main.cpp main program
\raw HTML
</td><td align="right">
\endraw
@@ -92,15 +148,28 @@
</table>
\endraw
- We can add a child widget to this window by passing \c window as the
- parent to its constructor. In this case, we add a button to the window
- and place it in a specific location:
+ To create a real GUI, we need to place widgets inside the window. To do
+ this, we pass a QWidget instance to a widget's constructor, as we will
+ demonstrate in the next part of this tutorial.
+*/
+
+/*!
+ \page widgets-tutorial-childwidget.html
+ \contentspage {Widgets Tutorial}{Contents}
+ \previouspage {Widgets Tutorial - Creating a Window}
+ \nextpage {Widgets Tutorial - Using Layouts}
+ \example tutorials/widgets/childwidget
+ \title Widgets Tutorial - Child Widgets
+
+ We can add a child widget to the window created in the previous example by
+ passing \c window as the parent to its constructor. In this case, we add a
+ button to the window and place it in a specific location:
\raw HTML
<table align="left" width="100%">
<tr class="qt-code"><td>
\endraw
- \snippet snippets/widgets-tutorial/childwidget/main.cpp create, position and show
+ \snippet tutorials/widgets/childwidget/main.cpp main program
\raw HTML
</td><td align="right">
\endraw
@@ -112,9 +181,16 @@
The button is now a child of the window and will be deleted when the
window is destroyed. Note that hiding or closing the window does not
- automatically destroy it.
+ automatically destroy it. It will be destroyed when the example exits.
+*/
- \section1 Using Layouts
+/*!
+ \page widgets-tutorial-windowlayout.html
+ \contentspage {Widgets Tutorial}{Contents}
+ \previouspage {Widgets Tutorial - Child Widgets}
+ \nextpage {Widgets Tutorial - Nested Layouts}
+ \example tutorials/widgets/windowlayout
+ \title Widgets Tutorial - Using Layouts
Usually, child widgets are arranged inside a window using layout objects
rather than by specifying positions and sizes explicitly. Here, we
@@ -125,7 +201,7 @@
<table align="left" width="100%">
<tr class="qt-code"><td>
\endraw
- \snippet snippets/widgets-tutorial/windowlayout/main.cpp create, lay out widgets and show
+ \snippet tutorials/widgets/windowlayout/main.cpp main program
\raw HTML
</td><td align="right">
\endraw
@@ -149,17 +225,31 @@
manage the label and line edit and set the layout on the window, both the
widgets and the layout itself are ''reparented'' to become children of
the window.
+*/
+
+/*!
+ \page widgets-tutorial-nestedlayouts.html
+ \contentspage {Widgets Tutorial}{Contents}
+ \previouspage {Widgets Tutorial - Using Layouts}
+ \example tutorials/widgets/nestedlayouts
+ \title Widgets Tutorial - Nested Layouts
Just as widgets can contain other widgets, layouts can be used to provide
different levels of grouping for widgets. Here, we want to display a
label alongside a line edit at the top of a window, above a table view
showing the results of a query.
+ We achieve this by creating two layouts: \c{queryLayout} is a QHBoxLayout
+ that contains QLabel and QLineEdit widgets placed side-by-side;
+ \c{mainLayout} is a QVBoxLayout that contains \c{queryLayout} and a
+ QTableView arranged vertically.
+
\raw HTML
<table align="left" width="100%">
<tr class="qt-code"><td>
\endraw
- \snippet snippets/widgets-tutorial/nestedlayouts/main.cpp create, lay out widgets and show
+ \snippet tutorials/widgets/nestedlayouts/main.cpp first part
+ \snippet tutorials/widgets/nestedlayouts/main.cpp last part
\raw HTML
</td><td align="right">
\endraw
@@ -169,6 +259,26 @@
</table>
\endraw
+ Note that we call the \c{mainLayout}'s \l{QBoxLayout::}{addLayout()}
+ function to insert the \c{queryLayout} above the \c{resultView} table.
+
+ We have omitted the code that sets up the model containing the data shown
+ by the QTableView widget, \c resultView. For completeness, we show this below.
+
As well as QHBoxLayout and QVBoxLayout, Qt also provides QGridLayout
and QFormLayout classes to help with more complex user interfaces.
+ These can be seen if you run \l{Qt Designer}.
+
+ \section1 Setting up the Model
+
+ In the code above, we did not show where the table's data came from
+ because we wanted to concentrate on the use of layouts. Here, we see
+ that the model holds a number of items corresponding to rows, each of
+ which is set up to contain data for two columns.
+
+ \snippet tutorials/widgets/nestedlayouts/main.cpp set up the model
+
+ The use of models and views is covered in the
+ \l{Qt Examples#Item Views}{item view examples} and in the
+ \l{Model/View Programming} overview.
*/
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/tools/contiguouscache/contiguouscache.pro b/examples/tools/contiguouscache/contiguouscache.pro
new file mode 100644
index 0000000..f840514
--- /dev/null
+++ b/examples/tools/contiguouscache/contiguouscache.pro
@@ -0,0 +1,9 @@
+HEADERS = randomlistmodel.h
+SOURCES = randomlistmodel.cpp \
+ main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tools/contiguouscache
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS contiguouscache.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tools/contiguouscache
+INSTALLS += target sources
diff --git a/examples/tools/contiguouscache/main.cpp b/examples/tools/contiguouscache/main.cpp
new file mode 100644
index 0000000..291aaf4
--- /dev/null
+++ b/examples/tools/contiguouscache/main.cpp
@@ -0,0 +1,56 @@
+/****************************************************************************
+**
+** 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.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file 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 "randomlistmodel.h"
+#include <QListView>
+#include <QApplication>
+
+int main(int c, char **v)
+{
+ QApplication a(c, v);
+
+ QListView view;
+ view.setUniformItemSizes(true);
+ view.setModel(new RandomListModel(&view));
+ view.show();
+
+ return a.exec();
+}
diff --git a/examples/tools/contiguouscache/randomlistmodel.cpp b/examples/tools/contiguouscache/randomlistmodel.cpp
new file mode 100644
index 0000000..b1c7204
--- /dev/null
+++ b/examples/tools/contiguouscache/randomlistmodel.cpp
@@ -0,0 +1,97 @@
+/****************************************************************************
+**
+** 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.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file 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 "randomlistmodel.h"
+#include <stdlib.h>
+
+static const int bufferSize(500);
+static const int lookAhead(100);
+static const int halfLookAhead(lookAhead/2);
+
+RandomListModel::RandomListModel(QObject *parent)
+: QAbstractListModel(parent), m_rows(bufferSize), m_count(10000)
+{
+}
+
+RandomListModel::~RandomListModel()
+{
+}
+
+int RandomListModel::rowCount(const QModelIndex &) const
+{
+ return m_count;
+}
+
+//! [0]
+QVariant RandomListModel::data(const QModelIndex &index, int role) const
+{
+ if (role != Qt::DisplayRole)
+ return QVariant();
+
+ int row = index.row();
+
+ if (row > m_rows.lastIndex()) {
+ if (row - m_rows.lastIndex() > lookAhead)
+ cacheRows(row-halfLookAhead, qMin(m_count, row+halfLookAhead));
+ else while (row > m_rows.lastIndex())
+ m_rows.append(fetchRow(m_rows.lastIndex()+1));
+ } else if (row < m_rows.firstIndex()) {
+ if (m_rows.firstIndex() - row > lookAhead)
+ cacheRows(qMax(0, row-halfLookAhead), row+halfLookAhead);
+ else while (row < m_rows.firstIndex())
+ m_rows.prepend(fetchRow(m_rows.firstIndex()-1));
+ }
+
+ return m_rows.at(row);
+}
+
+void RandomListModel::cacheRows(int from, int to) const
+{
+ for (int i = from; i <= to; ++i)
+ m_rows.insert(i, fetchRow(i));
+}
+//![0]
+
+//![1]
+QString RandomListModel::fetchRow(int position) const
+{
+ return QString::number(rand() % ++position);
+}
+//![1]
diff --git a/examples/tools/contiguouscache/randomlistmodel.h b/examples/tools/contiguouscache/randomlistmodel.h
new file mode 100644
index 0000000..d32bf16
--- /dev/null
+++ b/examples/tools/contiguouscache/randomlistmodel.h
@@ -0,0 +1,66 @@
+/****************************************************************************
+**
+** 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.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file 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 RANDOMLISTMODEL_H
+#define RANDOMLISTMODEL_H
+
+#include <QContiguousCache>
+#include <QAbstractListModel>
+
+class QTimer;
+class RandomListModel : public QAbstractListModel
+{
+ Q_OBJECT
+public:
+ RandomListModel(QObject *parent = 0);
+ ~RandomListModel();
+
+ int rowCount(const QModelIndex & = QModelIndex()) const;
+ QVariant data(const QModelIndex &, int) const;
+
+private:
+ void cacheRows(int, int) const;
+ QString fetchRow(int) const;
+
+ mutable QContiguousCache<QString> m_rows;
+ const int m_count;
+};
+
+#endif
diff --git a/examples/tools/tools.pro b/examples/tools/tools.pro
index 79f0faa..c694dd8 100644
--- a/examples/tools/tools.pro
+++ b/examples/tools/tools.pro
@@ -5,6 +5,7 @@ SUBDIRS = codecs \
customcompleter \
echoplugin \
i18n \
+ contiguouscache \
plugandpaintplugins \
plugandpaint \
regexp \
diff --git a/examples/tutorials/addressbook-fr/part1/main.cpp b/examples/tutorials/addressbook-fr/part1/main.cpp
index 22bfd3e..9c96882 100644
--- a/examples/tutorials/addressbook-fr/part1/main.cpp
+++ b/examples/tutorials/addressbook-fr/part1/main.cpp
@@ -47,8 +47,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook-fr/part2/main.cpp b/examples/tutorials/addressbook-fr/part2/main.cpp
index 22bfd3e..9c96882 100644
--- a/examples/tutorials/addressbook-fr/part2/main.cpp
+++ b/examples/tutorials/addressbook-fr/part2/main.cpp
@@ -47,8 +47,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook-fr/part3/main.cpp b/examples/tutorials/addressbook-fr/part3/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook-fr/part3/main.cpp
+++ b/examples/tutorials/addressbook-fr/part3/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook-fr/part4/main.cpp b/examples/tutorials/addressbook-fr/part4/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook-fr/part4/main.cpp
+++ b/examples/tutorials/addressbook-fr/part4/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook-fr/part5/main.cpp b/examples/tutorials/addressbook-fr/part5/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook-fr/part5/main.cpp
+++ b/examples/tutorials/addressbook-fr/part5/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook-fr/part6/main.cpp b/examples/tutorials/addressbook-fr/part6/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook-fr/part6/main.cpp
+++ b/examples/tutorials/addressbook-fr/part6/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook-fr/part7/main.cpp b/examples/tutorials/addressbook-fr/part7/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook-fr/part7/main.cpp
+++ b/examples/tutorials/addressbook-fr/part7/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part1/main.cpp b/examples/tutorials/addressbook/part1/main.cpp
index 22bfd3e..9c96882 100644
--- a/examples/tutorials/addressbook/part1/main.cpp
+++ b/examples/tutorials/addressbook/part1/main.cpp
@@ -47,8 +47,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part2/main.cpp b/examples/tutorials/addressbook/part2/main.cpp
index 22bfd3e..9c96882 100644
--- a/examples/tutorials/addressbook/part2/main.cpp
+++ b/examples/tutorials/addressbook/part2/main.cpp
@@ -47,8 +47,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part3/main.cpp b/examples/tutorials/addressbook/part3/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook/part3/main.cpp
+++ b/examples/tutorials/addressbook/part3/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part4/main.cpp b/examples/tutorials/addressbook/part4/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook/part4/main.cpp
+++ b/examples/tutorials/addressbook/part4/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part5/main.cpp b/examples/tutorials/addressbook/part5/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook/part5/main.cpp
+++ b/examples/tutorials/addressbook/part5/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part6/main.cpp b/examples/tutorials/addressbook/part6/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook/part6/main.cpp
+++ b/examples/tutorials/addressbook/part6/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/addressbook/part7/main.cpp b/examples/tutorials/addressbook/part7/main.cpp
index b25d656..46f6f03 100644
--- a/examples/tutorials/addressbook/part7/main.cpp
+++ b/examples/tutorials/addressbook/part7/main.cpp
@@ -46,8 +46,8 @@ int main(int argc, char *argv[])
{
QApplication app(argc, argv);
- AddressBook *addressBook = new AddressBook;
- addressBook->show();
+ AddressBook addressBook;
+ addressBook.show();
return app.exec();
}
diff --git a/examples/tutorials/widgets/childwidget/childwidget.pro b/examples/tutorials/widgets/childwidget/childwidget.pro
new file mode 100644
index 0000000..37ae98e
--- /dev/null
+++ b/examples/tutorials/widgets/childwidget/childwidget.pro
@@ -0,0 +1,7 @@
+SOURCES = main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/childwidget
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS childwidget.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/childwidget
+INSTALLS += target sources
diff --git a/examples/tutorials/widgets/childwidget/main.cpp b/examples/tutorials/widgets/childwidget/main.cpp
new file mode 100644
index 0000000..fd50b1d
--- /dev/null
+++ b/examples/tutorials/widgets/childwidget/main.cpp
@@ -0,0 +1,61 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [main program]
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QWidget window;
+ window.resize(320, 240);
+ window.setWindowTitle(QApplication::translate("childwidget", "Child widget"));
+ window.show();
+
+//! [create, position and show]
+ QPushButton *button = new QPushButton(
+ QApplication::translate("childwidget", "Press me"), &window);
+ button->move(100, 100);
+ button->show();
+//! [create, position and show]
+ return app.exec();
+}
+//! [main program]
diff --git a/examples/tutorials/widgets/nestedlayouts/main.cpp b/examples/tutorials/widgets/nestedlayouts/main.cpp
new file mode 100644
index 0000000..226d0f9
--- /dev/null
+++ b/examples/tutorials/widgets/nestedlayouts/main.cpp
@@ -0,0 +1,104 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [main program]
+//! [first part]
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QWidget window;
+
+ QLabel *queryLabel = new QLabel(
+ QApplication::translate("nestedlayouts", "Query:"));
+ QLineEdit *queryEdit = new QLineEdit();
+ QTableView *resultView = new QTableView();
+
+ QHBoxLayout *queryLayout = new QHBoxLayout();
+ queryLayout->addWidget(queryLabel);
+ queryLayout->addWidget(queryEdit);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout();
+ mainLayout->addLayout(queryLayout);
+ mainLayout->addWidget(resultView);
+ window.setLayout(mainLayout);
+
+ // Set up the model and configure the view...
+//! [first part]
+
+//! [set up the model]
+ QStandardItemModel model;
+ model.setHorizontalHeaderLabels(
+ QStringList() << QApplication::translate("nestedlayouts", "Name")
+ << QApplication::translate("nestedlayouts", "Office"));
+
+ QList<QStringList> rows = QList<QStringList>()
+ << (QStringList() << "Verne Nilsen" << "123")
+ << (QStringList() << "Carlos Tang" << "77")
+ << (QStringList() << "Bronwyn Hawcroft" << "119")
+ << (QStringList() << "Alessandro Hanssen" << "32")
+ << (QStringList() << "Andrew John Bakken" << "54")
+ << (QStringList() << "Vanessa Weatherley" << "85")
+ << (QStringList() << "Rebecca Dickens" << "17")
+ << (QStringList() << "David Bradley" << "42")
+ << (QStringList() << "Knut Walters" << "25")
+ << (QStringList() << "Andrea Jones" << "34");
+
+ foreach (QStringList row, rows) {
+ QList<QStandardItem *> items;
+ foreach (QString text, row)
+ items.append(new QStandardItem(text));
+ model.appendRow(items);
+ }
+
+ resultView->setModel(&model);
+ resultView->verticalHeader()->hide();
+ resultView->horizontalHeader()->setStretchLastSection(true);
+//! [set up the model]
+//! [last part]
+ window.setWindowTitle(
+ QApplication::translate("nestedlayouts", "Nested layouts"));
+ window.show();
+ return app.exec();
+}
+//! [last part]
+//! [main program]
diff --git a/examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro b/examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro
new file mode 100644
index 0000000..a7f141c
--- /dev/null
+++ b/examples/tutorials/widgets/nestedlayouts/nestedlayouts.pro
@@ -0,0 +1,7 @@
+SOURCES = main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/nestedlayouts
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS nestedlayouts.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/nestedlayouts
+INSTALLS += target sources
diff --git a/examples/tutorials/widgets/toplevel/main.cpp b/examples/tutorials/widgets/toplevel/main.cpp
new file mode 100644
index 0000000..f18fa6b
--- /dev/null
+++ b/examples/tutorials/widgets/toplevel/main.cpp
@@ -0,0 +1,57 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [main program]
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+//! [create, resize and show]
+ QWidget window;
+ window.resize(320, 240);
+ window.show();
+//! [create, resize and show]
+ window.setWindowTitle(
+ QApplication::translate("toplevel", "Top-level widget"));
+ return app.exec();
+}
+//! [main program]
diff --git a/examples/tutorials/widgets/toplevel/toplevel.pro b/examples/tutorials/widgets/toplevel/toplevel.pro
new file mode 100644
index 0000000..58d59c5
--- /dev/null
+++ b/examples/tutorials/widgets/toplevel/toplevel.pro
@@ -0,0 +1,7 @@
+SOURCES = main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/toplevel
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS toplevel.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/toplevel
+INSTALLS += target sources
diff --git a/examples/tutorials/widgets/widgets.pro b/examples/tutorials/widgets/widgets.pro
new file mode 100644
index 0000000..7a870e7
--- /dev/null
+++ b/examples/tutorials/widgets/widgets.pro
@@ -0,0 +1,8 @@
+TEMPLATE = subdirs
+SUBDIRS = toplevel childwidget windowlayout nestedlayouts
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS widgets.pro README
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets
+INSTALLS += target sources
diff --git a/examples/tutorials/widgets/windowlayout/main.cpp b/examples/tutorials/widgets/windowlayout/main.cpp
new file mode 100644
index 0000000..c30d669
--- /dev/null
+++ b/examples/tutorials/widgets/windowlayout/main.cpp
@@ -0,0 +1,63 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+//! [main program]
+#include <QtGui>
+
+int main(int argc, char *argv[])
+{
+ QApplication app(argc, argv);
+ QWidget window;
+//! [create, lay out widgets and show]
+ QLabel *label = new QLabel(QApplication::translate("windowlayout", "Name:"));
+ QLineEdit *lineEdit = new QLineEdit();
+
+ QHBoxLayout *layout = new QHBoxLayout();
+ layout->addWidget(label);
+ layout->addWidget(lineEdit);
+ window.setLayout(layout);
+//! [create, lay out widgets and show]
+ window.setWindowTitle(
+ QApplication::translate("windowlayout", "Window layout"));
+ window.show();
+ return app.exec();
+}
+//! [main program]
diff --git a/examples/tutorials/widgets/windowlayout/windowlayout.pro b/examples/tutorials/widgets/windowlayout/windowlayout.pro
new file mode 100644
index 0000000..408f6ef
--- /dev/null
+++ b/examples/tutorials/widgets/windowlayout/windowlayout.pro
@@ -0,0 +1,7 @@
+SOURCES = main.cpp
+
+# install
+target.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/windowlayout
+sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS windowlayout.pro
+sources.path = $$[QT_INSTALL_EXAMPLES]/tutorials/widgets/windowlayout
+INSTALLS += target sources
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 393e33c..aeb7224 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/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/qmake/project.cpp b/qmake/project.cpp
index 00bb2f0..8ae0fe2 100644
--- a/qmake/project.cpp
+++ b/qmake/project.cpp
@@ -2412,7 +2412,7 @@ QMakeProject::doProjectTest(QString func, QList<QStringList> args_list, QMap<QSt
if(ok) { // do integer compare
int lhs_int = lhs.toInt(&ok);
if(ok) {
- if(func == "greaterThan")
+ if(func_t == T_GREATERTHAN)
return lhs_int > rhs_int;
return lhs_int < rhs_int;
}
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/webkit/VERSION b/src/3rdparty/webkit/VERSION
index 26ce489..7adbd6f 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
+ 40b523e9eaaba38c182e5a9c319f0069ebf98330
diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog
index 00bd427..a4cb62d 100644
--- a/src/3rdparty/webkit/WebCore/ChangeLog
+++ b/src/3rdparty/webkit/WebCore/ChangeLog
@@ -1,3 +1,104 @@
+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/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/PluginViewQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp
index c8dd0e5..43c772f 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"
@@ -225,6 +226,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..2aeb8da 100644
--- a/src/3rdparty/webkit/WebKit/qt/ChangeLog
+++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog
@@ -1,3 +1,14 @@
+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/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/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/io/qdebug.h b/src/corelib/io/qdebug.h
index 8334146..9b0fbe5 100644
--- a/src/corelib/io/qdebug.h
+++ b/src/corelib/io/qdebug.h
@@ -51,6 +51,7 @@
#include <QtCore/qstring.h>
#include <QtCore/qvector.h>
#include <QtCore/qset.h>
+#include <QtCore/qcontiguouscache.h>
QT_BEGIN_HEADER
@@ -232,6 +233,24 @@ inline QDebug operator<<(QDebug debug, const QSet<T> &set)
return operator<<(debug, set.toList());
}
+#if defined(FORCE_UREF)
+template <class T>
+inline QDebug &operator<<(QDebug debug, const QContiguousCache<T> &cache)
+#else
+template <class T>
+inline QDebug operator<<(QDebug debug, const QContiguousCache<T> &cache)
+#endif
+{
+ debug.nospace() << "QContiguousCache(";
+ for (int i = cache.firstIndex(); i <= cache.lastIndex(); ++i) {
+ debug << cache[i];
+ if (i != cache.lastIndex())
+ debug << ", ";
+ }
+ debug << ")";
+ return debug.space();
+}
+
#if !defined(QT_NO_DEBUG_STREAM)
Q_CORE_EXPORT_INLINE QDebug qDebug() { return QDebug(QtDebugMsg); }
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/qiodevice.cpp b/src/corelib/io/qiodevice.cpp
index b6c4eb1..2ccc6ea 100644
--- a/src/corelib/io/qiodevice.cpp
+++ b/src/corelib/io/qiodevice.cpp
@@ -949,9 +949,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);
@@ -960,6 +960,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/qresource.cpp b/src/corelib/io/qresource.cpp
index 779a742..3b704f6 100644
--- a/src/corelib/io/qresource.cpp
+++ b/src/corelib/io/qresource.cpp
@@ -449,7 +449,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/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/kernel.pri b/src/corelib/kernel/kernel.pri
index d90ecae..68649a6 100644
--- a/src/corelib/kernel/kernel.pri
+++ b/src/corelib/kernel/kernel.pri
@@ -53,7 +53,8 @@ SOURCES += \
kernel/qvariant.cpp \
kernel/qcoreglobaldata.cpp \
kernel/qsharedmemory.cpp \
- kernel/qsystemsemaphore.cpp
+ kernel/qsystemsemaphore.cpp \
+ kernel/qpointer.cpp
win32 {
SOURCES += \
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index c21cf87..77ef096 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -1710,7 +1710,7 @@ QString QCoreApplication::applicationDirPath()
}
QCoreApplicationPrivate *d = self->d_func();
- if (d->cachedApplicationDirPath == QString())
+ if (d->cachedApplicationDirPath.isNull())
d->cachedApplicationDirPath = QFileInfo(applicationFilePath()).path();
return d->cachedApplicationDirPath;
}
@@ -1738,7 +1738,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/qobject.cpp b/src/corelib/kernel/qobject.cpp
index 287ac30..cfd8493 100644
--- a/src/corelib/kernel/qobject.cpp
+++ b/src/corelib/kernel/qobject.cpp
@@ -58,6 +58,7 @@
#include <qsemaphore.h>
#include <private/qorderedmutexlocker_p.h>
+#include <private/qmutexpool_p.h>
#include <new>
@@ -91,12 +92,35 @@ static int *queuedConnectionTypes(const QList<QByteArray> &typeNames)
return types;
}
+QBasicAtomicPointer<QMutexPool> signalSlotMutexes = Q_BASIC_ATOMIC_INITIALIZER(0);
+QBasicAtomicInt objectCount = Q_BASIC_ATOMIC_INITIALIZER(0);
+
+/** \internal
+ * mutex to be locked when accessing the connectionlists or the senders list
+ */
+static QMutex *signalSlotLock(const QObject *o)
+{
+ if (!signalSlotMutexes) {
+ QMutexPool *mp = new QMutexPool;
+ if (!signalSlotMutexes.testAndSetOrdered(0, mp)) {
+ delete mp;
+ }
+ }
+ return signalSlotMutexes->get(o);
+}
+
extern "C" Q_CORE_EXPORT void qt_addObject(QObject *)
{
+ objectCount.ref();
}
extern "C" Q_CORE_EXPORT void qt_removeObject(QObject *)
{
+ if(!objectCount.deref()) {
+ QMutexPool *old = signalSlotMutexes;
+ signalSlotMutexes.testAndSetAcquire(old, 0);
+ delete old;
+ }
}
QObjectPrivate::QObjectPrivate(int version)
@@ -223,7 +247,7 @@ bool QObjectPrivate::isSender(const QObject *receiver, const char *signal) const
int signal_index = q->metaObject()->indexOfSignal(signal);
if (signal_index < 0)
return false;
- QMutexLocker locker(&threadData->mutex);
+ QMutexLocker locker(signalSlotLock(q));
if (connectionLists) {
if (signal_index < connectionLists->count()) {
const ConnectionList &connectionList = connectionLists->at(signal_index);
@@ -245,7 +269,7 @@ QObjectList QObjectPrivate::receiverList(const char *signal) const
int signal_index = q->metaObject()->indexOfSignal(signal);
if (signal_index < 0)
return returnValue;
- QMutexLocker locker(&threadData->mutex);
+ QMutexLocker locker(signalSlotLock(q));
if (connectionLists) {
if (signal_index < connectionLists->count()) {
const ConnectionList &connectionList = connectionLists->at(signal_index);
@@ -263,7 +287,7 @@ QObjectList QObjectPrivate::receiverList(const char *signal) const
QObjectList QObjectPrivate::senderList() const
{
QObjectList returnValue;
- QMutexLocker locker(&threadData->mutex);
+ QMutexLocker locker(signalSlotLock(q_func()));
for (int i = 0; i < senders.count(); ++i)
returnValue << senders.at(i)->sender;
return returnValue;
@@ -712,7 +736,7 @@ QObject::~QObject()
emit destroyed(this);
{
- QMutexLocker locker(&d->threadData->mutex);
+ QMutexLocker locker(signalSlotLock(this));
// set ref to zero to indicate that this object has been deleted
if (d->currentSender != 0)
@@ -731,7 +755,7 @@ QObject::~QObject()
continue;
}
- QMutex *m = &c->receiver->d_func()->threadData->mutex;
+ QMutex *m = signalSlotLock(c->receiver);
bool needToUnlock = QOrderedMutexLocker::relock(locker.mutex(), m);
c = connectionList[i];
if (c->receiver)
@@ -752,23 +776,26 @@ QObject::~QObject()
}
// disconnect all senders
- for (int i = 0; i < d->senders.count(); ++i) {
+ for (int i = 0; i < d->senders.count(); ) {
QObjectPrivate::Connection *s = d->senders[i];
- if (!s->sender)
- continue;
- QMutex *m = &s->sender->d_func()->threadData->mutex;
+ QMutex *m = signalSlotLock(s->sender);
bool needToUnlock = QOrderedMutexLocker::relock(locker.mutex(), m);
- s = d->senders[i];
- s->receiver = 0;
- if (s->sender) {
- QObjectConnectionListVector *senderLists = s->sender->d_func()->connectionLists;
- if (senderLists)
- senderLists->dirty = true;
+ if (m < locker.mutex()) {
+ if (i >= d->senders.count() || s != d->senders[i]) {
+ if (needToUnlock)
+ m->unlock();
+ continue;
+ }
}
+ s->receiver = 0;
+ QObjectConnectionListVector *senderLists = s->sender->d_func()->connectionLists;
+ if (senderLists)
+ senderLists->dirty = true;
if (needToUnlock)
m->unlock();
+ ++i;
}
d->senders.clear();
@@ -2249,7 +2276,7 @@ QObject *QObject::sender() const
{
Q_D(const QObject);
- QMutexLocker(&d->threadData->mutex);
+ QMutexLocker(signalSlotLock(this));
if (!d->currentSender)
return 0;
@@ -2305,7 +2332,7 @@ int QObject::receivers(const char *signal) const
}
Q_D(const QObject);
- QMutexLocker locker(&d->threadData->mutex);
+ QMutexLocker locker(signalSlotLock(this));
if (d->connectionLists) {
if (signal_index < d->connectionLists->count()) {
const QObjectPrivate::ConnectionList &connectionList =
@@ -2752,8 +2779,8 @@ bool QMetaObject::connect(const QObject *sender, int signal_index,
c->connectionType = type;
c->argumentTypes = types;
- QOrderedMutexLocker locker(&s->d_func()->threadData->mutex,
- &r->d_func()->threadData->mutex);
+ QOrderedMutexLocker locker(signalSlotLock(sender),
+ signalSlotLock(receiver));
s->d_func()->addConnection(signal_index, c);
r->d_func()->senders.append(c);
@@ -2778,8 +2805,8 @@ bool QMetaObject::disconnect(const QObject *sender, int signal_index,
QObject *s = const_cast<QObject *>(sender);
QObject *r = const_cast<QObject *>(receiver);
- QMutex *senderMutex = &s->d_func()->threadData->mutex;
- QMutex *receiverMutex = r ? &r->d_func()->threadData->mutex : 0;
+ QMutex *senderMutex = signalSlotLock(sender);
+ QMutex *receiverMutex = receiver ? signalSlotLock(receiver) : 0;
QOrderedMutexLocker locker(senderMutex, receiverMutex);
QObjectConnectionListVector *connectionLists = s->d_func()->connectionLists;
@@ -2799,7 +2826,7 @@ bool QMetaObject::disconnect(const QObject *sender, int signal_index,
if (c->receiver
&& (r == 0 || (c->receiver == r
&& (method_index < 0 || c->method == method_index)))) {
- QMutex *m = &c->receiver->d_func()->threadData->mutex;
+ QMutex *m = signalSlotLock(c->receiver);
bool needToUnlock = false;
if (!receiverMutex && senderMutex != m) {
// need to relock this receiver and sender in the correct order
@@ -2826,7 +2853,7 @@ bool QMetaObject::disconnect(const QObject *sender, int signal_index,
if (c->receiver
&& (r == 0 || (c->receiver == r
&& (method_index < 0 || c->method == method_index)))) {
- QMutex *m = &c->receiver->d_func()->threadData->mutex;
+ QMutex *m = signalSlotLock(c->receiver);
bool needToUnlock = false;
if (!receiverMutex && senderMutex != m) {
// need to relock this receiver and sender in the correct order
@@ -2967,7 +2994,7 @@ static void blocking_activate(QObject *sender, int signal, QObjectPrivate::Conne
#else
QSemaphore semaphore;
queued_activate(sender, signal, c, argv, &semaphore);
- QMutex *mutex = &QThreadData::get2(sender->thread())->mutex;
+ QMutex *mutex = signalSlotLock(sender);
mutex->unlock();
semaphore.acquire();
mutex->lock();
@@ -2987,7 +3014,7 @@ void QMetaObject::activate(QObject *sender, int from_signal_index, int to_signal
argv ? argv : empty_argv);
}
- QMutexLocker locker(&sender->d_func()->threadData->mutex);
+ QMutexLocker locker(signalSlotLock(sender));
QThreadData *currentThreadData = QThreadData::current();
QObjectConnectionListVector *connectionLists = sender->d_func()->connectionLists;
@@ -3339,7 +3366,7 @@ void QObject::dumpObjectInfo()
objectName().isEmpty() ? "unnamed" : objectName().toLocal8Bit().data());
Q_D(QObject);
- QMutexLocker locker(&d->threadData->mutex);
+ QMutexLocker locker(signalSlotLock(this));
// first, look for connections where this object is the sender
qDebug(" SIGNALS OUT");
diff --git a/src/corelib/kernel/qsharedmemory.cpp b/src/corelib/kernel/qsharedmemory.cpp
index 9853079..87e154f 100644
--- a/src/corelib/kernel/qsharedmemory.cpp
+++ b/src/corelib/kernel/qsharedmemory.cpp
@@ -129,6 +129,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/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/qvariant.cpp b/src/corelib/kernel/qvariant.cpp
index b53e91f..2ff9818 100644
--- a/src/corelib/kernel/qvariant.cpp
+++ b/src/corelib/kernel/qvariant.cpp
@@ -1021,7 +1021,7 @@ static bool convert(const QVariant::Private *d, QVariant::Type t, void *result,
#if !defined(QT_NO_DEBUG_STREAM) && !defined(Q_BROKEN_DEBUG_STREAM)
static void streamDebug(QDebug dbg, const QVariant &v)
{
- switch (v.type()) {
+ switch (v.userType()) {
case QVariant::Int:
dbg.nospace() << v.toInt();
break;
@@ -1034,6 +1034,9 @@ static void streamDebug(QDebug dbg, const QVariant &v)
case QVariant::ULongLong:
dbg.nospace() << v.toULongLong();
break;
+ case QMetaType::Float:
+ dbg.nospace() << qVariantValue<float>(v);
+ break;
case QVariant::Double:
dbg.nospace() << v.toDouble();
break;
@@ -1173,8 +1176,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/qcontiguouscache.cpp b/src/corelib/tools/qcontiguouscache.cpp
new file mode 100644
index 0000000..7db3a5a
--- /dev/null
+++ b/src/corelib/tools/qcontiguouscache.cpp
@@ -0,0 +1,435 @@
+/****************************************************************************
+**
+** 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 "qcontiguouscache.h"
+#include <QDebug>
+
+QT_BEGIN_NAMESPACE
+
+void QContiguousCacheData::dump() const
+{
+ qDebug() << "capacity:" << alloc;
+ qDebug() << "count:" << count;
+ qDebug() << "start:" << start;
+ qDebug() << "offset:" << offset;
+}
+
+/*! \class QContiguousCache
+ \brief The QContiguousCache class is a template class that provides a contiguous cache.
+ \ingroup tools
+ \ingroup shared
+ \reentrant
+
+ The QContiguousCache class provides an efficient way of caching items for
+ display in a user interface view. Unlike QCache, it adds a restriction
+ that elements within the cache are contiguous. This has the advantage
+ of matching how user interface views most commonly request data, as
+ a set of rows localized around the current scrolled position. This
+ restriction allows the cache to consume less memory and processor
+ cycles than QCache. The QContiguousCache class also can provide
+ an upper bound on memory usage via setCapacity().
+
+ The simplest way of using a contiguous cache is to use the append()
+ and prepend().
+
+\code
+MyRecord record(int row) const
+{
+ Q_ASSERT(row >= 0 && row < count());
+
+ while(row > cache.lastIndex())
+ cache.append(slowFetchRecord(cache.lastIndex()+1));
+ while(row < cache.firstIndex())
+ cache.prepend(slowFetchRecord(cache.firstIndex()-1));
+
+ return cache.at(row);
+}
+\endcode
+
+ If the cache is full then the item at the opposite end of the cache from
+ where the new item is appended or prepended will be removed.
+
+ This usage can be further optimized by using the insert() function
+ in the case where the requested row is a long way from the currently cached
+ items. If there is a gap between where the new item is inserted and the currently
+ cached items then the existing cached items are first removed to retain
+ the contiguous nature of the cache. Hence it is important to take some care then
+ when using insert() in order to avoid unwanted clearing of the cache.
+
+ The range of valid indexes for the QContiguousCache class are from
+ 0 to INT_MAX. Calling prepend() such that the first index would become less
+ than 0 or append() such that the last index would become greater
+ than INT_MAX can result in the indexes of the cache being invalid.
+ When the cache indexes are invalid it is important to call
+ normalizeIndexes() before calling any of containsIndex(), firstIndex(),
+ lastIndex(), at() or the [] operator. Calling these
+ functions when the cache has invalid indexes will result in undefined
+ behavior. The indexes can be checked by using areIndexesValid()
+
+ In most cases the indexes will not exceed 0 to INT_MAX, and
+ normalizeIndexes() will not need to be used.
+
+ See the \l{Contiguous Cache Example}{Contiguous Cache} example.
+*/
+
+/*! \fn QContiguousCache::QContiguousCache(int capacity)
+
+ Constructs a cache with the given \a capacity.
+
+ \sa setCapacity()
+*/
+
+/*! \fn QContiguousCache::QContiguousCache(const QContiguousCache<T> &other)
+
+ Constructs a copy of \a other.
+
+ This operation takes \l{constant time}, because QContiguousCache is
+ \l{implicitly shared}. This makes returning a QContiguousCache from a
+ function very fast. If a shared instance is modified, it will be
+ copied (copy-on-write), and that takes \l{linear time}.
+
+ \sa operator=()
+*/
+
+/*! \fn QContiguousCache::~QContiguousCache()
+
+ Destroys the cache.
+*/
+
+/*! \fn void QContiguousCache::detach()
+
+ \internal
+*/
+
+/*! \fn bool QContiguousCache::isDetached() const
+
+ \internal
+*/
+
+/*! \fn void QContiguousCache::setSharable(bool sharable)
+
+ \internal
+*/
+
+/*! \fn QContiguousCache<T> &QContiguousCache::operator=(const QContiguousCache<T> &other)
+
+ Assigns \a other to this cache and returns a reference to this cache.
+*/
+
+/*! \fn bool QContiguousCache::operator==(const QContiguousCache<T> &other) const
+
+ Returns true if \a other is equal to this cache; otherwise returns false.
+
+ Two caches are considered equal if they contain the same values at the same
+ indexes. This function requires the value type to implement the \c operator==().
+
+ \sa operator!=()
+*/
+
+/*! \fn bool QContiguousCache::operator!=(const QContiguousCache<T> &other) const
+
+ Returns true if \a other is not equal to this cache; otherwise
+ returns false.
+
+ Two caches are considered equal if they contain the same values at the same
+ indexes. This function requires the value type to implement the \c operator==().
+
+ \sa operator==()
+*/
+
+/*! \fn int QContiguousCache::capacity() const
+
+ Returns the number of items the cache can store before it is full.
+ When a cache contains a number of items equal to its capacity, adding new
+ items will cause items farthest from the added item to be removed.
+
+ \sa setCapacity(), size()
+*/
+
+/*! \fn int QContiguousCache::count() const
+
+ \overload
+
+ Same as size().
+*/
+
+/*! \fn int QContiguousCache::size() const
+
+ Returns the number of items contained within the cache.
+
+ \sa capacity()
+*/
+
+/*! \fn bool QContiguousCache::isEmpty() const
+
+ Returns true if no items are stored within the cache.
+
+ \sa size(), capacity()
+*/
+
+/*! \fn bool QContiguousCache::isFull() const
+
+ Returns true if the number of items stored within the cache is equal
+ to the capacity of the cache.
+
+ \sa size(), capacity()
+*/
+
+/*! \fn int QContiguousCache::available() const
+
+ Returns the number of items that can be added to the cache before it becomes full.
+
+ \sa size(), capacity(), isFull()
+*/
+
+/*! \fn void QContiguousCache::clear()
+
+ Removes all items from the cache. The capacity is unchanged.
+*/
+
+/*! \fn void QContiguousCache::setCapacity(int size)
+
+ Sets the capacity of the cache to the given \a size. A cache can hold a
+ number of items equal to its capacity. When inserting, appending or prepending
+ items to the cache, if the cache is already full then the item farthest from
+ the added item will be removed.
+
+ If the given \a size is smaller than the current count of items in the cache
+ then only the last \a size items from the cache will remain.
+
+ \sa capacity(), isFull()
+*/
+
+/*! \fn const T &QContiguousCache::at(int i) const
+
+ Returns the item at index position \a i in the cache. \a i must
+ be a valid index position in the cache (i.e, firstIndex() <= \a i <= lastIndex()).
+
+ The indexes in the cache refer to the number of positions the item is from the
+ first item appended into the cache. That is to say a cache with a capacity of
+ 100, that has had 150 items appended will have a valid index range of
+ 50 to 149. This allows inserting and retrieving items into the cache based
+ on a theoretical infinite list
+
+ \sa firstIndex(), lastIndex(), insert(), operator[]()
+*/
+
+/*! \fn T &QContiguousCache::operator[](int i)
+
+ Returns the item at index position \a i as a modifiable reference. If
+ the cache does not contain an item at the given index position \a i
+ then it will first insert an empty item at that position.
+
+ In most cases it is better to use either at() or insert().
+
+ Note that using non-const operators can cause QContiguousCache to do a deep
+ copy.
+
+ \sa insert(), at()
+*/
+
+/*! \fn const T &QContiguousCache::operator[](int i) const
+
+ \overload
+
+ Same as at(\a i).
+*/
+
+/*! \fn void QContiguousCache::append(const T &value)
+
+ Inserts \a value at the end of the cache. If the cache is already full
+ the item at the start of the cache will be removed.
+
+ \sa prepend(), insert(), isFull()
+*/
+
+/*! \fn void QContiguousCache::prepend(const T &value)
+
+ Inserts \a value at the start of the cache. If the cache is already full
+ the item at the end of the cache will be removed.
+
+ \sa append(), insert(), isFull()
+*/
+
+/*! \fn void QContiguousCache::insert(int i, const T &value)
+
+ Inserts the \a value at the index position \a i. If the cache already contains
+ an item at \a i then that value is replaced. If \a i is either one more than
+ lastIndex() or one less than firstIndex() it is the equivalent to an append()
+ or a prepend().
+
+ If the given index \a i is not within the current range of the cache nor adjacent
+ to the bounds of the cache's index range, the cache is first cleared before
+ inserting the item. At this point the cache will have a size of 1. It is
+ worthwhile taking effort to insert items in an order that starts adjacent
+ to the current index range for the cache.
+
+ The range of valid indexes for the QContiguousCache class are from
+ 0 to INT_MAX. Inserting outside of this range has undefined behavior.
+
+
+ \sa prepend(), append(), isFull(), firstIndex(), lastIndex()
+*/
+
+/*! \fn bool QContiguousCache::containsIndex(int i) const
+
+ Returns true if the cache's index range includes the given index \a i.
+
+ \sa firstIndex(), lastIndex()
+*/
+
+/*! \fn int QContiguousCache::firstIndex() const
+
+ Returns the first valid index in the cache. The index will be invalid if the
+ cache is empty.
+
+ \sa capacity(), size(), lastIndex()
+*/
+
+/*! \fn int QContiguousCache::lastIndex() const
+
+ Returns the last valid index in the cache. The index will be invalid if the cache is empty.
+
+ \sa capacity(), size(), firstIndex()
+*/
+
+
+/*! \fn T &QContiguousCache::first()
+
+ Returns a reference to the first item in the cache. This function
+ assumes that the cache isn't empty.
+
+ \sa last(), isEmpty()
+*/
+
+/*! \fn T &QContiguousCache::last()
+
+ Returns a reference to the last item in the cache. This function
+ assumes that the cache isn't empty.
+
+ \sa first(), isEmpty()
+*/
+
+/*! \fn const T& QContiguousCache::first() const
+
+ \overload
+*/
+
+/*! \fn const T& QContiguousCache::last() const
+
+ \overload
+*/
+
+/*! \fn void QContiguousCache::removeFirst()
+
+ Removes the first item from the cache. This function assumes that
+ the cache isn't empty.
+
+ \sa removeLast()
+*/
+
+/*! \fn void QContiguousCache::removeLast()
+
+ Removes the last item from the cache. This function assumes that
+ the cache isn't empty.
+
+ \sa removeFirst()
+*/
+
+/*! \fn T QContiguousCache::takeFirst()
+
+ Removes the first item in the cache and returns it. This function
+ assumes that the cache isn't empty.
+
+ If you don't use the return value, removeFirst() is more efficient.
+
+ \sa takeLast(), removeFirst()
+*/
+
+/*! \fn T QContiguousCache::takeLast()
+
+ Removes the last item in the cache and returns it. This function
+ assumes that the cache isn't empty.
+
+ If you don't use the return value, removeLast() is more efficient.
+
+ \sa takeFirst(), removeLast()
+*/
+
+/*! \fn void QContiguousCache::normalizeIndexes()
+
+ Moves the first index and last index of the cache
+ such that they point to valid indexes. The function does not modify
+ the contents of the cache or the ordering of elements within the cache.
+
+ It is provided so that index overflows can be corrected when using the
+ cache as a circular buffer.
+
+ \code
+ QContiguousCache<int> cache(10);
+ cache.insert(INT_MAX, 1); // cache contains one value and has valid indexes, INT_MAX to INT_MAX
+ cache.append(2); // cache contains two values but does not have valid indexes.
+ cache.normalizeIndexes(); // cache has two values, 1 and 2. New first index will be in the range of 0 to capacity().
+ \endcode
+
+ \sa areIndexesValid(), append(), prepend()
+*/
+
+/*! \fn bool QContiguousCache::areIndexesValid() const
+
+ Returns whether the indexes for items stored in the cache are valid.
+ Indexes can become invalid if items are appended after the index position
+ INT_MAX or prepended before the index position 0. This is only expected
+ to occur in very long lived circular buffer style usage of the
+ contiguous cache. Indexes can be made valid again by calling
+ normalizeIndexs().
+
+ \sa normalizeIndexes(), append(), prepend()
+*/
+
+/*! \fn void QContiguousCache::dump() const
+
+ \internal
+
+ Sends information about the cache's internal structure to qDebug()
+*/
+
+QT_END_NAMESPACE
diff --git a/src/corelib/tools/qcontiguouscache.h b/src/corelib/tools/qcontiguouscache.h
new file mode 100644
index 0000000..5cd1582
--- /dev/null
+++ b/src/corelib/tools/qcontiguouscache.h
@@ -0,0 +1,424 @@
+/****************************************************************************
+**
+** 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$
+**
+****************************************************************************/
+
+#ifndef QCONTIGUOUSCACHE_H
+#define QCONTIGUOUSCACHE_H
+
+#include <QtCore/qatomic.h>
+#include <limits.h>
+
+QT_BEGIN_HEADER
+
+QT_BEGIN_NAMESPACE
+
+QT_MODULE(Core)
+
+struct Q_CORE_EXPORT QContiguousCacheData
+{
+ QBasicAtomicInt ref;
+ int alloc;
+ int count;
+ int start;
+ int offset;
+ uint sharable : 1;
+
+ void dump() const;
+};
+
+template <typename T>
+struct QContiguousCacheTypedData
+{
+ QBasicAtomicInt ref;
+ int alloc;
+ int count;
+ int start;
+ int offset;
+ uint sharable : 1;
+
+ T array[1];
+};
+
+template<typename T>
+class QContiguousCache {
+ typedef QContiguousCacheTypedData<T> Data;
+ union { QContiguousCacheData *p; QContiguousCacheTypedData<T> *d; };
+public:
+ explicit QContiguousCache(int capacity = 0);
+ QContiguousCache(const QContiguousCache<T> &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
+
+ inline ~QContiguousCache() { if (!d) return; if (!d->ref.deref()) free(d); }
+
+ inline void detach() { if (d->ref != 1) detach_helper(); }
+ inline bool isDetached() const { return d->ref == 1; }
+ inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
+
+ QContiguousCache<T> &operator=(const QContiguousCache<T> &other);
+ bool operator==(const QContiguousCache<T> &other) const;
+ inline bool operator!=(const QContiguousCache<T> &other) const { return !(*this == other); }
+
+ inline int capacity() const {return d->alloc; }
+ inline int count() const { return d->count; }
+ inline int size() const { return d->count; }
+
+ inline bool isEmpty() const { return d->count == 0; }
+ inline bool isFull() const { return d->count == d->alloc; }
+ inline int available() const { return d->alloc - d->count; }
+
+ void clear();
+ void setCapacity(int size);
+
+ const T &at(int pos) const;
+ T &operator[](int i);
+ const T &operator[](int i) const;
+
+ void append(const T &value);
+ void prepend(const T &value);
+ void insert(int pos, const T &value);
+
+ inline bool containsIndex(int pos) const { return pos >= d->offset && pos - d->offset < d->count; }
+ inline int firstIndex() const { return d->offset; }
+ inline int lastIndex() const { return d->offset + d->count - 1; }
+
+ inline const T &first() const { Q_ASSERT(!isEmpty()); return d->array[d->start]; }
+ inline const T &last() const { Q_ASSERT(!isEmpty()); return d->array[(d->start + d->count -1) % d->alloc]; }
+ inline T &first() { Q_ASSERT(!isEmpty()); detach(); return d->array[d->start]; }
+ inline T &last() { Q_ASSERT(!isEmpty()); detach(); return d->array[(d->start + d->count -1) % d->alloc]; }
+
+ void removeFirst();
+ T takeFirst();
+ void removeLast();
+ T takeLast();
+
+ inline bool areIndexesValid() const
+ { return d->offset >= 0 && d->offset < INT_MAX - d->count && (d->offset % d->alloc) == d->start; }
+
+ inline void normalizeIndexes() { d->offset = d->start; }
+ // debug
+ void dump() const { p->dump(); }
+private:
+ void detach_helper();
+
+ QContiguousCacheData *malloc(int aalloc);
+ void free(Data *x);
+ int sizeOfTypedData() {
+ // this is more or less the same as sizeof(Data), except that it doesn't
+ // count the padding at the end
+ return reinterpret_cast<const char *>(&(reinterpret_cast<const Data *>(this))->array[1]) - reinterpret_cast<const char *>(this);
+ }
+};
+
+template <typename T>
+void QContiguousCache<T>::detach_helper()
+{
+ union { QContiguousCacheData *p; QContiguousCacheTypedData<T> *d; } x;
+
+ x.p = malloc(d->alloc);
+ x.d->ref = 1;
+ x.d->count = d->count;
+ x.d->start = d->start;
+ x.d->offset = d->offset;
+ x.d->alloc = d->alloc;
+ x.d->sharable = true;
+
+ T *dest = x.d->array + x.d->start;
+ T *src = d->array + d->start;
+ int count = x.d->count;
+ while (count--) {
+ if (QTypeInfo<T>::isComplex) {
+ new (dest) T(*src);
+ } else {
+ *dest = *src;
+ }
+ dest++;
+ if (dest == x.d->array + x.d->alloc)
+ dest = x.d->array;
+ src++;
+ if (src == d->array + d->alloc)
+ src = d->array;
+ }
+
+ if (!d->ref.deref())
+ free(d);
+ d = x.d;
+}
+
+template <typename T>
+void QContiguousCache<T>::setCapacity(int asize)
+{
+ if (asize == d->alloc)
+ return;
+ detach();
+ union { QContiguousCacheData *p; QContiguousCacheTypedData<T> *d; } x;
+ x.p = malloc(asize);
+ x.d->alloc = asize;
+ x.d->count = qMin(d->count, asize);
+ x.d->offset = d->offset + d->count - x.d->count;
+ x.d->start = x.d->offset % x.d->alloc;
+ T *dest = x.d->array + (x.d->start + x.d->count-1) % x.d->alloc;
+ T *src = d->array + (d->start + d->count-1) % d->alloc;
+ int count = x.d->count;
+ while (count--) {
+ if (QTypeInfo<T>::isComplex) {
+ new (dest) T(*src);
+ } else {
+ *dest = *src;
+ }
+ if (dest == x.d->array)
+ dest = x.d->array + x.d->alloc;
+ dest--;
+ if (src == d->array)
+ src = d->array + d->alloc;
+ src--;
+ }
+ /* free old */
+ free(d);
+ d = x.d;
+}
+
+template <typename T>
+void QContiguousCache<T>::clear()
+{
+ if (d->ref == 1) {
+ if (QTypeInfo<T>::isComplex) {
+ int count = d->count;
+ T * i = d->array + d->start;
+ T * e = d->array + d->alloc;
+ while (count--) {
+ i->~T();
+ i++;
+ if (i == e)
+ i = d->array;
+ }
+ }
+ d->count = d->start = d->offset = 0;
+ } else {
+ union { QContiguousCacheData *p; QContiguousCacheTypedData<T> *d; } x;
+ x.p = malloc(d->alloc);
+ x.d->ref = 1;
+ x.d->alloc = d->alloc;
+ x.d->count = x.d->start = x.d->offset = 0;
+ x.d->sharable = true;
+ if (!d->ref.deref()) free(d);
+ d = x.d;
+ }
+}
+
+template <typename T>
+inline QContiguousCacheData *QContiguousCache<T>::malloc(int aalloc)
+{
+ return static_cast<QContiguousCacheData *>(qMalloc(sizeOfTypedData() + (aalloc - 1) * sizeof(T)));
+}
+
+template <typename T>
+QContiguousCache<T>::QContiguousCache(int capacity)
+{
+ p = malloc(capacity);
+ d->ref = 1;
+ d->alloc = capacity;
+ d->count = d->start = d->offset = 0;
+ d->sharable = true;
+}
+
+template <typename T>
+QContiguousCache<T> &QContiguousCache<T>::operator=(const QContiguousCache<T> &other)
+{
+ other.d->ref.ref();
+ if (!d->ref.deref())
+ free(d);
+ d = other.d;
+ if (!d->sharable)
+ detach_helper();
+ return *this;
+}
+
+template <typename T>
+bool QContiguousCache<T>::operator==(const QContiguousCache<T> &other) const
+{
+ if (other.d == d)
+ return true;
+ if (other.d->start != d->start
+ || other.d->count != d->count
+ || other.d->offset != d->offset
+ || other.d->alloc != d->alloc)
+ return false;
+ for (int i = firstIndex(); i <= lastIndex(); ++i)
+ if (!(at(i) == other.at(i)))
+ return false;
+ return true;
+}
+
+template <typename T>
+void QContiguousCache<T>::free(Data *x)
+{
+ if (QTypeInfo<T>::isComplex) {
+ int count = d->count;
+ T * i = d->array + d->start;
+ T * e = d->array + d->alloc;
+ while (count--) {
+ i->~T();
+ i++;
+ if (i == e)
+ i = d->array;
+ }
+ }
+ qFree(x);
+}
+template <typename T>
+void QContiguousCache<T>::append(const T &value)
+{
+ detach();
+ if (QTypeInfo<T>::isComplex) {
+ if (d->count == d->alloc)
+ (d->array + (d->start+d->count) % d->alloc)->~T();
+ new (d->array + (d->start+d->count) % d->alloc) T(value);
+ } else {
+ d->array[(d->start+d->count) % d->alloc] = value;
+ }
+
+ if (d->count == d->alloc) {
+ d->start++;
+ d->start %= d->alloc;
+ d->offset++;
+ } else {
+ d->count++;
+ }
+}
+
+template<typename T>
+void QContiguousCache<T>::prepend(const T &value)
+{
+ detach();
+ if (d->start)
+ d->start--;
+ else
+ d->start = d->alloc-1;
+ d->offset--;
+
+ if (d->count != d->alloc)
+ d->count++;
+ else
+ if (d->count == d->alloc)
+ (d->array + d->start)->~T();
+
+ if (QTypeInfo<T>::isComplex)
+ new (d->array + d->start) T(value);
+ else
+ d->array[d->start] = value;
+}
+
+template<typename T>
+void QContiguousCache<T>::insert(int pos, const T &value)
+{
+ Q_ASSERT_X(pos >= 0 && pos < INT_MAX, "QContiguousCache<T>::insert", "index out of range");
+ detach();
+ if (containsIndex(pos)) {
+ if(QTypeInfo<T>::isComplex)
+ new (d->array + pos % d->alloc) T(value);
+ else
+ d->array[pos % d->alloc] = value;
+ } else if (pos == d->offset-1)
+ prepend(value);
+ else if (pos == d->offset+d->count)
+ append(value);
+ else {
+ // we don't leave gaps.
+ clear();
+ d->offset = pos;
+ d->start = pos % d->alloc;
+ d->count = 1;
+ if (QTypeInfo<T>::isComplex)
+ new (d->array + d->start) T(value);
+ else
+ d->array[d->start] = value;
+ }
+}
+
+template <typename T>
+inline const T &QContiguousCache<T>::at(int pos) const
+{ Q_ASSERT_X(pos >= d->offset && pos - d->offset < d->count, "QContiguousCache<T>::at", "index out of range"); return d->array[pos % d->alloc]; }
+template <typename T>
+inline const T &QContiguousCache<T>::operator[](int pos) const
+{ Q_ASSERT_X(pos >= d->offset && pos - d->offset < d->count, "QContiguousCache<T>::at", "index out of range"); return d->array[pos % d->alloc]; }
+
+template <typename T>
+inline T &QContiguousCache<T>::operator[](int pos)
+{
+ detach();
+ if (!containsIndex(pos))
+ insert(pos, T());
+ return d->array[pos % d->alloc];
+}
+
+template <typename T>
+inline void QContiguousCache<T>::removeFirst()
+{
+ Q_ASSERT(d->count > 0);
+ detach();
+ d->count--;
+ if (QTypeInfo<T>::isComplex)
+ (d->array + d->start)->~T();
+ d->start = (d->start + 1) % d->alloc;
+ d->offset++;
+}
+
+template <typename T>
+inline void QContiguousCache<T>::removeLast()
+{
+ Q_ASSERT(d->count > 0);
+ detach();
+ d->count--;
+ if (QTypeInfo<T>::isComplex)
+ (d->array + (d->start + d->count) % d->alloc)->~T();
+}
+
+template <typename T>
+inline T QContiguousCache<T>::takeFirst()
+{ T t = first(); removeFirst(); return t; }
+
+template <typename T>
+inline T QContiguousCache<T>::takeLast()
+{ T t = last(); removeLast(); return t; }
+
+QT_END_NAMESPACE
+
+QT_END_HEADER
+
+#endif
diff --git a/src/corelib/tools/qdumper.cpp b/src/corelib/tools/qdumper.cpp
deleted file mode 100644
index c3b8524..0000000
--- a/src/corelib/tools/qdumper.cpp
+++ /dev/null
@@ -1,1157 +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 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 <qdatetime.h>
-#include <qdebug.h>
-#include <qdir.h>
-#include <qfileinfo.h>
-#include <qhash.h>
-#include <qmap.h>
-#include <qmetaobject.h>
-#include <qobject.h>
-#include <qstring.h>
-#include <qvariant.h>
-#include <qvector.h>
-
-#if !defined(Q_OS_WINCE) && !defined(QT_NO_DUMPER)
-
-#include <stdlib.h>
-#include <stdio.h>
-
-#ifdef Q_OS_WIN
-# include <windows.h>
-#endif
-
-QT_BEGIN_NAMESPACE
-
-namespace {
-
-// This is used to abort evaluation of custom data dumpers in a "coordinated"
-// way. Abortion will happen anyway when we try to access a non-initialized
-// non-trivial object, so there is no way to prevent this from occuring at all
-// conceptionally. Gdb will catch SIGSEGV and return to the calling frame.
-// This is just fine provided we only _read_ memory in the custom handlers
-// below.
-
-volatile int qProvokeSegFaultHelper;
-
-static void qCheckAccess(const void *d)
-{
- // provoke segfault when address is not readable
- qProvokeSegFaultHelper = *(char*)d;
-}
-
-static void qCheckPointer(const void *d)
-{
- if (!d)
- return;
- qProvokeSegFaultHelper = *(char*)d;
-}
-
-static void qProvokeSegFault()
-{
- // provoke segfault unconditionally
- qCheckAccess(0);
-}
-
-static char qDumpInBuffer[100];
-static char qDumpBuffer[1000];
-#ifdef Q_OS_WIN
-static char qDumpBuffer2[sizeof(qDumpBuffer) + 100];
-#endif
-
-static char toHex(int n)
-{
- return n < 10 ? '0' + n : 'a' - 10 + n;
-}
-
-
-struct QDumper
-{
- explicit QDumper();
- ~QDumper();
- void flush();
- QDumper &operator<<(long c);
- QDumper &operator<<(int i);
- QDumper &operator<<(unsigned long c);
- QDumper &operator<<(unsigned int i);
- QDumper &operator<<(const void *p);
- void put(char c);
- void addCommaIfNeeded();
- void putEncoded(unsigned c);
- QDumper &operator<<(const char *str);
- QDumper &operator<<(const QString &str);
- void disarm();
-
- void beginHash(); // start of data hash output
- void endHash(); // start of data hash output
-
- // the dumper arguments
- int protocolVersion; // dumper protocol version
- int token; // some token to show on success
- const char *outertype; // object type
- const char *iname; // object name used for display
- const char *exp; // object expression
- const char *innertype; // 'inner type' for class templates
- const void *data; // pointer to raw data
- bool dumpChildren; // do we want to see children?
-
- // handling of nested templates
- void setupTemplateParameters();
- enum { maxTemplateParameters = 10 };
- const char *templateParameters[maxTemplateParameters + 1];
- int templateParametersCount;
-
- // internal state
- bool success; // are we finished?
- size_t pos;
-};
-
-
-QDumper::QDumper()
-{
- success = false;
- pos = 0;
-}
-
-QDumper::~QDumper()
-{
- flush();
- put(0); // our end marker
-#ifdef Q_OS_WIN
- sprintf(qDumpBuffer2, "@@CDD/%d/done\n", token);
- OutputDebugStringA(qDumpBuffer2);
-#else
- fprintf(stderr, "%d/done\n", token);
-#endif
- qDumpInBuffer[0] = 0;
-}
-
-void QDumper::flush()
-{
- qDumpBuffer[pos++] = 0;
-#ifdef Q_OS_WIN
- sprintf(qDumpBuffer2, "@@CDD#%d#%d,%s\n", token, int(pos - 1), qDumpBuffer);
- OutputDebugStringA(qDumpBuffer2);
-#else
- fprintf(stderr, "%d#%d,%s\n", token, int(pos - 1), qDumpBuffer);
-#endif
- pos = 0;
-}
-
-void QDumper::setupTemplateParameters()
-{
- char *s = const_cast<char *>(innertype);
-
- templateParametersCount = 1;
- templateParameters[0] = s;
- for (int i = 1; i != maxTemplateParameters + 1; ++i)
- templateParameters[i] = 0;
-
- while (*s) {
- while (*s && *s != '@')
- ++s;
- if (*s) {
- *s = '\0';
- ++s;
- templateParameters[templateParametersCount++] = s;
- }
- }
-}
-
-QDumper &QDumper::operator<<(unsigned long c)
-{
- static char buf[100];
- sprintf(buf, "%lu", c);
- return (*this) << buf;
-}
-
-QDumper &QDumper::operator<<(unsigned int i)
-{
- static char buf[100];
- sprintf(buf, "%u", i);
- return (*this) << buf;
-}
-
-QDumper &QDumper::operator<<(long c)
-{
- static char buf[100];
- sprintf(buf, "%ld", c);
- return (*this) << buf;
-}
-
-QDumper &QDumper::operator<<(int i)
-{
- static char buf[100];
- sprintf(buf, "%d", i);
- return (*this) << buf;
-}
-
-QDumper &QDumper::operator<<(const void *p)
-{
- static char buf[100];
- sprintf(buf, "%p", p);
- // we get a '0x' prefix only on some implementations.
- // if it isn't there, write it out manually.
- if (buf[1] != 'x') {
- put('0');
- put('x');
- }
- return (*this) << buf;
-}
-
-void QDumper::put(char c)
-{
- if (pos >= sizeof(qDumpBuffer) - 100)
- flush();
- qDumpBuffer[pos++] = c;
-}
-
-void QDumper::addCommaIfNeeded()
-{
- if (pos == 0)
- return;
- if (qDumpBuffer[pos - 1] == '}' || qDumpBuffer[pos - 1] == '"')
- put(',');
-}
-
-void QDumper::putEncoded(unsigned c)
-{
- if (c >= 32 && c <= 126 && c != '"' && c != '\\') {
- put(c);
- } else {
- put('\\');
- put('u');
- put(toHex((c >> 12) & 0xf));
- put(toHex((c >> 8) & 0xf));
- put(toHex((c >> 4) & 0xf));
- put(toHex( c & 0xf));
- }
-}
-
-QDumper &QDumper::operator<<(const char *str)
-{
- while (*str)
- put(*(str++));
- return *this;
-}
-
-QDumper &QDumper::operator<<(const QString &str)
-{
- int n = str.size();
- if (n < 0) {
- qProvokeSegFault();
- } else {
- //(*this) << "[" << n << "]";
- if (n > 1000000)
- n = 1000000;
- //put(' ');
- put('\\');
- put('"');
- for (int i = 0; i != n; ++i)
- putEncoded(str[i].unicode());
- put('\\');
- put('"');
- if (n < str.size())
- (*this) << "<incomplete string>";
- }
- return *this;
-}
-
-void QDumper::disarm()
-{
- flush();
- success = true;
-}
-
-void QDumper::beginHash()
-{
- addCommaIfNeeded();
- put('{');
-}
-
-void QDumper::endHash()
-{
- put('}');
-}
-
-
-//
-// Some helpers to keep the dumper code short
-//
-
-// dump property=value pair
-#undef P
-#define P(dumper,name,value) \
- do { \
- dumper.addCommaIfNeeded(); \
- dumper << (name) << "=\"" << value << "\""; \
- } while (0)
-
-// simple string property
-#undef S
-#define S(dumper, name, value) \
- dumper.beginHash(); \
- P(dumper, "name", name); \
- P(dumper, "value", value); \
- P(dumper, "type", "QString"); \
- P(dumper, "numchild", "0"); \
- dumper.endHash();
-
-// simple integer property
-#undef I
-#define I(dumper, name, value) \
- dumper.beginHash(); \
- P(dumper, "name", name); \
- P(dumper, "value", value); \
- P(dumper, "type", "int"); \
- P(dumper, "numchild", "0"); \
- dumper.endHash();
-
-// simple boolean property
-#undef BL
-#define BL(dumper, name, value) \
- dumper.beginHash(); \
- P(dumper, "name", name); \
- P(dumper, "value", (value ? "true" : "false")); \
- P(dumper, "type", "bool"); \
- P(dumper, "numchild", "0"); \
- dumper.endHash();
-
-#undef TT
-#define TT(type, value) \
- "<tr><td>" << type << "</td><td> : </td><td>" << value << "</td></tr>"
-
-static void qDumpUnknown(QDumper &d)
-{
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", "<internal error>");
- P(d, "type", d.outertype);
- P(d, "numchild", "0");
- d.disarm();
-}
-
-static void qDumpQPropertyList(QDumper &d)
-{
- const QObject *ob = (const QObject *)d.data;
- const QMetaObject *mo = ob->metaObject();
- P(d, "iname", d.iname);
- P(d, "addr", "<synthetic>");
- P(d, "type", "QObject");
- P(d, "numchild", mo->propertyCount());
- if (d.dumpChildren) {
- d << ",children=[";
- for (int i = mo->propertyCount(); --i >= 0; ) {
- const QMetaProperty & prop = mo->property(i);
- d.beginHash();
- P(d, "name", prop.name());
- if (QLatin1String(prop.typeName()) == QLatin1String("QString")) {
- P(d, "value", prop.read(ob).toString());
- P(d, "numchild", "0");
- } else if (QLatin1String(prop.typeName()) == QLatin1String("bool")) {
- P(d, "value", (prop.read(ob).toBool() ? "true" : "false"));
- P(d, "numchild", "0");
- } else if (QLatin1String(prop.typeName()) == QLatin1String("int")) {
- P(d, "value", prop.read(ob).toInt());
- P(d, "numchild", "0");
- } else {
- P(d, "exp", "((" << mo->className() << "*)" << ob
- << ")->" << prop.name() << "()");
- }
- P(d, "type", prop.typeName());
- P(d, "numchild", "1");
- d.endHash();
- }
- d << "]";
- }
- d.disarm();
-}
-
-static void qDumpQObject(QDumper &d)
-{
- const QObject *ob = reinterpret_cast<const QObject *>(d.data);
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", (void*)d.data);
- P(d, "type", "QObject");
- P(d, "numchild", 4);
- if (d.dumpChildren) {
- const QMetaObject *mo = ob->metaObject();
- const QObjectList &children = ob->children();
- d << ",children=[";
- S(d, "objectName", ob->objectName());
- d.beginHash();
- P(d, "name", "properties");
- // FIXME: Note that when simply using '(QObject*)'
- // in the cast below, Gdb/MI _sometimes misparses
- // expressions further down in the tree.
- P(d, "exp", "*(class QObject*)" << d.data);
- P(d, "type", "QPropertyList");
- P(d, "value", "<" << mo->propertyCount() << " items>");
- P(d, "numchild", mo->propertyCount());
- d.endHash();
- d.beginHash();
- P(d, "name", "children");
- P(d, "exp", "((class QObject*)" << d.data << ")->children()");
- P(d, "type", "QList<QObject *>");
- P(d, "value", "<" << children.size() << " items>");
- P(d, "numchild", children.size());
- d.endHash();
- d.beginHash();
- P(d, "name", "parent");
- P(d, "exp", "((class QObject*)" << d.data << ")->parent()");
- P(d, "type", "QObject *");
- P(d, "numchild", (ob->parent() ? "1" : "0"));
- d.endHash();
- d << "]";
- }
- d.disarm();
-}
-
-static void qDumpQDir(QDumper &d)
-{
- const QDir &dir = *reinterpret_cast<const QDir *>(d.data);
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", dir.path());
- P(d, "type", "QDir");
- P(d, "numchild", "3");
- if (d.dumpChildren) {
- d << ",children=[";
- S(d, "absolutePath", dir.absolutePath());
- S(d, "canonicalPath", dir.canonicalPath());
- d << "]";
- }
- d.disarm();
-}
-
-static void qDumpQFileInfo(QDumper &d)
-{
- const QFileInfo &info = *reinterpret_cast<const QFileInfo *>(d.data);
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", info.filePath());
- P(d, "type", "QDir");
- P(d, "numchild", "3");
- if (d.dumpChildren) {
- d << ",children=[";
- S(d, "absolutePath", info.absolutePath());
- S(d, "absoluteFilePath", info.absoluteFilePath());
- S(d, "canonicalPath", info.canonicalPath());
- S(d, "canonicalFilePath", info.canonicalFilePath());
- S(d, "completeBaseName", info.completeBaseName());
- S(d, "completeSuffix", info.completeSuffix());
- S(d, "baseName", info.baseName());
-#ifdef Q_OS_MACX
- BL(d, "isBundle", info.isBundle());
- S(d, "bundleName", info.bundleName());
-#endif
- S(d, "completeSuffix", info.completeSuffix());
- S(d, "fileName", info.fileName());
- S(d, "filePath", info.filePath());
- S(d, "group", info.group());
- S(d, "owner", info.owner());
- S(d, "path", info.path());
-
- I(d, "groupid", (long)info.groupId());
- I(d, "ownerid", (long)info.ownerId());
- //QFile::Permissions permissions () const
- I(d, "permissions", info.permissions());
-
- //QDir absoluteDir () const
- //QDir dir () const
-
- BL(d, "caching", info.caching());
- BL(d, "exists", info.exists());
- BL(d, "isAbsolute", info.isAbsolute());
- BL(d, "isDir", info.isDir());
- BL(d, "isExecutable", info.isExecutable());
- BL(d, "isFile", info.isFile());
- BL(d, "isHidden", info.isHidden());
- BL(d, "isReadable", info.isReadable());
- BL(d, "isRelative", info.isRelative());
- BL(d, "isRoot", info.isRoot());
- BL(d, "isSymLink", info.isSymLink());
- BL(d, "isWritable", info.isWritable());
-
-#ifndef QT_NO_DATESTRING
- d.beginHash();
- P(d, "name", "created");
- P(d, "value", info.created().toString());
- P(d, "exp", "((QFileInfo*)" << d.data << ")->created()");
- P(d, "type", "QDateTime");
- P(d, "numchild", "1");
- d.endHash();
-
- d.beginHash();
- P(d, "name", "lastModified");
- P(d, "value", info.lastModified().toString());
- P(d, "exp", "((QFileInfo*)" << d.data << ")->lastModified()");
- P(d, "type", "QDateTime");
- P(d, "numchild", "1");
- d.endHash();
-
- d.beginHash();
- P(d, "name", "lastRead");
- P(d, "value", info.lastRead().toString());
- P(d, "exp", "((QFileInfo*)" << d.data << ")->lastRead()");
- P(d, "type", "QDateTime");
- P(d, "numchild", "1");
- d.endHash();
-#endif
-
- d << "]";
- }
- d.disarm();
-}
-
-static void qDumpQDateTime(QDumper &d)
-{
-#ifdef QT_NO_DATESTRING
- qDumpUnknown(d);
-#else
- const QDateTime &date = *reinterpret_cast<const QDateTime *>(d.data);
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", date.toString());
- P(d, "type", "QDateTime");
- P(d, "numchild", "3");
- if (d.dumpChildren) {
- d << ",children=[";
- BL(d, "isNull", date.isNull());
- I(d, "toTime_t", (long)date.toTime_t());
- S(d, "toString", date.toString());
- S(d, "toString_(ISO)", date.toString(Qt::ISODate));
- S(d, "toString_(SystemLocale)", date.toString(Qt::SystemLocaleDate));
- S(d, "toString_(Locale)", date.toString(Qt::LocaleDate));
- S(d, "toString", date.toString());
-
- d.beginHash();
- P(d, "name", "toUTC");
- P(d, "exp", "((QDateTime*)" << d.data << ")->toTimeSpec(Qt::UTC)");
- P(d, "type", "QDateTime");
- P(d, "numchild", "1");
- d.endHash();
-
- d.beginHash();
- P(d, "name", "toLocalTime");
- P(d, "exp", "((QDateTime*)" << d.data << ")->toTimeSpec(Qt::LocalTime)");
- P(d, "type", "QDateTime");
- P(d, "numchild", "1");
- d.endHash();
-
- d << "]";
- }
- d.disarm();
-#endif // ifdef QT_NO_DATESTRING
-}
-
-static void qDumpQString(QDumper &d)
-{
- const QString &str = *reinterpret_cast<const QString *>(d.data);
-
- // Try to provoke segfaults early to prevent the frontend
- // from asking for unavailable child details
- if (!str.isEmpty()) {
- volatile ushort dummy = 0;
- dummy += str.at(0).unicode();
- dummy += str.at(str.size() - 1).unicode();
- }
-
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", str);
- P(d, "type", "QString");
- P(d, "numchild", "0");
- d.disarm();
-}
-
-static void qDumpQStringList(QDumper &d)
-{
- const QStringList &list = *reinterpret_cast<const QStringList *>(d.data);
- int n = list.size();
- if (n < 0)
- qProvokeSegFault();
- if (n > 0) {
- qCheckAccess(&list.front());
- qCheckAccess(&list.back());
- }
-
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", "<" << n << " items>");
- P(d, "valuedisabled", "true");
- P(d, "numchild", n);
- if (d.dumpChildren) {
- if (n > 100)
- n = 100;
- d << ",children=[";
- for (int i = 0; i != n; ++i) {
- S(d, "[" << i << "]", list[i]);
- }
- if (n < list.size()) {
- d.beginHash();
- P(d, "value", "<incomplete>");
- P(d, "type", " ");
- P(d, "numchild", "0");
- d.endHash();
- }
- d << "]";
- }
- d.disarm();
-}
-
-static void qDumpQVariantHelper(const void *data, QString *value,
- QString *exp, int *numchild)
-{
- const QVariant &v = *reinterpret_cast<const QVariant *>(data);
- switch (v.type()) {
- case QVariant::Invalid:
- *value = QLatin1String("<invalid>");
- *numchild = 0;
- break;
- case QVariant::String:
- *value = QLatin1Char('"') + v.toString() + QLatin1Char('"');
- *numchild = 0;
- break;
- case QVariant::StringList:
- *exp = QString(QLatin1String("((QVariant*)%1)->d.data.c"))
- .arg((qulonglong)data);
- *numchild = v.toStringList().size();
- break;
- case QVariant::Int:
- *value = QString::number(v.toInt());
- *numchild= 0;
- break;
- case QVariant::Double:
- *value = QString::number(v.toDouble());
- *numchild = 0;
- break;
- default:
- // FIXME
- //*exp = QString("qVariantValue<" << v.typeName() << ">"
- // << "(*(QVariant*)" << data << ")");
- break;
- }
-}
-
-static void qDumpQVariant(QDumper &d)
-{
- const QVariant &v = *reinterpret_cast<const QVariant *>(d.data);
- QString value;
- QString exp;
- int numchild = 0;
- qDumpQVariantHelper(d.data, &value, &exp, &numchild);
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", "(" << v.typeName() << ") " << qPrintable(value));
- P(d, "type", "QVariant");
- P(d, "numchild", 1);
- if (d.dumpChildren) {
- d << ",children=[";
- d.beginHash();
- P(d, "name", "value");
- if (!exp.isEmpty())
- P(d, "exp", qPrintable(exp));
- if (!value.isEmpty())
- P(d, "value", qPrintable(value));
- P(d, "type", v.typeName());
- P(d, "numchild", numchild);
- d.endHash();
- d << "]";
- }
- d.disarm();
-}
-
-static void qDumpQList(QDumper &d)
-{
- // This uses the knowledge that QList<T> has only a single member
- // of type union { QListData p; QListData::Data *d; };
- const QListData &ldata = *reinterpret_cast<const QListData*>(d.data);
- const QListData::Data *pdata = *reinterpret_cast<const QListData::Data* const*>(d.data);
- int nn = ldata.size();
- if (nn < 0)
- qProvokeSegFault();
- if (nn > 0) {
- qCheckAccess(ldata.d->array);
- //qCheckAccess(ldata.d->array[0]);
- //qCheckAccess(ldata.d->array[nn - 1]);
- }
-
- int n = nn;
- P(d, "iname", d.iname);
- P(d, "value", "<" << n << " items>");
- P(d, "valuedisabled", "true");
- P(d, "numchild", n);
- if (d.dumpChildren) {
- if (n > 100)
- n = 100;
- d << ",children=[";
- for (int i = 0; i != n; ++i) {
- d.beginHash();
- P(d, "name", "[" << i << "]");
- // The exact condition here is:
- // QTypeInfo<T>::isLarge || QTypeInfo<T>::isStatic
- // but this data is not available in the compiled binary.
- // So as first approximation only do the 'isLarge' check:
- void *p = &(ldata.d->array[i + pdata->begin]);
- unsigned long voidpsize = sizeof(void*);
- P(d, "exp", "(sizeof(" << d.innertype << ")>" << voidpsize <<
- "?(**(" << d.innertype << "**)(" << p << "))"
- ":(*(" << d.innertype << "*)(" << p << ")))");
- P(d, "type", d.innertype);
- d.endHash();
- }
- if (n < nn) {
- d << ",{";
- P(d, "value", "<incomplete>");
- d.endHash();
- }
- d << "]";
- }
- d.disarm();
-}
-
-static void qDumpQVector(QDumper &d)
-{
- // Use 'int' as representative value. No way (and no need)
- // to deduce proper type here.
- const QVector<int> &vec = *reinterpret_cast<const QVector<int> *>(d.data);
- const int nn = vec.size();
-
- // Try to provoke segfaults early to prevent the frontend
- // from asking for unavailable child details
- if (nn < 0)
- qProvokeSegFault();
- if (nn > 0) {
- qCheckAccess(&vec.front());
- qCheckAccess(&vec.back());
- }
-
- //int innersize = 0;
- //scanf(qDumpInBuffer, "%d", &innersize);
-
- int n = nn;
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", "<" << n << " items>");
- P(d, "valuedisabled", "true");
- P(d, "numchild", n);
- if (d.dumpChildren) {
- if (n > 100)
- n = 100;
- d << ",children=[";
- for (int i = 0; i != n; ++i) {
- if (i)
- d << ",";
- d.beginHash();
- P(d, "name", "[" << i << "]");
- P(d, "exp", "(" << d.exp << ".d->array[" << i << "])");
- P(d, "type", d.innertype);
- d.endHash();
- }
- if (n < nn) {
- d << ",{";
- P(d, "value", "<incomplete>");
- d.endHash();
- }
- d << "]";
- }
- d.disarm();
-}
-
-static void qDumpQHashNode(QDumper &d)
-{
- struct NodeOS { void *next; uint k; uint v; } nodeOS; // int-key optimization, small value
- struct NodeOL { void *next; uint k; void *v; } nodeOL; // int-key optimiatzion, large value
- struct NodeNS { void *next; uint h; uint k; uint v; } nodeNS; // no optimization, small value
- struct NodeNL { void *next; uint h; uint k; void *v; } nodeNL; // no optimization, large value
- struct NodeL { void *next; uint h; void *k; void *v; } nodeL; // complex key
-
- // offsetof(...,...) not yet in Standard C++
- const ulong nodeOSk ( (char *)&nodeOS.k - (char *)&nodeOS );
- const ulong nodeOSv ( (char *)&nodeOS.v - (char *)&nodeOS );
- const ulong nodeOLk ( (char *)&nodeOL.k - (char *)&nodeOL );
- const ulong nodeOLv ( (char *)&nodeOL.v - (char *)&nodeOL );
- const ulong nodeNSk ( (char *)&nodeNS.k - (char *)&nodeNS );
- const ulong nodeNSv ( (char *)&nodeNS.v - (char *)&nodeNS );
- const ulong nodeNLk ( (char *)&nodeNL.k - (char *)&nodeNL );
- const ulong nodeNLv ( (char *)&nodeNL.v - (char *)&nodeNL );
- const ulong nodeLk ( (char *)&nodeL.k - (char *)&nodeL );
- const ulong nodeLv ( (char *)&nodeL.v - (char *)&nodeL );
-
- const QHashData *h = reinterpret_cast<const QHashData *>(d.data);
- const char *keyType = d.templateParameters[0];
- const char *valueType = d.templateParameters[1];
-
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", "");
- P(d, "numchild", 2);
- if (d.dumpChildren) {
- // there is a hash specialization in cast the key are integers or shorts
- bool isOptimizedIntKey = qstrcmp(keyType, "int") == 0
-#if defined(Q_BYTE_ORDER) && Q_BYTE_ORDER == Q_LITTLE_ENDIAN
- || qstrcmp(keyType, "short") == 0
- || qstrcmp(keyType, "ushort") == 0
-#endif
- || qstrcmp(keyType, "uint") == 0;
-
- d << ",children=[";
- d.beginHash();
- P(d, "name", "key");
- P(d, "type", keyType);
- unsigned long intsize = sizeof(int);
- if (isOptimizedIntKey) {
- P(d, "exp", "*(" << keyType << "*)"
- "(((sizeof(" << valueType << ")>" << intsize << ")?"
- << nodeOLk << ":" << nodeOSk <<
- ")+(char*)" << h << ")");
- } else {
- P(d, "exp", "*(" << keyType << "*)"
- "(((sizeof(" << keyType << ")>" << intsize << ")?"
- << nodeLk << ":"
- "((sizeof(" << valueType << ")>" << intsize << ")?"
- << nodeNLk << ":" << nodeNSk << "))+(char*)" << h << ")");
- }
- d.endHash();
- d.beginHash();
- P(d, "name", "value");
- P(d, "type", valueType);
- if (isOptimizedIntKey) {
- P(d, "exp", "*(" << valueType << "*)"
- "(((sizeof(" << valueType << ")>" << intsize << ")?"
- << nodeOLv << ":" << nodeOSv << ")+(char*)" << h << ")");
- } else {
- P(d, "exp", "*(" << valueType << "*)"
- "(((sizeof(" << keyType << ")>" << intsize << ")?" << nodeLv << ":"
- "((sizeof(" << valueType << ")>" << intsize << ")?"
- << nodeNLv << ":" << nodeNSv << "))+(char*)" << h << ")");
- }
- d.endHash();
- d << "]";
- }
- d.disarm();
-}
-
-static void qDumpQHash(QDumper &d)
-{
- QHashData *h = *reinterpret_cast<QHashData *const*>(d.data);
- const char *keyType = d.templateParameters[0];
- const char *valueType = d.templateParameters[1];
-
- qCheckPointer(h->fakeNext);
- qCheckPointer(h->buckets);
-
- int n = h->size;
-
- if (n < 0)
- qProvokeSegFault();
- if (n > 0) {
- qCheckPointer(h->fakeNext);
- qCheckPointer(*h->buckets);
- }
-
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", "<" << n << " items>");
- P(d, "numchild", n);
- if (d.dumpChildren) {
- if (n > 100)
- n = 100;
- d << ",children=[";
-
- QHashData::Node *node = h->firstNode();
- QHashData::Node *end = reinterpret_cast<QHashData::Node *>(h);
- int i = 0;
-
- while (node != end) {
- d.beginHash();
- P(d, "name", "[" << i << "]");
- P(d, "type", "QHashNode<" << keyType << "," << valueType << " >");
- P(d, "exp", "*(QHashNode<" << keyType << "," << valueType << " >*)" << node);
- d.endHash();
-
- ++i;
- node = QHashData::nextNode(node);
- }
- d << "]";
- }
- d.disarm();
-}
-
-static void qDumpQMapNode(QDumper &d)
-{
- const QMapData *h = reinterpret_cast<const QMapData *>(d.data);
- const char *keyType = d.templateParameters[0];
- const char *valueType = d.templateParameters[1];
-
- qCheckAccess(h->backward);
- qCheckAccess(h->forward[0]);
-
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", "");
- P(d, "numchild", 2);
- if (d.dumpChildren) {
- unsigned long voidpsize = sizeof(void*);
- d << ",children=[";
- d.beginHash();
- P(d, "name", "key");
- P(d, "type", keyType);
- P(d, "exp", "*(" << keyType << "*)"
- << "("
- << 2 * voidpsize
- << "-sizeof('QMap<" << keyType << "," << valueType << ">::Node')"
- << "+(char*)" << h
- << ")");
- d.endHash();
- d.beginHash();
- P(d, "name", "value");
- P(d, "type", valueType);
- P(d, "exp", "*(" << valueType << "*)"
- << "("
- << "(size_t)&(('QMap<" << keyType << "," << valueType << ">::Node'*)0)->value"
- << "+" << 2 * voidpsize
- << "-sizeof('QMap<" << keyType << "," << valueType << ">::Node')"
- << "+(char*)" << h
- << ")");
- d.endHash();
- d << "]";
- }
-
- d.disarm();
-}
-
-static void qDumpQMap(QDumper &d)
-{
- QMapData *h = *reinterpret_cast<QMapData *const*>(d.data);
- const char *keyType = d.templateParameters[0];
- const char *valueType = d.templateParameters[1];
-
- int n = h->size;
-
- if (n < 0)
- qProvokeSegFault();
- if (n > 0) {
- qCheckAccess(h->backward);
- qCheckAccess(h->forward[0]);
- qCheckPointer(h->backward->backward);
- qCheckPointer(h->forward[0]->backward);
- }
-
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", "<" << n << " items>");
- P(d, "numchild", n);
- if (d.dumpChildren) {
- if (n > 100)
- n = 100;
- d << ",children=[";
-
- QMapData::Node *node = reinterpret_cast<QMapData::Node *>(h->forward[0]);
- QMapData::Node *end = reinterpret_cast<QMapData::Node *>(h);
- int i = 0;
-
- while (node != end) {
- d.beginHash();
- P(d, "name", "[" << i << "]");
- P(d, "type", "QMap<" << keyType << "," << valueType << ">::Node");
- P(d, "exp", "*('QMap<" << keyType << "," << valueType << ">::Node'*)" << node);
- d.endHash();
-
- ++i;
- node = node->forward[0];
- }
- d << "]";
- }
-
- d.disarm();
-}
-
-static void qDumpQSet(QDumper &d)
-{
- // This uses the knowledge that QHash<T> has only a single member
- // of union { QHashData *d; QHashNode<Key, T> *e; };
- QHashData *hd = *(QHashData**)d.data;
- QHashData::Node *node = hd->firstNode();
-
- int n = hd->size;
- if (n < 0)
- qProvokeSegFault();
- if (n > 0) {
- qCheckAccess(node);
- qCheckPointer(node->next);
- }
-
- P(d, "iname", d.iname);
- P(d, "addr", d.data);
- P(d, "value", "<" << n << " items>");
- P(d, "valuedisabled", "true");
- P(d, "numchild", 2 * n);
- if (d.dumpChildren) {
- if (n > 100)
- n = 100;
- d << ",children=[";
- int i = 0;
- for (int bucket = 0; bucket != hd->numBuckets; ++bucket) {
- for (node = hd->buckets[bucket]; node->next; node = node->next) {
- d.beginHash();
- P(d, "name", "[" << i << "]");
- P(d, "type", d.innertype);
- P(d, "exp", "(('QHashNode<" << d.innertype
- << ",QHashDummyValue>'*)"
- << static_cast<const void*>(node) << ")->key"
- );
- d.endHash();
- ++i;
- }
- }
- d << "]";
- }
- d.disarm();
-}
-
-static void handleProtocolVersion2(QDumper & d)
-{
- if (!d.outertype[0]) {
- qDumpUnknown(d);
- return;
- }
-
- d.setupTemplateParameters();
- // d.outertype[0] is usally 'Q', so don't use it
- switch (d.outertype[1]) {
- case 'D':
- if (qstrcmp(d.outertype, "QDateTime") == 0)
- qDumpQDateTime(d);
- else if (qstrcmp(d.outertype, "QDir") == 0)
- qDumpQDir(d);
- break;
- case 'F':
- if (qstrcmp(d.outertype, "QFileInfo") == 0)
- qDumpQFileInfo(d);
- break;
- case 'H':
- if (qstrcmp(d.outertype, "QHash") == 0)
- qDumpQHash(d);
- else if (qstrcmp(d.outertype, "QHashNode") == 0)
- qDumpQHashNode(d);
- break;
- case 'L':
- if (qstrcmp(d.outertype, "QList") == 0)
- qDumpQList(d);
- break;
- case 'M':
- if (qstrcmp(d.outertype, "QMap") == 0)
- qDumpQMap(d);
- else if (qstrcmp(d.outertype, "QMap::Node") == 0)
- qDumpQMapNode(d);
- break;
- case 'O':
- if (qstrcmp(d.outertype, "QObject") == 0)
- qDumpQObject(d);
- break;
- case 'P':
- if (qstrcmp(d.outertype, "QPropertyList") == 0)
- qDumpQPropertyList(d);
- break;
- case 'S':
- if (qstrcmp(d.outertype, "QSet") == 0)
- qDumpQSet(d);
- else if (qstrcmp(d.outertype, "QString") == 0)
- qDumpQString(d);
- else if (qstrcmp(d.outertype, "QStringList") == 0)
- qDumpQStringList(d);
- break;
- case 'V':
- if (qstrcmp(d.outertype, "QVariant") == 0)
- qDumpQVariant(d);
- else if (qstrcmp(d.outertype, "QVector") == 0)
- qDumpQVector(d);
- break;
- }
-
- if (!d.success)
- qDumpUnknown(d);
-}
-
-} // anonymous namespace
-
-
-extern "C" Q_CORE_EXPORT void qDumpObjectData(
- int protocolVersion,
- int token,
- const char *outertype,
- const char *iname,
- const char *exp,
- const char *innertype,
- const void *data,
- bool dumpChildren)
-{
- if (protocolVersion == 1) {
- // used to test whether error output gets through
- //fprintf(stderr, "using stderr, qDebug follows: %d\n", token);
- //qDebug() << "using qDebug, stderr already used: " << token;
- }
-
- else if (protocolVersion == 2) {
- QDumper d;
- d.protocolVersion = protocolVersion;
- d.token = token;
- d.outertype = outertype ? outertype : "";
- d.iname = iname ? iname : "";
- d.exp = exp ? exp : "";
- d.innertype = innertype ? innertype : "";
- d.data = data ? data : "";
- d.dumpChildren = dumpChildren;
- handleProtocolVersion2(d);
- }
-
- else {
- qDebug() << "Unsupported protocol version" << protocolVersion;
- }
-}
-
-QT_END_NAMESPACE
-
-#endif // !Q_OS_WINCE && !QT_NO_QDUMPER
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index a18b531..632c422 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 a2154a9..66e3921 100644
--- a/src/corelib/tools/qlocale.cpp
+++ b/src/corelib/tools/qlocale.cpp
@@ -1589,7 +1589,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.
@@ -1632,7 +1632,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/qmap.h b/src/corelib/tools/qmap.h
index 5f13e5a..32c8d17 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -990,7 +990,7 @@ Q_INLINE_TEMPLATE int QMultiMap<Key, T>::remove(const Key &key, const T &value)
{
int n = 0;
typename QMap<Key, T>::iterator i(find(key));
- typename QMap<Key, T>::const_iterator end(QMap<Key, T>::constEnd());
+ typename QMap<Key, T>::iterator end(QMap<Key, T>::end());
while (i != end && !qMapLessThanKey<Key>(key, i.key())) {
if (i.value() == value) {
i = erase(i);
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 f1b35ee..ad2d9f2 100644
--- a/src/corelib/tools/qsharedpointer_impl.h
+++ b/src/corelib/tools/qsharedpointer_impl.h
@@ -238,6 +238,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
@@ -509,6 +510,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;
@@ -544,9 +553,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)
@@ -558,17 +565,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/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/qvector.h b/src/corelib/tools/qvector.h
index 1f047b8..7bdcba0 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -82,19 +82,9 @@ struct Q_CORE_EXPORT QVectorData
};
template <typename T>
-struct QVectorTypedData
-{
- QBasicAtomicInt ref;
- int alloc;
- int size;
-#if defined(QT_ARCH_SPARC) && defined(Q_CC_GNU) && defined(__LP64__) && defined(QT_BOOTSTRAPPED)
- // workaround for bug in gcc 3.4.2
- uint sharable;
- uint capacity;
-#else
- uint sharable : 1;
- uint capacity : 1;
-#endif
+struct QVectorTypedData : private QVectorData
+{ // private inheritance as we must not access QVectorData member thought QVectorTypedData
+ // as this would break strict aliasing rules. (in the case of shared_null)
T array[1];
};
@@ -104,14 +94,14 @@ template <typename T>
class QVector
{
typedef QVectorTypedData<T> Data;
- union { QVectorData *p; QVectorTypedData<T> *d; };
+ union { QVectorData *d; Data *p; };
public:
- inline QVector() : p(&QVectorData::shared_null) { d->ref.ref(); }
+ inline QVector() : d(&QVectorData::shared_null) { d->ref.ref(); }
explicit QVector(int size);
QVector(int size, const T &t);
inline QVector(const QVector<T> &v) : d(v.d) { d->ref.ref(); if (!d->sharable) detach_helper(); }
- inline ~QVector() { if (!d) return; if (!d->ref.deref()) free(d); }
+ inline ~QVector() { if (!d) return; if (!d->ref.deref()) free(p); }
QVector<T> &operator=(const QVector<T> &v);
bool operator==(const QVector<T> &v) const;
inline bool operator!=(const QVector<T> &v) const { return !(*this == v); }
@@ -130,9 +120,9 @@ public:
inline bool isDetached() const { return d->ref == 1; }
inline void setSharable(bool sharable) { if (!sharable) detach(); d->sharable = sharable; }
- inline T *data() { detach(); return d->array; }
- inline const T *data() const { return d->array; }
- inline const T *constData() const { return d->array; }
+ inline T *data() { detach(); return p->array; }
+ inline const T *data() const { return p->array; }
+ inline const T *constData() const { return p->array; }
void clear();
const T &at(int i) const;
@@ -225,12 +215,12 @@ public:
typedef T* iterator;
typedef const T* const_iterator;
#endif
- inline iterator begin() { detach(); return d->array; }
- inline const_iterator begin() const { return d->array; }
- inline const_iterator constBegin() const { return d->array; }
- inline iterator end() { detach(); return d->array + d->size; }
- inline const_iterator end() const { return d->array + d->size; }
- inline const_iterator constEnd() const { return d->array + d->size; }
+ inline iterator begin() { detach(); return p->array; }
+ inline const_iterator begin() const { return p->array; }
+ inline const_iterator constBegin() const { return p->array; }
+ inline iterator end() { detach(); return p->array + d->size; }
+ inline const_iterator end() const { return p->array + d->size; }
+ inline const_iterator constEnd() const { return p->array + d->size; }
iterator insert(iterator before, int n, const T &x);
inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); }
iterator erase(iterator begin, iterator end);
@@ -327,11 +317,11 @@ inline void QVector<T>::clear()
template <typename T>
inline const T &QVector<T>::at(int i) const
{ Q_ASSERT_X(i >= 0 && i < d->size, "QVector<T>::at", "index out of range");
- return d->array[i]; }
+ return p->array[i]; }
template <typename T>
inline const T &QVector<T>::operator[](int i) const
{ Q_ASSERT_X(i >= 0 && i < d->size, "QVector<T>::operator[]", "index out of range");
- return d->array[i]; }
+ return p->array[i]; }
template <typename T>
inline T &QVector<T>::operator[](int i)
{ Q_ASSERT_X(i >= 0 && i < d->size, "QVector<T>::operator[]", "index out of range");
@@ -369,7 +359,7 @@ QVector<T> &QVector<T>::operator=(const QVector<T> &v)
{
v.d->ref.ref();
if (!d->ref.deref())
- free(d);
+ free(p);
d = v.d;
if (!d->sharable)
detach_helper();
@@ -385,31 +375,31 @@ inline QVectorData *QVector<T>::malloc(int aalloc)
template <typename T>
QVector<T>::QVector(int asize)
{
- p = malloc(asize);
+ d = malloc(asize);
d->ref = 1;
d->alloc = d->size = asize;
d->sharable = true;
d->capacity = false;
if (QTypeInfo<T>::isComplex) {
- T* b = d->array;
- T* i = d->array + d->size;
+ T* b = p->array;
+ T* i = p->array + d->size;
while (i != b)
new (--i) T;
} else {
- qMemSet(d->array, 0, asize * sizeof(T));
+ qMemSet(p->array, 0, asize * sizeof(T));
}
}
template <typename T>
QVector<T>::QVector(int asize, const T &t)
{
- p = malloc(asize);
+ d = malloc(asize);
d->ref = 1;
d->alloc = d->size = asize;
d->sharable = true;
d->capacity = false;
- T* i = d->array + d->size;
- while (i != d->array)
+ T* i = p->array + d->size;
+ while (i != p->array)
new (--i) T(t);
}
@@ -418,7 +408,7 @@ void QVector<T>::free(Data *x)
{
if (QTypeInfo<T>::isComplex) {
T* b = x->array;
- T* i = b + x->size;
+ T* i = b + reinterpret_cast<QVectorData *>(x)->size;
while (i-- != b)
i->~T();
}
@@ -429,13 +419,13 @@ template <typename T>
void QVector<T>::realloc(int asize, int aalloc)
{
T *j, *i, *b;
- union { QVectorData *p; Data *d; } x;
+ union { QVectorData *d; Data *p; } x;
x.d = d;
if (QTypeInfo<T>::isComplex && aalloc == d->alloc && d->ref == 1) {
// pure resize
- i = d->array + d->size;
- j = d->array + asize;
+ i = p->array + d->size;
+ j = p->array + asize;
if (i > j) {
while (i-- != j)
i->~T();
@@ -450,22 +440,22 @@ void QVector<T>::realloc(int asize, int aalloc)
if (aalloc != d->alloc || d->ref != 1) {
// (re)allocate memory
if (QTypeInfo<T>::isStatic) {
- x.p = malloc(aalloc);
+ x.d = malloc(aalloc);
} else if (d->ref != 1) {
- x.p = QVectorData::malloc(sizeOfTypedData(), aalloc, sizeof(T), p);
+ x.d = QVectorData::malloc(sizeOfTypedData(), aalloc, sizeof(T), d);
} else {
if (QTypeInfo<T>::isComplex) {
// call the destructor on all objects that need to be
// destroyed when shrinking
if (asize < d->size) {
- j = d->array + asize;
- i = d->array + d->size;
+ j = p->array + asize;
+ i = p->array + d->size;
while (i-- != j)
i->~T();
- i = d->array + asize;
+ i = p->array + asize;
}
}
- x.p = p = static_cast<QVectorData *>(qRealloc(p, sizeOfTypedData() + (aalloc - 1) * sizeof(T)));
+ x.d = d = static_cast<QVectorData *>(qRealloc(d, sizeOfTypedData() + (aalloc - 1) * sizeof(T)));
}
x.d->ref = 1;
x.d->sharable = true;
@@ -474,31 +464,31 @@ void QVector<T>::realloc(int asize, int aalloc)
}
if (QTypeInfo<T>::isComplex) {
if (asize < d->size) {
- j = d->array + asize;
- i = x.d->array + asize;
+ j = p->array + asize;
+ i = x.p->array + asize;
} else {
// construct all new objects when growing
- i = x.d->array + asize;
- j = x.d->array + d->size;
+ i = x.p->array + asize;
+ j = x.p->array + d->size;
while (i != j)
new (--i) T;
- j = d->array + d->size;
+ j = p->array + d->size;
}
if (i != j) {
// copy objects from the old array into the new array
- b = x.d->array;
+ b = x.p->array;
while (i != b)
new (--i) T(*--j);
}
} else if (asize > d->size) {
// initialize newly allocated memory to 0
- qMemSet(x.d->array + d->size, 0, (asize - d->size) * sizeof(T));
+ qMemSet(x.p->array + d->size, 0, (asize - d->size) * sizeof(T));
}
x.d->size = asize;
x.d->alloc = aalloc;
if (d != x.d) {
if (!d->ref.deref())
- free(d);
+ free(p);
d = x.d;
}
}
@@ -506,15 +496,15 @@ void QVector<T>::realloc(int asize, int aalloc)
template<typename T>
Q_OUTOFLINE_TEMPLATE T QVector<T>::value(int i) const
{
- if (i < 0 || i >= p->size) {
+ if (i < 0 || i >= d->size) {
return T();
}
- return d->array[i];
+ return p->array[i];
}
template<typename T>
Q_OUTOFLINE_TEMPLATE T QVector<T>::value(int i, const T &defaultValue) const
{
- return ((i < 0 || i >= p->size) ? defaultValue : d->array[i]);
+ return ((i < 0 || i >= d->size) ? defaultValue : p->array[i]);
}
template <typename T>
@@ -525,14 +515,14 @@ void QVector<T>::append(const T &t)
realloc(d->size, QVectorData::grow(sizeOfTypedData(), d->size + 1, sizeof(T),
QTypeInfo<T>::isStatic));
if (QTypeInfo<T>::isComplex)
- new (d->array + d->size) T(copy);
+ new (p->array + d->size) T(copy);
else
- d->array[d->size] = copy;
+ p->array[d->size] = copy;
} else {
if (QTypeInfo<T>::isComplex)
- new (d->array + d->size) T(t);
+ new (p->array + d->size) T(t);
else
- d->array[d->size] = t;
+ p->array[d->size] = t;
}
++d->size;
}
@@ -540,27 +530,27 @@ void QVector<T>::append(const T &t)
template <typename T>
Q_TYPENAME QVector<T>::iterator QVector<T>::insert(iterator before, size_type n, const T &t)
{
- int offset = before - d->array;
+ int offset = before - p->array;
if (n != 0) {
const T copy(t);
if (d->ref != 1 || d->size + n > d->alloc)
realloc(d->size, QVectorData::grow(sizeOfTypedData(), d->size + n, sizeof(T),
QTypeInfo<T>::isStatic));
if (QTypeInfo<T>::isStatic) {
- T *b = d->array + d->size;
- T *i = d->array + d->size + n;
+ T *b = p->array + d->size;
+ T *i = p->array + d->size + n;
while (i != b)
new (--i) T;
- i = d->array + d->size;
+ i = p->array + d->size;
T *j = i + n;
- b = d->array + offset;
+ b = p->array + offset;
while (i != b)
*--j = *--i;
i = b+n;
while (i != b)
*--i = copy;
} else {
- T *b = d->array + offset;
+ T *b = p->array + offset;
T *i = b + n;
memmove(i, b, (d->size - offset) * sizeof(T));
while (i != b)
@@ -568,29 +558,29 @@ Q_TYPENAME QVector<T>::iterator QVector<T>::insert(iterator before, size_type n,
}
d->size += n;
}
- return d->array + offset;
+ return p->array + offset;
}
template <typename T>
Q_TYPENAME QVector<T>::iterator QVector<T>::erase(iterator abegin, iterator aend)
{
- int f = abegin - d->array;
- int l = aend - d->array;
+ int f = abegin - p->array;
+ int l = aend - p->array;
int n = l - f;
detach();
if (QTypeInfo<T>::isComplex) {
- qCopy(d->array+l, d->array+d->size, d->array+f);
- T *i = d->array+d->size;
- T* b = d->array+d->size-n;
+ qCopy(p->array+l, p->array+d->size, p->array+f);
+ T *i = p->array+d->size;
+ T* b = p->array+d->size-n;
while (i != b) {
--i;
i->~T();
}
} else {
- memmove(d->array + f, d->array + l, (d->size-l)*sizeof(T));
+ memmove(p->array + f, p->array + l, (d->size-l)*sizeof(T));
}
d->size -= n;
- return d->array + f;
+ return p->array + f;
}
template <typename T>
@@ -600,9 +590,9 @@ bool QVector<T>::operator==(const QVector<T> &v) const
return false;
if (d == v.d)
return true;
- T* b = d->array;
+ T* b = p->array;
T* i = b + d->size;
- T* j = v.d->array + d->size;
+ T* j = v.p->array + d->size;
while (i != b)
if (!(*--i == *--j))
return false;
@@ -615,8 +605,8 @@ QVector<T> &QVector<T>::fill(const T &from, int asize)
const T copy(from);
resize(asize < 0 ? d->size : asize);
if (d->size) {
- T *i = d->array + d->size;
- T *b = d->array;
+ T *i = p->array + d->size;
+ T *b = p->array;
while (i != b)
*--i = copy;
}
@@ -629,9 +619,9 @@ QVector<T> &QVector<T>::operator+=(const QVector &l)
int newSize = d->size + l.d->size;
realloc(d->size, newSize);
- T *w = d->array + newSize;
- T *i = l.d->array + l.d->size;
- T *b = l.d->array;
+ T *w = p->array + newSize;
+ T *i = l.p->array + l.d->size;
+ T *b = l.p->array;
while (i != b) {
if (QTypeInfo<T>::isComplex)
new (--w) T(*--i);
@@ -648,11 +638,11 @@ int QVector<T>::indexOf(const T &t, int from) const
if (from < 0)
from = qMax(from + d->size, 0);
if (from < d->size) {
- T* n = d->array + from - 1;
- T* e = d->array + d->size;
+ T* n = p->array + from - 1;
+ T* e = p->array + d->size;
while (++n != e)
if (*n == t)
- return n - d->array;
+ return n - p->array;
}
return -1;
}
@@ -665,8 +655,8 @@ int QVector<T>::lastIndexOf(const T &t, int from) const
else if (from >= d->size)
from = d->size-1;
if (from >= 0) {
- T* b = d->array;
- T* n = d->array + from + 1;
+ T* b = p->array;
+ T* n = p->array + from + 1;
while (n != b) {
if (*--n == t)
return n - b;
@@ -678,8 +668,8 @@ int QVector<T>::lastIndexOf(const T &t, int from) const
template <typename T>
bool QVector<T>::contains(const T &t) const
{
- T* b = d->array;
- T* i = d->array + d->size;
+ T* b = p->array;
+ T* i = p->array + d->size;
while (i != b)
if (*--i == t)
return true;
@@ -690,8 +680,8 @@ template <typename T>
int QVector<T>::count(const T &t) const
{
int c = 0;
- T* b = d->array;
- T* i = d->array + d->size;
+ T* b = p->array;
+ T* i = p->array + d->size;
while (i != b)
if (*--i == t)
++c;
diff --git a/src/corelib/tools/tools.pri b/src/corelib/tools/tools.pri
index e5bf7e4..a6fdac7 100644
--- a/src/corelib/tools/tools.pri
+++ b/src/corelib/tools/tools.pri
@@ -19,6 +19,7 @@ HEADERS += \
tools/qlocale_p.h \
tools/qlocale_data_p.h \
tools/qmap.h \
+ tools/qcontiguouscache.h \
tools/qpodlist_p.h \
tools/qpoint.h \
tools/qqueue.h \
@@ -45,7 +46,6 @@ SOURCES += \
tools/qbytearraymatcher.cpp \
tools/qcryptographichash.cpp \
tools/qdatetime.cpp \
- tools/qdumper.cpp \
tools/qhash.cpp \
tools/qline.cpp \
tools/qlinkedlist.cpp \
@@ -53,6 +53,7 @@ SOURCES += \
tools/qlocale.cpp \
tools/qpoint.cpp \
tools/qmap.cpp \
+ tools/qcontiguouscache.cpp \
tools/qrect.cpp \
tools/qregexp.cpp \
tools/qshareddata.cpp \
diff --git a/src/gui/dialogs/qmessagebox.cpp b/src/gui/dialogs/qmessagebox.cpp
index 3b622b7..533c538 100644
--- a/src/gui/dialogs/qmessagebox.cpp
+++ b/src/gui/dialogs/qmessagebox.cpp
@@ -703,15 +703,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 6f2ab0a..b2ed983 100644
--- a/src/gui/dialogs/qwizard.cpp
+++ b/src/gui/dialogs/qwizard.cpp
@@ -1241,8 +1241,10 @@ void QWizardPrivate::updateMinMaxSizes(const QWizardLayoutInfo &info)
#endif
QSize minimumSize = mainLayout->totalMinimumSize() + QSize(0, extraHeight);
QSize maximumSize;
+ bool skipMaxSize = false;
#if defined(Q_WS_WIN)
- if (QSysInfo::WindowsVersion > QSysInfo::WV_Me) // ### See Tasks 164078 and 161660
+ if (QSysInfo::WindowsVersion <= QSysInfo::WV_Me) // ### See Tasks 164078 and 161660
+ skipMaxSize = true;
#endif
maximumSize = mainLayout->totalMaximumSize();
if (info.header && headerWidget->maximumWidth() != QWIDGETSIZE_MAX) {
@@ -1263,11 +1265,13 @@ void QWizardPrivate::updateMinMaxSizes(const QWizardLayoutInfo &info)
}
if (q->maximumWidth() == maximumWidth) {
maximumWidth = maximumSize.width();
- q->setMaximumWidth(maximumWidth);
+ if (!skipMaxSize)
+ q->setMaximumWidth(maximumWidth);
}
if (q->maximumHeight() == maximumHeight) {
maximumHeight = maximumSize.height();
- q->setMaximumHeight(maximumHeight);
+ if (!skipMaxSize)
+ q->setMaximumHeight(maximumHeight);
}
}
@@ -1465,7 +1469,7 @@ void QWizardPrivate::handleAeroStyleChange()
return; // prevent recursion
inHandleAeroStyleChange = true;
- vistaHelper->backButton()->disconnect();
+ vistaHelper->disconnectBackButton();
q->removeEventFilter(vistaHelper);
if (isVistaThemeEnabled()) {
@@ -1491,7 +1495,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 a82edbb..91121e7 100644
--- a/src/gui/embedded/qscreen_qws.cpp
+++ b/src/gui/embedded/qscreen_qws.cpp
@@ -1397,7 +1397,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 743c16d..72b832a 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -274,6 +274,15 @@
this flag, the child will be stacked behind it. This flag is useful for
drop shadow effects and for decoration objects that follow the parent
item's geometry without drawing on top of it.
+
+ \value ItemUsesExtendedStyleOption The item makes use of either
+ QStyleOptionGraphicsItem::exposedRect or QStyleOptionGraphicsItem::matrix.
+ By default, the exposedRect is initialized to the item's boundingRect and
+ the matrix is untransformed. Enable this flag for more fine-grained values.
+ Note that QStyleOptionGraphicsItem::levelOfDetail is unaffected by this flag
+ and is always initialized to 1.
+ Use QStyleOptionGraphicsItem::levelOfDetailFromTransform for a more
+ fine-grained value.
*/
/*!
@@ -914,6 +923,53 @@ void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rec
}
}
+void QGraphicsItemPrivate::initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform,
+ const QRegion &exposedRegion, bool allItems) const
+{
+ Q_ASSERT(option);
+ Q_Q(const QGraphicsItem);
+
+ // Initialize standard QStyleOption values.
+ const QRectF brect = q->boundingRect();
+ option->state = QStyle::State_None;
+ option->rect = brect.toRect();
+ option->levelOfDetail = 1;
+ option->exposedRect = brect;
+ if (selected)
+ option->state |= QStyle::State_Selected;
+ if (enabled)
+ option->state |= QStyle::State_Enabled;
+ if (q->hasFocus())
+ option->state |= QStyle::State_HasFocus;
+ if (scene) {
+ if (scene->d_func()->hoverItems.contains(q_ptr))
+ option->state |= QStyle::State_MouseOver;
+ if (q == scene->mouseGrabberItem())
+ option->state |= QStyle::State_Sunken;
+ }
+
+ if (!(flags & QGraphicsItem::ItemUsesExtendedStyleOption))
+ return;
+
+ // Initialize QStyleOptionGraphicsItem specific values (matrix, exposedRect).
+
+ const QTransform itemToViewportTransform = q->deviceTransform(worldTransform);
+ option->matrix = itemToViewportTransform.toAffine(); //### discards perspective
+
+ if (!allItems) {
+ // Determine the item's exposed area
+ option->exposedRect = QRectF();
+ const QTransform reverseMap = itemToViewportTransform.inverted();
+ const QVector<QRect> exposedRects(exposedRegion.rects());
+ for (int i = 0; i < exposedRects.size(); ++i) {
+ option->exposedRect |= reverseMap.mapRect(exposedRects.at(i));
+ if (option->exposedRect.contains(brect))
+ break;
+ }
+ option->exposedRect &= brect;
+ }
+}
+
/*!
\internal
@@ -922,6 +978,7 @@ void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rec
void QGraphicsItemCache::purge()
{
QPixmapCache::remove(key);
+ key = QPixmapCache::Key();
QMutableMapIterator<QPaintDevice *, DeviceData> it(deviceData);
while (it.hasNext()) {
DeviceData &data = it.next().value();
@@ -1370,12 +1427,6 @@ void QGraphicsItem::setCacheMode(CacheMode mode, const QSize &logicalCacheSize)
cache->purge();
if (mode == ItemCoordinateCache) {
- if (cache->key.isEmpty()) {
- // Generate new simple pixmap cache key.
- QString tmp;
- tmp.sprintf("qgv-%p", this);
- cache->key = tmp;
- }
if (lastMode == mode && cache->fixedSize == logicalCacheSize)
noVisualChange = true;
cache->fixedSize = logicalCacheSize;
@@ -2618,6 +2669,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;
@@ -3667,7 +3722,7 @@ void QGraphicsItem::setBoundingRegionGranularity(qreal granularity)
All painting is done in local coordinates.
- \sa setCacheMode(), QPen::width(), {Item Coordinates}
+ \sa setCacheMode(), QPen::width(), {Item Coordinates}, ItemUsesExtendedStyleOption
*/
/*!
@@ -4145,7 +4200,7 @@ void QGraphicsItem::scroll(qreal dx, qreal dy, const QRectF &rect)
&& (d->cacheMode == ItemCoordinateCache && !c->fixedSize.isValid());
if (scrollCache) {
QPixmap pix;
- if (QPixmapCache::find(c->key, pix)) {
+ if (QPixmapCache::find(c->key, &pix)) {
// Adjust with 2 pixel margin. Notice the loss of precision
// when converting to QRect.
int adjust = 2;
@@ -4154,7 +4209,7 @@ void QGraphicsItem::scroll(qreal dx, qreal dy, const QRectF &rect)
_q_scrollPixmap(&pix, irect, dx, dy);
- QPixmapCache::insert(c->key, pix);
+ QPixmapCache::replace(c->key, pix);
// Translate the existing expose.
foreach (QRectF exposedRect, c->exposed)
@@ -7631,9 +7686,7 @@ void QGraphicsPixmapItem::paint(QPainter *painter, const QStyleOptionGraphicsIte
painter->setRenderHint(QPainter::SmoothPixmapTransform,
(d->transformationMode == Qt::SmoothTransformation));
- QRectF exposed = option->exposedRect.adjusted(-1, -1, 1, 1);
- exposed &= QRectF(d->offset.x(), d->offset.y(), d->pixmap.width(), d->pixmap.height());
- painter->drawPixmap(exposed, d->pixmap, exposed.translated(-d->offset));
+ painter->drawPixmap(d->offset, d->pixmap);
if (option->state & QStyle::State_Selected)
qt_graphicsItem_highlightSelected(this, painter, option);
@@ -7799,6 +7852,7 @@ QGraphicsTextItem::QGraphicsTextItem(const QString &text, QGraphicsItem *parent
setPlainText(text);
setAcceptDrops(true);
setAcceptHoverEvents(true);
+ setFlags(ItemUsesExtendedStyleOption);
}
/*!
@@ -7818,6 +7872,7 @@ QGraphicsTextItem::QGraphicsTextItem(QGraphicsItem *parent
dd->qq = this;
setAcceptDrops(true);
setAcceptHoverEvents(true);
+ setFlag(ItemUsesExtendedStyleOption);
}
/*!
@@ -9163,6 +9218,9 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlag flag)
case QGraphicsItem::ItemStacksBehindParent:
str = "ItemStacksBehindParent";
break;
+ case QGraphicsItem::ItemUsesExtendedStyleOption:
+ str = "ItemUsesExtendedStyleOption";
+ break;
}
debug << str;
return debug;
diff --git a/src/gui/graphicsview/qgraphicsitem.h b/src/gui/graphicsview/qgraphicsitem.h
index b98882d..0a0179e 100644
--- a/src/gui/graphicsview/qgraphicsitem.h
+++ b/src/gui/graphicsview/qgraphicsitem.h
@@ -94,7 +94,9 @@ public:
ItemIgnoresTransformations = 0x20,
ItemIgnoresParentOpacity = 0x40,
ItemDoesntPropagateOpacityToChildren = 0x80,
- ItemStacksBehindParent = 0x100
+ ItemStacksBehindParent = 0x100,
+ ItemUsesExtendedStyleOption = 0x200
+ // NB! Don't forget to increase the d_ptr->flags bit field by 1 when adding a new flag.
};
Q_DECLARE_FLAGS(GraphicsItemFlags, GraphicsItemFlag)
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index 2936cf1..820ef04 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -54,6 +54,7 @@
//
#include "qgraphicsitem.h"
+#include "qpixmapcache.h"
#if !defined(QT_NO_GRAPHICSVIEW) || (QT_EDITION & QT_MODULE_GRAPHICSVIEW) != QT_MODULE_GRAPHICSVIEW
@@ -69,13 +70,14 @@ public:
// ItemCoordinateCache only
QRect boundingRect;
QSize fixedSize;
- QString key;
+ QPixmapCache::Key key;
// DeviceCoordinateCache only
struct DeviceData {
+ DeviceData() {}
QTransform lastTransform;
QPoint cacheIndent;
- QString key;
+ QPixmapCache::Key key;
};
QMap<QPaintDevice *, DeviceData> deviceData;
@@ -132,7 +134,6 @@ public:
ancestorFlags(0),
cacheMode(0),
hasBoundingRegionGranularity(0),
- flags(0),
hasOpacity(0),
hasEffectiveOpacity(0),
isWidget(0),
@@ -142,6 +143,7 @@ public:
dirtyClipPath(1),
emptyClipPath(0),
inSetPosHelper(0),
+ flags(0),
allChildrenCombineOpacity(1),
globalStackingOrder(-1),
sceneTransformIndex(-1),
@@ -178,6 +180,8 @@ public:
void removeChild(QGraphicsItem *child);
void setParentItemHelper(QGraphicsItem *parent, bool deleting);
void childrenBoundingRectHelper(QTransform *x, QRectF *rect);
+ void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform,
+ const QRegion &exposedRegion, bool allItems = false) const;
virtual void resolveFont(uint inheritedMask)
{
@@ -297,7 +301,7 @@ public:
int index;
int depth;
- // Packed 32 bytes
+ // Packed 32 bits
quint32 acceptedMouseButtons : 5;
quint32 visible : 1;
quint32 explicitlyHidden : 1;
@@ -314,9 +318,6 @@ public:
quint32 ancestorFlags : 3;
quint32 cacheMode : 2;
quint32 hasBoundingRegionGranularity : 1;
- quint32 flags : 9;
-
- // New 32 bytes
quint32 hasOpacity : 1;
quint32 hasEffectiveOpacity : 1;
quint32 isWidget : 1;
@@ -326,7 +327,11 @@ public:
quint32 dirtyClipPath : 1;
quint32 emptyClipPath : 1;
quint32 inSetPosHelper : 1;
+
+ // New 32 bits
+ quint32 flags : 10;
quint32 allChildrenCombineOpacity : 1;
+ quint32 padding : 21; // feel free to use
// Optional stacking order
int globalStackingOrder;
diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp
index e058292..b58eb53 100644
--- a/src/gui/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp
@@ -317,7 +317,7 @@ void QGraphicsLayoutItemPrivate::setSizeComponent(
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 69e08d1..1fbda85 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -1329,7 +1329,8 @@ void QGraphicsScenePrivate::mousePressEventHandler(QGraphicsSceneMouseEvent *mou
// check if the item we are sending to are disabled (before we send the event)
bool disabled = !item->isEnabled();
bool isWindow = item->isWindow();
- if (mouseEvent->type() == QEvent::GraphicsSceneMouseDoubleClick && item != lastMouseGrabberItem) {
+ if (mouseEvent->type() == QEvent::GraphicsSceneMouseDoubleClick
+ && item != lastMouseGrabberItem && lastMouseGrabberItem) {
// If this item is different from the item that received the last
// mouse event, and mouseEvent is a doubleclick event, then the
// event is converted to a press. Known limitation:
@@ -2246,8 +2247,6 @@ void QGraphicsScene::setSceneRect(const QRectF &rect)
void QGraphicsScene::render(QPainter *painter, const QRectF &target, const QRectF &source,
Qt::AspectRatioMode aspectRatioMode)
{
- Q_D(QGraphicsScene);
-
// Default source rect = scene rect
QRectF sourceRect = source;
if (sourceRect.isNull())
@@ -2304,41 +2303,8 @@ void QGraphicsScene::render(QPainter *painter, const QRectF &target, const QRect
// Generate the style options
QStyleOptionGraphicsItem *styleOptionArray = new QStyleOptionGraphicsItem[numItems];
- for (int i = 0; i < numItems; ++i) {
- QGraphicsItem *item = itemArray[i];
-
- QStyleOptionGraphicsItem option;
- option.state = QStyle::State_None;
- option.rect = item->boundingRect().toRect();
- if (item->isSelected())
- option.state |= QStyle::State_Selected;
- if (item->isEnabled())
- option.state |= QStyle::State_Enabled;
- if (item->hasFocus())
- option.state |= QStyle::State_HasFocus;
- if (d->hoverItems.contains(item))
- option.state |= QStyle::State_MouseOver;
- if (item == mouseGrabberItem())
- option.state |= QStyle::State_Sunken;
-
- // 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;
- }
-
- option.levelOfDetail = qSqrt(itemToDeviceTransform.map(v1).length() * itemToDeviceTransform.map(v2).length());
- option.matrix = itemToDeviceTransform.toAffine(); //### discards perspective
-
- option.exposedRect = item->boundingRect();
- option.exposedRect &= itemToDeviceTransform.inverted().mapRect(targetRect);
-
- styleOptionArray[i] = option;
- }
+ for (int i = 0; i < numItems; ++i)
+ itemArray[i]->d_ptr->initStyleOption(&styleOptionArray[i], painterTransform, targetRect.toRect());
// Render the scene.
drawBackground(painter, sourceRect);
@@ -4777,8 +4743,9 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
return;
// Fetch the off-screen transparent buffer and exposed area info.
- QString pixmapKey;
+ QPixmapCache::Key pixmapKey;
QPixmap pix;
+ bool pixmapFound;
QGraphicsItemCache *itemCache = itemd->extraItemCache();
if (cacheMode == QGraphicsItem::ItemCoordinateCache) {
if (itemCache->boundingRect != brect.toRect()) {
@@ -4788,17 +4755,14 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
}
pixmapKey = itemCache->key;
} else {
- if ((pixmapKey = itemCache->deviceData.value(widget).key).isEmpty()) {
- pixmapKey.sprintf("qgv-%p-%p", item, widget);
- QGraphicsItemCache::DeviceData data;
- data.key = pixmapKey;
- itemCache->deviceData.insert(widget, data);
- }
+ pixmapKey = itemCache->deviceData.value(widget).key;
}
// Find pixmap in cache.
if (!itemCache->allExposed)
- QPixmapCache::find(pixmapKey, pix);
+ pixmapFound = QPixmapCache::find(pixmapKey, &pix);
+ else
+ pixmapFound = false;
// Render using item coordinate cache mode.
if (cacheMode == QGraphicsItem::ItemCoordinateCache) {
@@ -4851,8 +4815,12 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
_q_paintIntoCache(&pix, item, pixmapExposed, itemToPixmap, painter->renderHints(),
&cacheOption, painterStateProtection);
- // Reinsert this pixmap into the cache.
- QPixmapCache::insert(pixmapKey, pix);
+ if (!pixmapFound) {
+ // insert this pixmap into the cache.
+ itemCache->key = QPixmapCache::insert(pix);
+ } else {
+ QPixmapCache::replace(pixmapKey, pix);
+ }
// Reset expose data.
itemCache->allExposed = false;
@@ -5019,8 +4987,13 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
}
if (pixModified) {
- // Reinsert this pixmap into the cache
- QPixmapCache::insert(pixmapKey, pix);
+ if (!pixmapFound) {
+ // Insert this pixmap into the cache.
+ deviceData->key = QPixmapCache::insert(pix);
+ } else {
+ //otherwise we replace the pixmap in the cache
+ QPixmapCache::replace(pixmapKey, pix);
+ }
}
// Redraw the exposed area using an untransformed painter. This
@@ -5133,11 +5106,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();
@@ -5148,12 +5117,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 5e33896..396618c 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -1127,73 +1127,6 @@ QList<QGraphicsItem *> QGraphicsViewPrivate::findItems(const QRegion &exposedReg
return itemsInArea(exposedPath, Qt::IntersectsItemBoundingRect, Qt::DescendingOrder);
}
-void QGraphicsViewPrivate::generateStyleOptions(const QList<QGraphicsItem *> &itemList,
- QGraphicsItem **itemArray,
- QStyleOptionGraphicsItem *styleOptionArray,
- const QTransform &worldTransform,
- bool allItems,
- const QRegion &exposedRegion) const
-{
- // Two unit vectors.
- QLineF v1(0, 0, 1, 0);
- QLineF v2(0, 0, 0, 1);
- QTransform itemToViewportTransform;
- QRectF brect;
- QTransform reverseMap;
-
- for (int i = 0; i < itemList.size(); ++i) {
- QGraphicsItem *item = itemArray[i] = itemList[i];
-
- QStyleOptionGraphicsItem &option = styleOptionArray[i];
- brect = item->boundingRect();
- option.state = QStyle::State_None;
- option.rect = brect.toRect();
- option.exposedRect = QRectF();
- if (item->d_ptr->selected)
- option.state |= QStyle::State_Selected;
- if (item->d_ptr->enabled)
- option.state |= QStyle::State_Enabled;
- if (item->hasFocus())
- option.state |= QStyle::State_HasFocus;
- if (scene->d_func()->hoverItems.contains(item))
- option.state |= QStyle::State_MouseOver;
- if (item == scene->mouseGrabberItem())
- option.state |= QStyle::State_Sunken;
-
- // 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;
- }
-
- if (itemToViewportTransform.type() <= QTransform::TxTranslate) {
- // Translation and rotation only? The LOD is 1.
- option.levelOfDetail = 1;
- } else {
- // LOD is the transformed area of a 1x1 rectangle.
- option.levelOfDetail = qSqrt(itemToViewportTransform.map(v1).length() * itemToViewportTransform.map(v2).length());
- }
- option.matrix = itemToViewportTransform.toAffine(); //### discards perspective
-
- if (!allItems) {
- // Determine the item's exposed area
- reverseMap = itemToViewportTransform.inverted();
- foreach (const QRect &rect, exposedRegion.rects()) {
- option.exposedRect |= reverseMap.mapRect(QRectF(rect.adjusted(-1, -1, 1, 1)));
- if (option.exposedRect.contains(brect))
- break;
- }
- option.exposedRect &= brect;
- } else {
- // The whole item is exposed
- option.exposedRect = brect;
- }
- }
-}
-
/*!
Constructs a QGraphicsView. \a parent is passed to QWidget's constructor.
*/
@@ -2150,45 +2083,10 @@ void QGraphicsView::render(QPainter *painter, const QRectF &target, const QRect
.scale(xratio, yratio)
.translate(-sourceRect.left(), -sourceRect.top());
- // Two unit vectors.
- QLineF v1(0, 0, 1, 0);
- QLineF v2(0, 0, 0, 1);
-
// Generate the style options
QStyleOptionGraphicsItem *styleOptionArray = d->allocStyleOptionsArray(numItems);
- QStyleOptionGraphicsItem* option = styleOptionArray;
- for (int i = 0; i < numItems; ++i, ++option) {
- QGraphicsItem *item = itemArray[i];
-
- option->state = QStyle::State_None;
- option->rect = item->boundingRect().toRect();
- if (item->isSelected())
- option->state |= QStyle::State_Selected;
- if (item->isEnabled())
- option->state |= QStyle::State_Enabled;
- if (item->hasFocus())
- option->state |= QStyle::State_HasFocus;
- if (d->scene->d_func()->hoverItems.contains(item))
- option->state |= QStyle::State_MouseOver;
- if (item == d->scene->mouseGrabberItem())
- option->state |= QStyle::State_Sunken;
-
- // 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;
- }
-
- option->levelOfDetail = qSqrt(itemToViewportTransform.map(v1).length() * itemToViewportTransform.map(v2).length());
- option->matrix = itemToViewportTransform.toAffine();
-
- option->exposedRect = item->boundingRect();
- option->exposedRect &= itemToViewportTransform.inverted().mapRect(targetRect);
- }
+ for (int i = 0; i < numItems; ++i)
+ itemArray[i]->d_ptr->initStyleOption(&styleOptionArray[i], painterMatrix, targetRect.toRect());
painter->save();
@@ -3547,15 +3445,17 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
int backgroundTime = stopWatch.elapsed() - exposedTime;
#endif
- // Generate the style options
- QGraphicsItem **itemArray = new QGraphicsItem *[itemList.size()];
- QStyleOptionGraphicsItem *styleOptionArray = d->allocStyleOptionsArray(itemList.size());
-
- d->generateStyleOptions(itemList, itemArray, styleOptionArray, viewTransform,
- allItems, exposedRegion);
-
- // Items
- drawItems(&painter, itemList.size(), itemArray, styleOptionArray);
+ if (!itemList.isEmpty()) {
+ // Generate the style options.
+ const int numItems = itemList.size();
+ QGraphicsItem **itemArray = &itemList[0]; // Relies on QList internals, but is perfectly valid.
+ QStyleOptionGraphicsItem *styleOptionArray = d->allocStyleOptionsArray(numItems);
+ for (int i = 0; i < numItems; ++i)
+ itemArray[i]->d_ptr->initStyleOption(&styleOptionArray[i], viewTransform, exposedRegion, allItems);
+ // Draw the items.
+ drawItems(&painter, numItems, itemArray, styleOptionArray);
+ d->freeStyleOptionsArray(styleOptionArray);
+ }
#ifdef QGRAPHICSVIEW_DEBUG
int itemsTime = stopWatch.elapsed() - exposedTime - backgroundTime;
@@ -3564,9 +3464,6 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
// Foreground
drawForeground(&painter, exposedSceneRect);
- delete [] itemArray;
- d->freeStyleOptionsArray(styleOptionArray);
-
#ifdef QGRAPHICSVIEW_DEBUG
int foregroundTime = stopWatch.elapsed() - exposedTime - backgroundTime - itemsTime;
#endif
diff --git a/src/gui/graphicsview/qgraphicsview_p.h b/src/gui/graphicsview/qgraphicsview_p.h
index d573e8f..c18f85d 100644
--- a/src/gui/graphicsview/qgraphicsview_p.h
+++ b/src/gui/graphicsview/qgraphicsview_p.h
@@ -174,13 +174,6 @@ public:
bool updateSceneSlotReimplementedChecked;
QList<QGraphicsItem *> findItems(const QRegion &exposedRegion, bool *allItems) const;
-
- void generateStyleOptions(const QList<QGraphicsItem *> &itemList,
- QGraphicsItem **itemArray,
- QStyleOptionGraphicsItem *styleOptionArray,
- const QTransform &worldTransform,
- bool allItems,
- const QRegion &exposedRegion) const;
};
QT_END_NAMESPACE
diff --git a/src/gui/graphicsview/qgraphicswidget_p.cpp b/src/gui/graphicsview/qgraphicswidget_p.cpp
index 8ced47a..a435758 100644
--- a/src/gui/graphicsview/qgraphicswidget_p.cpp
+++ b/src/gui/graphicsview/qgraphicswidget_p.cpp
@@ -76,6 +76,7 @@ void QGraphicsWidgetPrivate::init(QGraphicsItem *parentItem, Qt::WindowFlags wFl
resolveLayoutDirection();
q->unsetWindowFrameMargins();
+ q->setFlag(QGraphicsItem::ItemUsesExtendedStyleOption);
}
qreal QGraphicsWidgetPrivate::titleBarHeight(const QStyleOptionTitleBar &options) const
{
diff --git a/src/gui/image/image.pri b/src/gui/image/image.pri
index ca52974..bf348af 100644
--- a/src/gui/image/image.pri
+++ b/src/gui/image/image.pri
@@ -22,6 +22,7 @@ HEADERS += \
image/qpixmap.h \
image/qpixmap_raster_p.h \
image/qpixmapcache.h \
+ image/qpixmapcache_p.h \
image/qpixmapdata_p.h \
image/qpixmapdatafactory_p.h \
image/qpixmapfilter_p.h
diff --git a/src/gui/image/qicon.cpp b/src/gui/image/qicon.cpp
index b2b8c13..471062f 100644
--- a/src/gui/image/qicon.cpp
+++ b/src/gui/image/qicon.cpp
@@ -924,7 +924,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 14e8b8f..25c68bc 100644
--- a/src/gui/image/qimage.cpp
+++ b/src/gui/image/qimage.cpp
@@ -5000,7 +5000,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 5568c0d..3ca685c 100644
--- a/src/gui/image/qpixmap.cpp
+++ b/src/gui/image/qpixmap.cpp
@@ -1282,7 +1282,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/qpixmapcache.cpp b/src/gui/image/qpixmapcache.cpp
index 4916489..810ce65 100644
--- a/src/gui/image/qpixmapcache.cpp
+++ b/src/gui/image/qpixmapcache.cpp
@@ -40,13 +40,9 @@
****************************************************************************/
#include "qpixmapcache.h"
-#include "qcache.h"
#include "qobject.h"
#include "qdebug.h"
-
-#include "qpaintengine.h"
-#include <private/qimage_p.h>
-#include <private/qpixmap_raster_p.h>
+#include "qpixmapcache_p.h"
QT_BEGIN_NAMESPACE
@@ -68,15 +64,17 @@ QT_BEGIN_NAMESPACE
access the global pixmap cache. It creates an internal QCache
object for caching the pixmaps.
- The cache associates a pixmap with a string (key). If two pixmaps
- are inserted into the cache using equal keys, then the last pixmap
- will hide the first pixmap. The QHash and QCache classes do
+ The cache associates a pixmap with a string as a key or with a QPixmapCache::Key.
+ The QPixmapCache::Key is faster than using strings as key.
+ If two pixmaps are inserted into the cache using equal keys, then the
+ last pixmap will hide the first pixmap. The QHash and QCache classes do
exactly the same.
The cache becomes full when the total size of all pixmaps in the
- cache exceeds cacheLimit(). The initial cache limit is 1024 KB (1
- MB); it is changed with setCacheLimit(). A pixmap takes roughly
- (\e{width} * \e{height} * \e{depth})/8 bytes of memory.
+ cache exceeds cacheLimit(). The initial cache limit is
+ 2048 KB(2 MB) for Embedded, 10240 KB (10
+ MB) for Desktops; it is changed with setCacheLimit().
+ A pixmap takes roughly (\e{width} * \e{height} * \e{depth})/8 bytes of memory.
The \e{Qt Quarterly} article
\l{http://doc.trolltech.com/qq/qq12-qpixmapcache.html}{Optimizing
@@ -92,52 +90,117 @@ static int cache_limit = 2048; // 2048 KB cache limit for embedded
static int cache_limit = 10240; // 10 MB cache limit for desktop
#endif
-// XXX: hw: is this a general concept we need to abstract?
-class QDetachedPixmap : public QPixmap
+/*!
+ Constructs an empty Key object.
+*/
+QPixmapCache::Key::Key() : d(0)
{
-public:
- QDetachedPixmap(const QPixmap &pix) : QPixmap(pix)
- {
- if (data && data->classId() == QPixmapData::RasterClass) {
- QRasterPixmapData *d = static_cast<QRasterPixmapData*>(data);
- if (!d->image.isNull() && d->image.d->paintEngine
- && !d->image.d->paintEngine->isActive())
- {
- delete d->image.d->paintEngine;
- d->image.d->paintEngine = 0;
- }
- }
+}
+
+/*!
+ \internal
+ Constructs a copy of \a other.
+*/
+QPixmapCache::Key::Key(const Key &other)
+{
+ if (other.d)
+ ++(other.d->ref);
+ d = other.d;
+}
+
+/*!
+ Destructor; called immediately before the object is deleted.
+*/
+QPixmapCache::Key::~Key()
+{
+ if (d && --(d->ref) == 0)
+ delete d;
+}
+
+/*!
+ \internal
+
+ Returns true if this key is the same as the given \a key.
+*/
+bool QPixmapCache::Key::operator ==(const Key &key) const
+{
+ return (d == key.d);
+}
+
+/*!
+ \internal
+*/
+QPixmapCache::Key &QPixmapCache::Key::operator =(const Key &other)
+{
+ if (d != other.d) {
+ if (other.d)
+ ++(other.d->ref);
+ if (d && --(d->ref) == 0)
+ delete d;
+ d = other.d;
}
-};
+ return *this;
+}
-class QPMCache : public QObject, public QCache<qint64, QDetachedPixmap>
+class QPMCache : public QObject, public QCache<QPixmapCache::Key, QDetachedPixmap>
{
Q_OBJECT
public:
- QPMCache()
- : QObject(0),
- QCache<qint64, QDetachedPixmap>(cache_limit * 1024),
- theid(0), ps(0), t(false) { }
- ~QPMCache() { }
+ QPMCache();
+ ~QPMCache();
void timerEvent(QTimerEvent *);
bool insert(const QString& key, const QPixmap &pixmap, int cost);
+ QPixmapCache::Key insert(const QPixmap &pixmap, int cost);
+ bool replace(const QPixmapCache::Key &key, const QPixmap &pixmap, int cost);
bool remove(const QString &key);
+ bool remove(const QPixmapCache::Key &key);
+
+ void resizeKeyArray(int size);
+ QPixmapCache::Key createKey();
+ void releaseKey(const QPixmapCache::Key &key);
+ void clear();
QPixmap *object(const QString &key) const;
+ QPixmap *object(const QPixmapCache::Key &key) const;
+
+ static inline QPixmapCache::KeyData *get(const QPixmapCache::Key &key)
+ {return key.d;}
+
+ static QPixmapCache::KeyData* getKeyData(QPixmapCache::Key *key);
private:
- QHash<QString, qint64> cacheKeys;
+ int *keyArray;
int theid;
int ps;
+ int keyArraySize;
+ int freeKey;
+ QHash<QString, QPixmapCache::Key> cacheKeys;
bool t;
};
+
QT_BEGIN_INCLUDE_NAMESPACE
#include "qpixmapcache.moc"
QT_END_INCLUDE_NAMESPACE
+static uint qHash(const QPixmapCache::Key &k)
+{
+ return qHash(QPMCache::get(k)->key);
+}
+
+QPMCache::QPMCache()
+ : QObject(0),
+ QCache<QPixmapCache::Key, QDetachedPixmap>(cache_limit * 1024),
+ keyArray(0), theid(0), ps(0), keyArraySize(0), freeKey(0), t(false)
+{
+}
+QPMCache::~QPMCache()
+{
+ free(keyArray);
+}
+
/*
- This is supposed to cut the cache size down by about 80-90% in a
+ This is supposed to cut the cache size down by about 25% in a
minute once the application becomes idle, to let any inserted pixmap
remain in the cache for some time before it becomes a candidate for
cleaning-up, and to not cut down the size of the cache while the
@@ -146,23 +209,28 @@ QT_END_INCLUDE_NAMESPACE
When the last pixmap has been deleted from the cache, kill the
timer so Qt won't keep the CPU from going into sleep mode.
*/
-
void QPMCache::timerEvent(QTimerEvent *)
{
int mc = maxCost();
bool nt = totalCost() == ps;
+ QList<QPixmapCache::Key> keys = QCache<QPixmapCache::Key, QDetachedPixmap>::keys();
setMaxCost(nt ? totalCost() * 3 / 4 : totalCost() -1);
setMaxCost(mc);
ps = totalCost();
- QHash<QString, qint64>::iterator it = cacheKeys.begin();
+ QHash<QString, QPixmapCache::Key>::iterator it = cacheKeys.begin();
while (it != cacheKeys.end()) {
if (!contains(it.value())) {
+ releaseKey(it.value());
it = cacheKeys.erase(it);
} else {
++it;
}
}
+ for (int i = 0; i < keys.size(); ++i) {
+ if (!contains(keys.at(i)))
+ releaseKey(keys.at(i));
+ }
if (!size()) {
killTimer(theid);
@@ -176,38 +244,154 @@ void QPMCache::timerEvent(QTimerEvent *)
QPixmap *QPMCache::object(const QString &key) const
{
- return QCache<qint64, QDetachedPixmap>::object(cacheKeys.value(key, -1));
+ QPixmapCache::Key cacheKey = cacheKeys.value(key);
+ if (!cacheKey.d || !cacheKey.d->isValid) {
+ const_cast<QPMCache *>(this)->cacheKeys.remove(key);
+ return 0;
+ }
+ QPixmap *ptr = QCache<QPixmapCache::Key, QDetachedPixmap>::object(cacheKey);
+ //We didn't find the pixmap in the cache, the key is not valid anymore
+ if (!ptr) {
+ const_cast<QPMCache *>(this)->cacheKeys.remove(key);
+ const_cast<QPMCache *>(this)->releaseKey(cacheKey);
+ }
+ return ptr;
}
+QPixmap *QPMCache::object(const QPixmapCache::Key &key) const
+{
+ Q_ASSERT(key.d->isValid);
+ QPixmap *ptr = QCache<QPixmapCache::Key, QDetachedPixmap>::object(key);
+ //We didn't find the pixmap in the cache, the key is not valid anymore
+ if (!ptr)
+ const_cast<QPMCache *>(this)->releaseKey(key);
+ return ptr;
+}
bool QPMCache::insert(const QString& key, const QPixmap &pixmap, int cost)
{
- qint64 cacheKey = pixmap.cacheKey();
- if (QCache<qint64, QDetachedPixmap>::object(cacheKey)) {
+ QPixmapCache::Key cacheKey;
+ QPixmapCache::Key oldCacheKey = cacheKeys.value(key);
+ //If for the same key we add already a pixmap we should delete it
+ if (oldCacheKey.d) {
+ QCache<QPixmapCache::Key, QDetachedPixmap>::remove(oldCacheKey);
+ cacheKey = oldCacheKey;
+ } else {
+ cacheKey = createKey();
+ }
+
+ bool success = QCache<QPixmapCache::Key, QDetachedPixmap>::insert(cacheKey, new QDetachedPixmap(pixmap), cost);
+ if (success) {
cacheKeys.insert(key, cacheKey);
- return true;
+ if (!theid) {
+ theid = startTimer(30000);
+ t = false;
+ }
+ } else {
+ //Insertion failed we released the new allocated key
+ releaseKey(cacheKey);
}
- qint64 oldCacheKey = cacheKeys.value(key, -1);
- //If for the same key we add already a pixmap we should delete it
- if (oldCacheKey != -1)
- QCache<qint64, QDetachedPixmap>::remove(oldCacheKey);
+ return success;
+}
- bool success = QCache<qint64, QDetachedPixmap>::insert(cacheKey, new QDetachedPixmap(pixmap), cost);
+QPixmapCache::Key QPMCache::insert(const QPixmap &pixmap, int cost)
+{
+ QPixmapCache::Key cacheKey = createKey();
+ bool success = QCache<QPixmapCache::Key, QDetachedPixmap>::insert(cacheKey, new QDetachedPixmap(pixmap), cost);
if (success) {
- cacheKeys.insert(key, cacheKey);
if (!theid) {
theid = startTimer(30000);
t = false;
}
+ } else {
+ //Insertion failed we released the key and return an invalid one
+ releaseKey(cacheKey);
+ }
+ return cacheKey;
+}
+
+bool QPMCache::replace(const QPixmapCache::Key &key, const QPixmap &pixmap, int cost)
+{
+ Q_ASSERT(key.d->isValid);
+ //If for the same key we add already a pixmap we should delete it
+ QCache<QPixmapCache::Key, QDetachedPixmap>::remove(key);
+
+ bool success = QCache<QPixmapCache::Key, QDetachedPixmap>::insert(key, new QDetachedPixmap(pixmap), cost);
+ if (success && !theid) {
+ theid = startTimer(30000);
+ t = false;
}
return success;
}
bool QPMCache::remove(const QString &key)
{
- qint64 cacheKey = cacheKeys.value(key, -1);
+ QPixmapCache::Key cacheKey = cacheKeys.value(key);
+ //The key was not in the cache
+ if (!cacheKey.d)
+ return false;
cacheKeys.remove(key);
- return QCache<qint64, QDetachedPixmap>::remove(cacheKey);
+ releaseKey(cacheKey);
+ return QCache<QPixmapCache::Key, QDetachedPixmap>::remove(cacheKey);
+}
+
+bool QPMCache::remove(const QPixmapCache::Key &key)
+{
+ releaseKey(key);
+ return QCache<QPixmapCache::Key, QDetachedPixmap>::remove(key);
+}
+
+void QPMCache::resizeKeyArray(int size)
+{
+ if (size <= keyArraySize || size == 0)
+ return;
+ keyArray = reinterpret_cast<int *>(realloc(keyArray, size * sizeof(int)));
+ for (int i = keyArraySize; i != size; ++i)
+ keyArray[i] = i + 1;
+ keyArraySize = size;
+}
+
+QPixmapCache::Key QPMCache::createKey()
+{
+ if (freeKey == keyArraySize)
+ resizeKeyArray(keyArraySize ? keyArraySize << 1 : 2);
+ int id = freeKey;
+ freeKey = keyArray[id];
+ QPixmapCache::Key key;
+ QPixmapCache::KeyData *d = QPMCache::getKeyData(&key);
+ d->key = ++id;
+ return key;
+}
+
+void QPMCache::releaseKey(const QPixmapCache::Key &key)
+{
+ if (key.d->key > keyArraySize || key.d->key <= 0)
+ return;
+ key.d->key--;
+ keyArray[key.d->key] = freeKey;
+ freeKey = key.d->key;
+ key.d->isValid = false;
+ key.d->key = 0;
+}
+
+void QPMCache::clear()
+{
+ free(keyArray);
+ keyArray = 0;
+ freeKey = 0;
+ keyArraySize = 0;
+ //Mark all keys as invalid
+ QList<QPixmapCache::Key> keys = QCache<QPixmapCache::Key, QDetachedPixmap>::keys();
+ for (int i = 0; i < keys.size(); ++i)
+ keys.at(i).d->isValid = false;
+ QCache<QPixmapCache::Key, QDetachedPixmap>::clear();
+}
+
+QPixmapCache::KeyData* QPMCache::getKeyData(QPixmapCache::Key *key)
+{
+ if (!key->d)
+ key->d = new QPixmapCache::KeyData;
+ return key->d;
}
Q_GLOBAL_STATIC(QPMCache, pm_cache)
@@ -222,7 +406,7 @@ Q_GLOBAL_STATIC(QPMCache, pm_cache)
\warning If valid, you should copy the pixmap immediately (this is
fast). Subsequent insertions into the cache could cause the
pointer to become invalid. For this reason, we recommend you use
- find(const QString&, QPixmap&) instead.
+ bool find(const QString&, QPixmap*) instead.
Example:
\snippet doc/src/snippets/code/src_gui_image_qpixmapcache.cpp 0
@@ -235,6 +419,17 @@ QPixmap *QPixmapCache::find(const QString &key)
/*!
+ \obsolete
+
+ Use bool find(const QString&, QPixmap*) instead.
+*/
+
+bool QPixmapCache::find(const QString &key, QPixmap& pixmap)
+{
+ return find(key, &pixmap);
+}
+
+/*!
Looks for a cached pixmap associated with the \a key in the cache.
If the pixmap is found, the function sets \a pm to that pixmap and
returns true; otherwise it leaves \a pm alone and returns false.
@@ -243,14 +438,31 @@ QPixmap *QPixmapCache::find(const QString &key)
\snippet doc/src/snippets/code/src_gui_image_qpixmapcache.cpp 1
*/
-bool QPixmapCache::find(const QString &key, QPixmap& pm)
+bool QPixmapCache::find(const QString &key, QPixmap* pixmap)
{
QPixmap *ptr = pm_cache()->object(key);
- if (ptr)
- pm = *ptr;
+ if (ptr && pixmap)
+ *pixmap = *ptr;
return ptr != 0;
}
+/*!
+ Looks for a cached pixmap associated with the \a key in the cache.
+ If the pixmap is found, the function sets \a pm to that pixmap and
+ returns true; otherwise it leaves \a pm alone and returns false. If
+ the pixmap is not found, it means that the \a key is not valid anymore,
+ so it will be released for the next insertion.
+*/
+bool QPixmapCache::find(const Key &key, QPixmap* pixmap)
+{
+ //The key is not valid anymore, a flush happened before probably
+ if (!key.d || !key.d->isValid)
+ return false;
+ QPixmap *ptr = pm_cache()->object(key);
+ if (ptr && pixmap)
+ *pixmap = *ptr;
+ return ptr != 0;
+}
/*!
Inserts a copy of the pixmap \a pm associated with the \a key into
@@ -272,9 +484,43 @@ bool QPixmapCache::find(const QString &key, QPixmap& pm)
\sa setCacheLimit()
*/
-bool QPixmapCache::insert(const QString &key, const QPixmap &pm)
+bool QPixmapCache::insert(const QString &key, const QPixmap &pixmap)
+{
+ return pm_cache()->insert(key, pixmap, pixmap.width() * pixmap.height() * pixmap.depth() / 8);
+}
+
+/*!
+ Inserts a copy of the pixmap \a pm into
+ the cache and return you the key. The key is always greater than 0.
+ If the key is equals 0 then the insertion failed.
+
+ When a pixmap is inserted and the cache is about to exceed its
+ limit, it removes pixmaps until there is enough room for the
+ pixmap to be inserted.
+
+ The oldest pixmaps (least recently accessed in the cache) are
+ deleted when more space is needed.
+
+ \sa setCacheLimit(), replace()
+*/
+QPixmapCache::Key QPixmapCache::insert(const QPixmap &pixmap)
+{
+ return pm_cache()->insert(pixmap, pixmap.width() * pixmap.height() * pixmap.depth() / 8);
+}
+
+/*!
+ Replace the pixmap associated to the \a key into
+ the cache. It return true if the pixmap \a pm has been correctly
+ inserted into the cache false otherwise.
+
+ \sa setCacheLimit(), insert()
+*/
+bool QPixmapCache::replace(const Key &key, const QPixmap &pixmap)
{
- return pm_cache()->insert(key, pm, pm.width() * pm.height() * pm.depth() / 8);
+ //The key is not valid anymore, a flush happened before probably
+ if (!key.d || !key.d->isValid)
+ return false;
+ return pm_cache()->replace(key, pixmap, pixmap.width() * pixmap.height() * pixmap.depth() / 8);
}
/*!
@@ -314,6 +560,17 @@ void QPixmapCache::remove(const QString &key)
pm_cache()->remove(key);
}
+/*!
+ Removes the pixmap associated with \a key from the cache and release
+ the key for a future insertion.
+*/
+void QPixmapCache::remove(const Key &key)
+{
+ //The key is not valid anymore, a flush happened before probably
+ if (!key.d || !key.d->isValid)
+ return;
+ pm_cache()->remove(key);
+}
/*!
Removes all pixmaps from the cache.
diff --git a/src/gui/image/qpixmapcache.h b/src/gui/image/qpixmapcache.h
index 2750a88..ae64310 100644
--- a/src/gui/image/qpixmapcache.h
+++ b/src/gui/image/qpixmapcache.h
@@ -53,12 +53,35 @@ QT_MODULE(Gui)
class Q_GUI_EXPORT QPixmapCache
{
public:
+ class KeyData;
+ class Key
+ {
+ public:
+ Key();
+ Key(const Key &other);
+ ~Key();
+ bool operator ==(const Key &key) const;
+ inline bool operator !=(const Key &key) const
+ { return !operator==(key); }
+ Key &operator =(const Key &other);
+
+ private:
+ KeyData *d;
+ friend class QPMCache;
+ friend class QPixmapCache;
+ };
+
static int cacheLimit();
static void setCacheLimit(int);
static QPixmap *find(const QString &key);
- static bool find(const QString &key, QPixmap&);
- static bool insert(const QString &key, const QPixmap&);
+ static bool find(const QString &key, QPixmap &pixmap);
+ static bool find(const QString &key, QPixmap *pixmap);
+ static bool find(const Key &key, QPixmap *pixmap);
+ static bool insert(const QString &key, const QPixmap &pixmap);
+ static Key insert(const QPixmap &pixmap);
+ static bool replace(const Key &key, const QPixmap &pixmap);
static void remove(const QString &key);
+ static void remove(const Key &key);
static void clear();
};
diff --git a/src/gui/image/qpixmapcache_p.h b/src/gui/image/qpixmapcache_p.h
new file mode 100644
index 0000000..5aa6eaf
--- /dev/null
+++ b/src/gui/image/qpixmapcache_p.h
@@ -0,0 +1,96 @@
+/****************************************************************************
+**
+** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
+** Contact: Qt Software Information (qt-info@nokia.com)
+**
+** This file is part of the QtGui module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** No Commercial Usage
+** This file contains pre-release code and may not be distributed.
+** You may use this file in accordance with the terms and conditions
+** contained in the 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 QPIXMAPCACHE_P_H
+#define QPIXMAPCACHE_P_H
+
+//
+// W A R N I N G
+// -------------
+//
+// This file is not part of the Qt API. This header
+// file may change from version to version without notice, or even be removed.
+//
+// We mean it.
+//
+
+#include "qpixmapcache.h"
+#include "qpaintengine.h"
+#include <private/qimage_p.h>
+#include <private/qpixmap_raster_p.h>
+#include "qcache.h"
+
+QT_BEGIN_NAMESPACE
+
+class QPixmapCache::KeyData
+{
+public:
+ KeyData() : isValid(true), key(0), ref(1) {}
+ KeyData(const KeyData &other)
+ : isValid(other.isValid), key(other.key), ref(1) {}
+ ~KeyData() {}
+
+ bool isValid;
+ int key;
+ int ref;
+};
+
+// XXX: hw: is this a general concept we need to abstract?
+class QDetachedPixmap : public QPixmap
+{
+public:
+ QDetachedPixmap(const QPixmap &pix) : QPixmap(pix)
+ {
+ if (data && data->classId() == QPixmapData::RasterClass) {
+ QRasterPixmapData *d = static_cast<QRasterPixmapData*>(data);
+ if (!d->image.isNull() && d->image.d->paintEngine
+ && !d->image.d->paintEngine->isActive())
+ {
+ delete d->image.d->paintEngine;
+ d->image.d->paintEngine = 0;
+ }
+ }
+ }
+};
+
+QT_END_NAMESPACE
+
+#endif // QPIXMAPCACHE_P_H
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp
index 90c38ca..c90216b 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.
*/
@@ -3218,9 +3218,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/qfileiconprovider.cpp b/src/gui/itemviews/qfileiconprovider.cpp
index 9f33af3..054f4cf 100644
--- a/src/gui/itemviews/qfileiconprovider.cpp
+++ b/src/gui/itemviews/qfileiconprovider.cpp
@@ -416,26 +416,22 @@ QString QFileIconProvider::type(const QFileInfo &info) const
}
if (info.isDir())
- return QApplication::translate("QFileDialog",
#ifdef Q_WS_WIN
- "File Folder", "Match Windows Explorer"
+ return QApplication::translate("QFileDialog", "File Folder", "Match Windows Explorer");
#else
- "Folder", "All other platforms"
+ return QApplication::translate("QFileDialog", "Folder", "All other platforms");
#endif
- );
// Windows - "File Folder"
// OS X - "Folder"
// Konqueror - "Folder"
// Nautilus - "folder"
if (info.isSymLink())
- return QApplication::translate("QFileDialog",
#ifdef Q_OS_MAC
- "Alias", "Mac OS X Finder"
+ return QApplication::translate("QFileDialog", "Alias", "Mac OS X Finder");
#else
- "Shortcut", "All other platforms"
+ return QApplication::translate("QFileDialog", "Shortcut", "All other platforms");
#endif
- );
// OS X - "Alias"
// Windows - "Shortcut"
// Konqueror - "Folder" or "TXT File" i.e. what it is pointing to
diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp
index bf9b5c5..3b7eb2d 100644
--- a/src/gui/itemviews/qitemdelegate.cpp
+++ b/src/gui/itemviews/qitemdelegate.cpp
@@ -218,7 +218,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.
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/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp
index f6c5cf0..d742698 100644
--- a/src/gui/itemviews/qtreeview.cpp
+++ b/src/gui/itemviews/qtreeview.cpp
@@ -3086,10 +3086,6 @@ void QTreeViewPrivate::layout(int i)
Q_Q(QTreeView);
QModelIndex current;
QModelIndex parent = (i < 0) ? (QModelIndex)root : modelIndex(i);
- // modelIndex() will return an index that don't have a parent if column 0 is hidden,
- // so we must make sure that parent points to the actual parent that has children.
- if (parent != root)
- parent = model->index(parent.row(), 0, parent.parent());
if (i>=0 && !parent.isValid()) {
//modelIndex() should never return something invalid for the real items.
diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp
index b9ebf55..824d6f1 100644
--- a/src/gui/kernel/qapplication.cpp
+++ b/src/gui/kernel/qapplication.cpp
@@ -2022,12 +2022,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/qclipboard.cpp b/src/gui/kernel/qclipboard.cpp
index 6daf433..96e9580 100644
--- a/src/gui/kernel/qclipboard.cpp
+++ b/src/gui/kernel/qclipboard.cpp
@@ -476,7 +476,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/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index ab529fe..e186557 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -2286,13 +2286,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) {
@@ -6223,7 +6236,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 6d3da61..8243f32 100644
--- a/src/gui/kernel/qwidget_mac.mm
+++ b/src/gui/kernel/qwidget_mac.mm
@@ -728,6 +728,7 @@ static OSWindowRef qt_mac_create_window(QWidget *, WindowClass wclass, WindowAtt
static EventTypeSpec window_events[] = {
{ kEventClassWindow, kEventWindowClose },
{ kEventClassWindow, kEventWindowExpanded },
+ { kEventClassWindow, kEventWindowHidden },
{ kEventClassWindow, kEventWindowZoomed },
{ kEventClassWindow, kEventWindowCollapsed },
{ kEventClassWindow, kEventWindowToolbarSwitchMode },
@@ -780,16 +781,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);
@@ -997,6 +988,19 @@ OSStatus QWidgetPrivate::qt_window_event(EventHandlerCallRef er, EventRef event,
}
}
}
+ } else if (ekind == kEventWindowHidden) {
+ // Make sure that we also hide any visible sheets on our window.
+ // Cocoa does the right thing for us.
+ const QObjectList children = widget->children();
+ const int childCount = children.count();
+ for (int i = 0; i < childCount; ++i) {
+ QObject *obj = children.at(i);
+ if (obj->isWidgetType()) {
+ QWidget *widget = static_cast<QWidget *>(obj);
+ if (qt_mac_is_macsheet(widget) && widget->isVisible())
+ widget->hide();
+ }
+ }
} else {
handled_event = false;
}
@@ -4021,8 +4025,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 24d167e..534a425 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();
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index 9b10f3c..3645d9a 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/qprinter.cpp b/src/gui/painting/qprinter.cpp
index 154d90c..ba208fd 100644
--- a/src/gui/painting/qprinter.cpp
+++ b/src/gui/painting/qprinter.cpp
@@ -480,26 +480,26 @@ void QPrinterPrivate::addToManualSetList(QPrintEngine::PrintEnginePropertyKey ke
\value A7 74 x 105 mm
\value A8 52 x 74 mm
\value A9 37 x 52 mm
- \value B0 1030 x 1456 mm
- \value B1 728 x 1030 mm
- \value B10 32 x 45 mm
- \value B2 515 x 728 mm
- \value B3 364 x 515 mm
- \value B4 257 x 364 mm
- \value B5 182 x 257 mm, 7.17 x 10.13 inches
- \value B6 128 x 182 mm
- \value B7 91 x 128 mm
- \value B8 64 x 91 mm
- \value B9 45 x 64 mm
+ \value B0 1000 x 1414 mm
+ \value B1 707 x 1000 mm
+ \value B2 500 x 707 mm
+ \value B3 353 x 500 mm
+ \value B4 250 x 353 mm
+ \value B5 176 x 250 mm, 6.93 x 9.84 inches
+ \value B6 125 x 176 mm
+ \value B7 88 x 125 mm
+ \value B8 62 x 88 mm
+ \value B9 33 x 62 mm
+ \value B10 31 x 44 mm
\value C5E 163 x 229 mm
\value Comm10E 105 x 241 mm, U.S. Common 10 Envelope
\value DLE 110 x 220 mm
- \value Executive 7.5 x 10 inches, 191 x 254 mm
+ \value Executive 7.5 x 10 inches, 190.5 x 254 mm
\value Folio 210 x 330 mm
- \value Ledger 432 x 279 mm
- \value Legal 8.5 x 14 inches, 216 x 356 mm
- \value Letter 8.5 x 11 inches, 216 x 279 mm
- \value Tabloid 279 x 432 mm
+ \value Ledger 431.8 x 279.4 mm
+ \value Legal 8.5 x 14 inches, 215.9 x 355.6 mm
+ \value Letter 8.5 x 11 inches, 215.9 x 279.4 mm
+ \value Tabloid 279.4 x 431.8 mm
\value Custom Unknown, or a user defined size.
With setFullPage(false) (the default), the metrics will be a bit
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 4a33b92..ec8c1dc 100644
--- a/src/gui/painting/qtransform.cpp
+++ b/src/gui/painting/qtransform.cpp
@@ -1425,7 +1425,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);
@@ -1458,7 +1459,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;
}
@@ -1525,7 +1527,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/painting/qtransform.h b/src/gui/painting/qtransform.h
index aac7c31..7e93f74 100644
--- a/src/gui/painting/qtransform.h
+++ b/src/gui/painting/qtransform.h
@@ -275,6 +275,13 @@ inline qreal QTransform::dy() const
return affine._dy;
}
+#if defined(Q_CC_GNU)
+# define Q_CC_GNU_VERSION (((__GNUC__)<<16)|((__GNUC_MINOR__)<<8)|(__GNUC_PATCHLEVEL__))
+# if Q_CC_GNU_VERSION >= 0x040201
+# pragma GCC diagnostic ignored "-Wfloat-equal"
+# endif
+#endif
+
inline QTransform &QTransform::operator*=(qreal num)
{
if (num == 1.)
@@ -331,6 +338,13 @@ inline QTransform &QTransform::operator-=(qreal num)
return *this;
}
+#if defined(Q_CC_GNU_VERSION)
+# if Q_CC_GNU_VERSION >= 0x040201
+# pragma GCC diagnostic warning "-Wfloat-equal"
+# endif
+# undef Q_CC_GNU_VERSION
+#endif
+
/****** stream functions *******************/
Q_GUI_EXPORT QDataStream &operator<<(QDataStream &, const QTransform &);
Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QTransform &);
diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp
index c0899f8..6972803 100644
--- a/src/gui/styles/qcommonstyle.cpp
+++ b/src/gui/styles/qcommonstyle.cpp
@@ -1664,6 +1664,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt,
if (!styleHint(SH_UnderlineShortcut, opt, widget))
alignment |= Qt::TextHideMnemonic;
rect.translate(shiftX, shiftY);
+ p->setFont(toolbutton->font);
drawItemText(p, rect, alignment, toolbutton->palette,
opt->state & State_Enabled, toolbutton->text,
QPalette::ButtonText);
diff --git a/src/gui/styles/qmacstyle_mac.mm b/src/gui/styles/qmacstyle_mac.mm
index 5e538cb..2478f20 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)
@@ -2003,87 +2008,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;
@@ -2157,7 +2087,6 @@ void qt_mac_fill_background(QPainter *painter, const QRegion &rgn, const QPoint
}
}
-/*! \reimp */
void QMacStyle::polish(QPalette &pal)
{
if (!qt_mac_backgroundPattern) {
@@ -2181,17 +2110,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);
@@ -2255,7 +2181,6 @@ void QMacStyle::polish(QWidget* w)
}
}
-/*! \reimp */
void QMacStyle::unpolish(QWidget* w)
{
d->removeWidget(w);
@@ -2286,7 +2211,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);
@@ -2668,7 +2592,6 @@ int QMacStyle::pixelMetric(PixelMetric metric, const QStyleOption *opt, const QW
return ret;
}
-/*! \reimp */
QPalette QMacStyle::standardPalette() const
{
QPalette pal = QWindowsStyle::standardPalette();
@@ -2678,7 +2601,6 @@ QPalette QMacStyle::standardPalette() const
return pal;
}
-/*! \reimp */
int QMacStyle::styleHint(StyleHint sh, const QStyleOption *opt, const QWidget *w,
QStyleHintReturn *hret) const
{
@@ -2973,7 +2895,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
{
@@ -2999,7 +2920,6 @@ QPixmap QMacStyle::generatedIconPixmap(QIcon::Mode iconMode, const QPixmap &pixm
}
-/*! \reimp */
QPixmap QMacStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOption *opt,
const QWidget *widget) const
{
@@ -3030,31 +2950,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) {
@@ -3067,29 +2963,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);
@@ -3098,12 +2976,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) {
@@ -3119,7 +2991,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
{
@@ -3552,7 +3423,6 @@ static inline QPixmap darkenPixmap(const QPixmap &pixmap)
-/*! \reimp */
void QMacStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPainter *p,
const QWidget *w) const
{
@@ -4605,7 +4475,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
{
@@ -4899,7 +4769,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
{
@@ -5282,7 +5151,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) {
@@ -5406,7 +5276,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
@@ -5537,7 +5406,6 @@ QStyle::SubControl QMacStyle::hitTestComplexControl(ComplexControl cc,
return sc;
}
-/*! \reimp */
QRect QMacStyle::subControlRect(ComplexControl cc, const QStyleOptionComplex *opt, SubControl sc,
const QWidget *widget) const
{
@@ -5877,7 +5745,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
{
@@ -6172,9 +6039,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
{
@@ -6183,9 +6047,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) {
@@ -6260,9 +6121,6 @@ void qt_mac_constructQIconFromIconRef(const IconRef icon, const IconRef overlayI
}
}
-/*!
- \internal
-*/
QIcon QMacStyle::standardIconImplementation(StandardPixmap standardIcon, const QStyleOption *opt,
const QWidget *widget) const
{
@@ -6376,9 +6234,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/qmotifstyle.cpp b/src/gui/styles/qmotifstyle.cpp
index 7d4fab8..be0e3eb 100644
--- a/src/gui/styles/qmotifstyle.cpp
+++ b/src/gui/styles/qmotifstyle.cpp
@@ -2026,10 +2026,6 @@ QMotifStyle::sizeFromContents(ContentsType ct, const QStyleOption *opt,
QSize sz(contentsSize);
switch(ct) {
- case CT_Splitter:
- sz = QSize(10, 10);
- break;
-
case CT_RadioButton:
case CT_CheckBox:
sz = QCommonStyle::sizeFromContents(ct, opt, contentsSize, widget);
diff --git a/src/gui/styles/qstyle.cpp b/src/gui/styles/qstyle.cpp
index b73332f..514f67b 100644
--- a/src/gui/styles/qstyle.cpp
+++ b/src/gui/styles/qstyle.cpp
@@ -1332,7 +1332,7 @@ void QStyle::drawItemPixmap(QPainter *painter, const QRect &rect, int alignment,
\value PM_LayoutVerticalSpacing Default \l{QLayout::spacing}{vertical spacing} for a QLayout.
\value PM_MaximumDragDistance The maximum allowed distance between
- the mouse and a slider when dragging. Exceeding the specified
+ the mouse and a scrollbar when dragging. Exceeding the specified
distance will cause the slider to jump back to the original
position; a value of -1 disables this behavior.
diff --git a/src/gui/styles/qstyleoption.cpp b/src/gui/styles/qstyleoption.cpp
index ce053ae..5b1bc61 100644
--- a/src/gui/styles/qstyleoption.cpp
+++ b/src/gui/styles/qstyleoption.cpp
@@ -48,6 +48,7 @@
#ifndef QT_NO_DEBUG
#include <qdebug.h>
#endif
+#include <QtCore/qmath.h>
QT_BEGIN_NAMESPACE
@@ -4998,6 +4999,34 @@ QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(int version)
}
/*!
+ \since 4.6
+
+ Returns the level of detail from the \a worldTransform.
+
+ Its value represents the maximum value of the height and
+ width of a unity rectangle, mapped using the \a worldTransform
+ of the painter used to draw the item. By default, if no
+ transformations are applied, its value is 1. If zoomed out 1:2, the level
+ of detail will be 0.5, and if zoomed in 2:1, its value is 2.
+
+ For more advanced level-of-detail metrics, use
+ QStyleOptionGraphicsItem::matrix directly.
+
+ \sa QStyleOptionGraphicsItem::matrix
+*/
+qreal QStyleOptionGraphicsItem::levelOfDetailFromTransform(const QTransform &worldTransform)
+{
+ if (worldTransform.type() <= QTransform::TxTranslate)
+ return 1; // Translation only? The LOD is 1.
+
+ // Two unit vectors.
+ QLineF v1(0, 0, 1, 0);
+ QLineF v2(0, 0, 0, 1);
+ // LOD is the transformed area of a 1x1 rectangle.
+ return qSqrt(worldTransform.map(v1).length() * worldTransform.map(v2).length());
+}
+
+/*!
\fn QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other)
Constructs a copy of \a other.
@@ -5029,19 +5058,10 @@ QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(int version)
/*!
\variable QStyleOptionGraphicsItem::levelOfDetail
- \brief a simple metric for determining an item's level of detail
-
- This simple metric provides an easy way to determine the level of detail
- for an item. Its value represents the maximum value of the height and
- width of a unity rectangle, mapped using the complete transformation
- matrix of the painter used to draw the item. By default, if no
- transformations are applied, its value is 1. If zoomed out 1:2, the level
- of detail will be 0.5, and if zoomed in 2:1, its value is 2.
-
- For more advanced level-of-detail metrics, use
- QStyleOptionGraphicsItem::matrix directly.
+ \obsolete
- \sa QStyleOptionGraphicsItem::matrix
+ Use QStyleOptionGraphicsItem::levelOfDetailFromTransform
+ together with QPainter::worldTransform() instead.
*/
/*!
diff --git a/src/gui/styles/qstyleoption.h b/src/gui/styles/qstyleoption.h
index 5759a05..eb05324 100644
--- a/src/gui/styles/qstyleoption.h
+++ b/src/gui/styles/qstyleoption.h
@@ -856,6 +856,7 @@ public:
QStyleOptionGraphicsItem();
QStyleOptionGraphicsItem(const QStyleOptionGraphicsItem &other) : QStyleOption(Version, Type) { *this = other; }
+ static qreal levelOfDetailFromTransform(const QTransform &worldTransform);
protected:
QStyleOptionGraphicsItem(int version);
};
diff --git a/src/gui/styles/qstylesheetstyle.cpp b/src/gui/styles/qstylesheetstyle.cpp
index dcc11b8..fdd51c3 100644
--- a/src/gui/styles/qstylesheetstyle.cpp
+++ b/src/gui/styles/qstylesheetstyle.cpp
@@ -3030,6 +3030,7 @@ void QStyleSheetStyle::drawComplexControl(ComplexControl cc, const QStyleOptionC
if (const QStyleOptionToolButton *tool = qstyleoption_cast<const QStyleOptionToolButton *>(opt)) {
QStyleOptionToolButton toolOpt(*tool);
rule.configurePalette(&toolOpt.palette, QPalette::ButtonText, QPalette::Button);
+ toolOpt.font = rule.font.resolve(toolOpt.font);
toolOpt.rect = rule.borderRect(opt->rect);
bool customArrow = (tool->features & (QStyleOptionToolButton::HasMenu | QStyleOptionToolButton::MenuButtonPopup));
bool customDropDown = tool->features & QStyleOptionToolButton::MenuButtonPopup;
@@ -4805,13 +4806,10 @@ QSize QStyleSheetStyle::sizeFromContents(ContentsType ct, const QStyleOption *op
if ((pe == PseudoElement_MenuSeparator) && subRule.hasContentsSize()) {
return QSize(sz.width(), subRule.size().height());
} else if ((pe == PseudoElement_Item) && (subRule.hasBox() || subRule.hasBorder())) {
- int width = csz.width(), height = qMax(csz.height(), mi->fontMetrics.height());
- if (!mi->icon.isNull()) {
- int iconExtent = pixelMetric(PM_SmallIconSize);
- height = qMax(height, mi->icon.actualSize(QSize(iconExtent, iconExtent)).height());
- }
- width += mi->tabWidth;
- return subRule.boxSize(csz.expandedTo(subRule.minimumContentsSize()));
+ int width = csz.width();
+ if (mi->text.contains(QLatin1Char('\t')))
+ width += 12; //as in QCommonStyle
+ return subRule.boxSize(subRule.adjustSize(QSize(width, csz.height())));
}
}
break;
diff --git a/src/gui/styles/qwindowsxpstyle.cpp b/src/gui/styles/qwindowsxpstyle.cpp
index 639eff0..3dac9f5 100644
--- a/src/gui/styles/qwindowsxpstyle.cpp
+++ b/src/gui/styles/qwindowsxpstyle.cpp
@@ -1792,7 +1792,12 @@ case PE_Frame:
return;
case PE_IndicatorToolBarSeparator:
-
+ if (option->rect.height() < 3) {
+ // XP style requires a few pixels for the separator
+ // to be visible.
+ QWindowsStyle::drawPrimitive(pe, option, p, widget);
+ return;
+ }
name = QLatin1String("TOOLBAR");
partId = TP_SEPARATOR;
diff --git a/src/gui/text/qcssparser.cpp b/src/gui/text/qcssparser.cpp
index 8214e54..38621c1 100644
--- a/src/gui/text/qcssparser.cpp
+++ b/src/gui/text/qcssparser.cpp
@@ -1161,13 +1161,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;
@@ -1221,9 +1228,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/qcssparser_p.h b/src/gui/text/qcssparser_p.h
index fbd6c16..72bd637 100644
--- a/src/gui/text/qcssparser_p.h
+++ b/src/gui/text/qcssparser_p.h
@@ -403,7 +403,7 @@ struct BorderData {
// 4. QVector<Declaration> - { prop1: value1; prop2: value2; }
// 5. Declaration - prop1: value1;
-struct Declaration
+struct Q_AUTOTEST_EXPORT Declaration
{
struct DeclarationData : public QSharedData
{
@@ -539,7 +539,7 @@ struct BasicSelector
Relation relationToNext;
};
-struct Selector
+struct Q_AUTOTEST_EXPORT Selector
{
QVector<BasicSelector> basicSelectors;
int specificity() const;
@@ -552,7 +552,7 @@ struct MediaRule;
struct PageRule;
struct ImportRule;
-struct ValueExtractor
+struct Q_AUTOTEST_EXPORT ValueExtractor
{
ValueExtractor(const QVector<Declaration> &declarations, const QPalette & = QPalette());
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_win.cpp b/src/gui/text/qfontengine_win.cpp
index 6551e87..feea1f2 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/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/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/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp
index 9886969..0d8b4de 100644
--- a/src/gui/widgets/qabstractscrollarea.cpp
+++ b/src/gui/widgets/qabstractscrollarea.cpp
@@ -873,21 +873,22 @@ bool QAbstractScrollArea::event(QEvent *e)
case QEvent::Resize:
d->layoutChildren();
break;
- case QEvent::Paint:
+ case QEvent::Paint: {
+ QStyleOption option;
+ option.initFrom(this);
if (d->cornerPaintingRect.isValid()) {
- QStyleOption option;
option.rect = d->cornerPaintingRect;
QPainter p(this);
style()->drawPrimitive(QStyle::PE_PanelScrollAreaCorner, &option, &p, this);
}
#ifdef Q_WS_MAC
if (d->reverseCornerPaintingRect.isValid()) {
- QStyleOption option;
option.rect = d->reverseCornerPaintingRect;
QPainter p(this);
style()->drawPrimitive(QStyle::PE_PanelScrollAreaCorner, &option, &p, this);
}
#endif
+ }
QFrame::paintEvent((QPaintEvent*)e);
break;
#ifndef QT_NO_CONTEXTMENU
diff --git a/src/gui/widgets/qabstractspinbox.cpp b/src/gui/widgets/qabstractspinbox.cpp
index 347f89a..d640c70 100644
--- a/src/gui/widgets/qabstractspinbox.cpp
+++ b/src/gui/widgets/qabstractspinbox.cpp
@@ -193,6 +193,7 @@ void QAbstractSpinBox::setButtonSymbols(ButtonSymbols buttonSymbols)
Q_D(QAbstractSpinBox);
if (d->buttonSymbols != buttonSymbols) {
d->buttonSymbols = buttonSymbols;
+ d->updateEditFieldGeometry();
update();
}
}
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 f30ece4..01fe9d2 100644
--- a/src/gui/widgets/qcombobox.cpp
+++ b/src/gui/widgets/qcombobox.cpp
@@ -947,7 +947,7 @@ QComboBoxPrivateContainer* QComboBoxPrivate::viewContainer()
container = new QComboBoxPrivateContainer(new QComboBoxListView(q), q);
container->itemView()->setModel(model);
container->itemView()->setTextElideMode(Qt::ElideMiddle);
- updateDelegate();
+ updateDelegate(true);
updateLayoutDirection();
updateViewContainerPaletteAndOpacity();
QObject::connect(container, SIGNAL(itemSelected(QModelIndex)),
@@ -1589,15 +1589,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 a0b76cf..ee0da62 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();
void updateViewContainerPaletteAndOpacity();
diff --git a/src/gui/widgets/qlcdnumber.cpp b/src/gui/widgets/qlcdnumber.cpp
index 9d98dbc..6686d7e 100644
--- a/src/gui/widgets/qlcdnumber.cpp
+++ b/src/gui/widgets/qlcdnumber.cpp
@@ -1275,7 +1275,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 d16ed10..128f243 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -3675,7 +3675,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 dddd83e..edfeee7 100644
--- a/src/gui/widgets/qmenu_p.h
+++ b/src/gui/widgets/qmenu_p.h
@@ -208,7 +208,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 0befa6d..2ce89f9 100644
--- a/src/gui/widgets/qmenu_wince.cpp
+++ b/src/gui/widgets/qmenu_wince.cpp
@@ -214,7 +214,7 @@ static HWND qt_wce_create_menubar(HWND parentHandle, HINSTANCE resourceHandle, i
mbi.nToolBarId = toolbarID;
if (ptrCreateMenuBar(&mbi)) {
-#ifdef Q_WS_WINCE_WM
+#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);
diff --git a/src/gui/widgets/qmenubar.cpp b/src/gui/widgets/qmenubar.cpp
index d2e6bfb..cffc3d5 100644
--- a/src/gui/widgets/qmenubar.cpp
+++ b/src/gui/widgets/qmenubar.cpp
@@ -2420,7 +2420,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/qslider.cpp b/src/gui/widgets/qslider.cpp
index 32b9021..5b9c8a4 100644
--- a/src/gui/widgets/qslider.cpp
+++ b/src/gui/widgets/qslider.cpp
@@ -62,7 +62,6 @@ public:
int tickInterval;
QSlider::TickPosition tickPosition;
int clickOffset;
- int snapBackPosition;
void init();
void resetLayoutItemMargins();
int pixelPosToRangeValue(int pos) const;
@@ -493,7 +492,6 @@ void QSlider::mousePressEvent(QMouseEvent *ev)
setRepeatAction(SliderNoAction);
QRect sr = style()->subControlRect(QStyle::CC_Slider, &opt, QStyle::SC_SliderHandle, this);
d->clickOffset = d->pick(ev->pos() - sr.topLeft());
- d->snapBackPosition = d->position;
update(sr);
setSliderDown(true);
}
@@ -513,14 +511,6 @@ void QSlider::mouseMoveEvent(QMouseEvent *ev)
int newPosition = d->pixelPosToRangeValue(d->pick(ev->pos()) - d->clickOffset);
QStyleOptionSlider opt;
initStyleOption(&opt);
- int m = style()->pixelMetric(QStyle::PM_MaximumDragDistance, &opt, this);
- if (m >= 0) {
- QRect r = rect();
- r.adjust(-m, -m, m, m);
- if (!r.contains(ev->pos())) {
- newPosition = d->snapBackPosition;
- }
- }
setSliderPosition(newPosition);
}
diff --git a/src/gui/widgets/qsplitter.cpp b/src/gui/widgets/qsplitter.cpp
index 06774bc..400d78a 100644
--- a/src/gui/widgets/qsplitter.cpp
+++ b/src/gui/widgets/qsplitter.cpp
@@ -1525,7 +1525,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..c761a02 100644
--- a/src/network/access/qhttp.cpp
+++ b/src/network/access/qhttp.cpp
@@ -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()
@@ -1446,7 +1446,7 @@ QString QHttpRequestHeader::toString() const
that indicates if the request finished with an error.
To make an HTTP request you must set up suitable HTTP headers. The
- following example demonstrates, how to request the main HTML page
+ following example demonstrates how to request the main HTML page
from the Trolltech home page (i.e., the URL
\c http://qtsoftware.com/index.html):
diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp
index d4bf008..43fbb16 100644
--- a/src/network/access/qhttpnetworkconnection.cpp
+++ b/src/network/access/qhttpnetworkconnection.cpp
@@ -703,27 +703,37 @@ void QHttpNetworkConnectionPrivate::handleStatus(QAbstractSocket *socket, QHttpN
switch (statusCode) {
case 401:
case 407:
- handleAuthenticateChallenge(socket, reply, (statusCode == 407), resend);
- if (resend) {
- int i = indexOf(socket);
-
- QNonContiguousByteDevice* uploadByteDevice = channels[i].request.uploadByteDevice();
- if (uploadByteDevice) {
- if (uploadByteDevice->reset()) {
- channels[i].written = 0;
- } else {
- emitReplyError(socket, reply, QNetworkReply::ContentReSendError);
- break;
+ if (handleAuthenticateChallenge(socket, reply, (statusCode == 407), resend)) {
+ if (resend) {
+ int i = indexOf(socket);
+
+ QNonContiguousByteDevice* uploadByteDevice = channels[i].request.uploadByteDevice();
+ if (uploadByteDevice) {
+ if (uploadByteDevice->reset()) {
+ channels[i].written = 0;
+ } else {
+ emitReplyError(socket, reply, QNetworkReply::ContentReSendError);
+ break;
+ }
}
- }
-
- eraseData(reply);
- // also use async _q_startNextRequest so we dont break with closed
- // proxy or server connections..
- channels[i].resendCurrent = true;
- QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
+ eraseData(reply);
+ // also use async _q_startNextRequest so we dont break with closed
+ // proxy or server connections..
+ channels[i].resendCurrent = true;
+ QMetaObject::invokeMethod(q, "_q_startNextRequest", Qt::QueuedConnection);
+ }
+ } 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:
@@ -826,7 +836,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/qnetworkaccesshttpbackend.cpp b/src/network/access/qnetworkaccesshttpbackend.cpp
index 7d0438e..bd364cb 100644
--- a/src/network/access/qnetworkaccesshttpbackend.cpp
+++ b/src/network/access/qnetworkaccesshttpbackend.cpp
@@ -973,21 +973,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 d42370d..0ca6b13 100644
--- a/src/network/access/qnetworkdiskcache.cpp
+++ b/src/network/access/qnetworkdiskcache.cpp
@@ -496,21 +496,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/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp
index 670745b..960999e 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/socket/qabstractsocket.cpp b/src/network/socket/qabstractsocket.cpp
index f9750f2..336a7e7 100644
--- a/src/network/socket/qabstractsocket.cpp
+++ b/src/network/socket/qabstractsocket.cpp
@@ -1127,7 +1127,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/opengl/qgl.cpp b/src/opengl/qgl.cpp
index a1f81ca..0a2a196 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -2692,7 +2692,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
diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp
index d28a495..6f7078a 100644
--- a/src/opengl/qpaintengine_opengl.cpp
+++ b/src/opengl/qpaintengine_opengl.cpp
@@ -2028,7 +2028,7 @@ void QOpenGLPaintEnginePrivate::fillVertexArray(Qt::FillRule fillRule)
// Enable color writes.
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
- glStencilMask(0);
+ glStencilMask(stencilMask);
setGradientOps(cbrush, QRectF(QPointF(min_x, min_y), QSizeF(max_x - min_x, max_y - min_y)));
@@ -2040,12 +2040,14 @@ void QOpenGLPaintEnginePrivate::fillVertexArray(Qt::FillRule fillRule)
// Enable stencil func.
glStencilFunc(GL_NOTEQUAL, 0, stencilMask);
+ glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE);
composite(rect);
} else {
DEBUG_ONCE qDebug() << "QOpenGLPaintEnginePrivate: Drawing polygon using stencil method (no fragment programs)";
// Enable stencil func.
glStencilFunc(GL_NOTEQUAL, 0, stencilMask);
+ glStencilOp(GL_REPLACE, GL_REPLACE, GL_REPLACE);
#ifndef QT_OPENGL_ES
glBegin(GL_QUADS);
glVertex2f(min_x, min_y);
@@ -2056,24 +2058,6 @@ void QOpenGLPaintEnginePrivate::fillVertexArray(Qt::FillRule fillRule)
#endif
}
- glStencilMask(~0);
- glStencilFunc(GL_ALWAYS, 0, 0);
- glStencilOp(GL_ZERO, GL_ZERO, GL_ZERO);
-
- // clear all stencil values to 0
- glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
-
-#ifndef QT_OPENGL_ES
- glBegin(GL_QUADS);
- glVertex2f(min_x, min_y);
- glVertex2f(max_x, min_y);
- glVertex2f(max_x, max_y);
- glVertex2f(min_x, max_y);
- glEnd();
-#endif
-
- glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
-
// Disable stencil writes.
glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP);
glStencilMask(0);
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/imageformats/tiff/qtiffhandler.cpp b/src/plugins/imageformats/tiff/qtiffhandler.cpp
index 518e6d1..77dfeb3 100644
--- a/src/plugins/imageformats/tiff/qtiffhandler.cpp
+++ b/src/plugins/imageformats/tiff/qtiffhandler.cpp
@@ -168,7 +168,7 @@ bool QTiffHandler::read(QImage *image)
break;
default:
// do nothing as defaults have already
- // been set within the QImage class
+ // been set within the QImage class
break;
}
for (uint32 y=0; y<height; ++y)
@@ -218,6 +218,24 @@ bool QTiffHandler::write(const QImage &image)
return false;
}
+ // set the resolution
+ bool resolutionSet = false;
+ const int dotPerMeterX = image.dotsPerMeterX();
+ const int dotPerMeterY = image.dotsPerMeterY();
+ if ((dotPerMeterX % 100) == 0
+ && (dotPerMeterY % 100) == 0) {
+ resolutionSet = TIFFSetField(tiff, TIFFTAG_RESOLUTIONUNIT, RESUNIT_CENTIMETER)
+ && TIFFSetField(tiff, TIFFTAG_XRESOLUTION, dotPerMeterX/100.0)
+ && TIFFSetField(tiff, TIFFTAG_YRESOLUTION, dotPerMeterY/100.0);
+ } else {
+ resolutionSet = TIFFSetField(tiff, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH)
+ && TIFFSetField(tiff, TIFFTAG_XRESOLUTION, static_cast<float>(image.logicalDpiX()))
+ && TIFFSetField(tiff, TIFFTAG_YRESOLUTION, static_cast<float>(image.logicalDpiY()));
+ }
+ if (!resolutionSet) {
+ TIFFClose(tiff);
+ return false;
+ }
// try to do the ARGB32 conversion in chunks no greater than 16 MB
int chunks = (width * height * 4 / (1024 * 1024 * 16)) + 1;
int chunkHeight = qMax(height / chunks, 1);
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/script/qscriptengine_p.cpp b/src/script/qscriptengine_p.cpp
index a2e58de..84a420d 100644
--- a/src/script/qscriptengine_p.cpp
+++ b/src/script/qscriptengine_p.cpp
@@ -1662,6 +1662,11 @@ bool QScriptEnginePrivate::convert(const QScriptValueImpl &value,
return false;
}
+QScriptEngine::DemarshalFunction QScriptEnginePrivate::demarshalFunction(int type) const
+{
+ return m_customTypes.value(type).demarshal;
+}
+
QScriptValuePrivate *QScriptEnginePrivate::registerValue(const QScriptValueImpl &value)
{
if (value.isString()) {
diff --git a/src/script/qscriptenginefwd_p.h b/src/script/qscriptenginefwd_p.h
index 2ea66c5..855317c 100644
--- a/src/script/qscriptenginefwd_p.h
+++ b/src/script/qscriptenginefwd_p.h
@@ -350,6 +350,7 @@ public:
QScriptValueImpl create(int type, const void *ptr);
static bool convert(const QScriptValueImpl &value, int type, void *ptr,
QScriptEnginePrivate *eng);
+ QScriptEngine::DemarshalFunction demarshalFunction(int type) const;
QScriptValueImpl arrayFromStringList(const QStringList &lst);
static QStringList stringListFromArray(const QScriptValueImpl &arr);
diff --git a/src/script/qscriptextqobject.cpp b/src/script/qscriptextqobject.cpp
index d18c3da..4522807 100644
--- a/src/script/qscriptextqobject.cpp
+++ b/src/script/qscriptextqobject.cpp
@@ -425,7 +425,7 @@ static void callQtMethod(QScriptContextPrivate *context, QMetaMethod::MethodType
matchDistance += 10;
}
}
- } else if (actual.isNumber()) {
+ } else if (actual.isNumber() || actual.isString()) {
// see if it's an enum value
QMetaEnum m;
if (argType.isMetaEnum()) {
@@ -436,11 +436,21 @@ static void callQtMethod(QScriptContextPrivate *context, QMetaMethod::MethodType
m = meta->enumerator(mi);
}
if (m.isValid()) {
- int ival = actual.toInt32();
- if (m.valueToKey(ival) != 0) {
- qVariantSetValue(v, ival);
- converted = true;
- matchDistance += 10;
+ if (actual.isNumber()) {
+ int ival = actual.toInt32();
+ if (m.valueToKey(ival) != 0) {
+ qVariantSetValue(v, ival);
+ converted = true;
+ matchDistance += 10;
+ }
+ } else {
+ QString sval = actual.toString();
+ int ival = m.keyToValue(sval.toLatin1());
+ if (ival != -1) {
+ qVariantSetValue(v, ival);
+ converted = true;
+ matchDistance += 10;
+ }
}
}
}
@@ -1809,7 +1819,16 @@ void QScript::QtPropertyFunction::execute(QScriptContextPrivate *context)
}
} else {
// set
- QVariant v = variantFromValue(eng_p, prop.userType(), context->argument(0));
+ QScriptValueImpl arg = context->argument(0);
+ QVariant v;
+ if (prop.isEnumType() && arg.isString()
+ && !eng_p->demarshalFunction(prop.userType())) {
+ // give QMetaProperty::write() a chance to convert from
+ // string to enum value
+ v = arg.toString();
+ } else {
+ v = variantFromValue(eng_p, prop.userType(), arg);
+ }
QScriptable *scriptable = scriptableFromQObject(qobject);
QScriptEngine *oldEngine = 0;
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 fbefa0c..51fc306 100644
--- a/src/sql/drivers/mysql/qsql_mysql.cpp
+++ b/src/sql/drivers/mysql/qsql_mysql.cpp
@@ -1279,6 +1279,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;
@@ -1287,6 +1292,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);
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/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp
index cb07c53..c5026b8 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/qtestcase.cpp b/src/testlib/qtestcase.cpp
index 8c76c5d..041f2db 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -1465,8 +1465,12 @@ int QTest::qExec(QObject *testObject, int argc, char **argv)
#if !defined(QT_NO_PROCESS) || !defined(QT_NO_SETTINGS)
if (QBenchmarkGlobalData::current->createChart) {
- QString chartLocation = QLibraryInfo::location(QLibraryInfo::BinariesPath)
- + QLatin1String("/../tools/qtestlib/chart/chart");
+ QString chartLocation = QLibraryInfo::location(QLibraryInfo::BinariesPath);
+#ifdef Q_OS_WIN
+ chartLocation += QLatin1String("/../tools/qtestlib/chart/release/chart.exe");
+#else
+ chartLocation += QLatin1String("/../tools/qtestlib/chart/chart");
+#endif
if (QFile::exists(chartLocation)) {
QProcess p;
p.setProcessChannelMode(QProcess::ForwardedChannels);
diff --git a/src/testlib/qtestlogger.cpp b/src/testlib/qtestlogger.cpp
index 2249e8a..46af232 100644
--- a/src/testlib/qtestlogger.cpp
+++ b/src/testlib/qtestlogger.cpp
@@ -180,7 +180,7 @@ void QTestLogger::addIncident(IncidentTypes type, const char *description,
switch (type) {
case QAbstractTestLogger::XPass:
- ++passCounter;
+ ++failureCounter;
typeBuf = "xpass";
break;
case QAbstractTestLogger::Pass:
@@ -188,7 +188,7 @@ void QTestLogger::addIncident(IncidentTypes type, const char *description,
typeBuf = "pass";
break;
case QAbstractTestLogger::XFail:
- ++failureCounter;
+ ++passCounter;
typeBuf = "xfail";
break;
case QAbstractTestLogger::Fail:
@@ -200,7 +200,8 @@ void QTestLogger::addIncident(IncidentTypes type, const char *description,
break;
}
- if (type == QAbstractTestLogger::Fail || type == QAbstractTestLogger::XFail) {
+ if (type == QAbstractTestLogger::Fail || type == QAbstractTestLogger::XPass
+ || ((format != TLF_XunitXml) && (type == QAbstractTestLogger::XFail))) {
QTestElement *failureElement = new QTestElement(QTest::LET_Failure);
failureElement->addAttribute(QTest::AI_Result, typeBuf);
if(file)
@@ -230,10 +231,10 @@ void QTestLogger::addIncident(IncidentTypes type, const char *description,
if (!strcmp(oldResult, "pass")) {
overwrite = true;
}
- else if (!strcmp(oldResult, "xpass")) {
- overwrite = (type == QAbstractTestLogger::XFail || type == QAbstractTestLogger::Fail);
- }
else if (!strcmp(oldResult, "xfail")) {
+ overwrite = (type == QAbstractTestLogger::XPass || type == QAbstractTestLogger::Fail);
+ }
+ else if (!strcmp(oldResult, "xpass")) {
overwrite = (type == QAbstractTestLogger::Fail);
}
if (overwrite) {
@@ -251,6 +252,14 @@ void QTestLogger::addIncident(IncidentTypes type, const char *description,
QTest::qt_snprintf(buf, sizeof(buf), "%i", line);
currentLogElement->addAttribute(QTest::AI_Line, buf);
+
+ /*
+ Since XFAIL does not add a failure to the testlog in xunitxml, add a message, so we still
+ have some information about the expected failure.
+ */
+ if (format == TLF_XunitXml && type == QAbstractTestLogger::XFail) {
+ QTestLogger::addMessage(QAbstractTestLogger::Info, description, file, line);
+ }
}
void QTestLogger::addBenchmarkResult(const QBenchmarkResult &result)
diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp
index c78d4ba..ade0339 100644
--- a/src/xml/sax/qxml.cpp
+++ b/src/xml/sax/qxml.cpp
@@ -2107,7 +2107,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/auto.pro b/tests/auto/auto.pro
index a3a6916..714e19d 100644
--- a/tests/auto/auto.pro
+++ b/tests/auto/auto.pro
@@ -209,6 +209,7 @@ SUBDIRS += bic \
qnumeric \
qobject \
qobjectrace \
+ qcontiguouscache \
qpaintengine \
qpainter \
qpainterpath \
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 b2a449a..5a2f9c3 100644
--- a/tests/auto/network-settings.h
+++ b/tests/auto/network-settings.h
@@ -39,6 +39,7 @@
**
****************************************************************************/
#include <QString>
+#include <QtNetwork/QHostInfo>
class QtNetworkSettings
{
@@ -63,4 +64,12 @@ public:
{
return "qt-test-server.wildcard.dev." + serverDomainName();
}
+
+#ifdef QT_NETWORK_LIB
+ static QHostAddress serverIP()
+ {
+ return QHostInfo::fromName(serverName()).addresses().first();
+ }
+#endif
+
};
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 67a822f..617832b 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 6a87e3c..2fff6d0 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 );
@@ -2206,5 +2209,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/qcontiguouscache/qcontiguouscache.pro b/tests/auto/qcontiguouscache/qcontiguouscache.pro
new file mode 100644
index 0000000..618efed
--- /dev/null
+++ b/tests/auto/qcontiguouscache/qcontiguouscache.pro
@@ -0,0 +1,8 @@
+load(qttest_p4)
+
+QT = core
+
+SOURCES += tst_qcontiguouscache.cpp
+
+
+
diff --git a/tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp b/tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp
new file mode 100644
index 0000000..6d59390
--- /dev/null
+++ b/tests/auto/qcontiguouscache/tst_qcontiguouscache.cpp
@@ -0,0 +1,479 @@
+/****************************************************************************
+**
+** 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 <QObject>
+#include <QTest>
+#include <QCache>
+#include <QContiguousCache>
+
+#include <QDebug>
+#include <stdio.h>
+
+class tst_QContiguousCache : public QObject
+{
+ Q_OBJECT
+public:
+ tst_QContiguousCache() {}
+ virtual ~tst_QContiguousCache() {}
+private slots:
+ void empty();
+ void append_data();
+ void append();
+
+ void prepend_data();
+ void prepend();
+
+ void asScrollingList();
+
+ void complexType();
+
+ void operatorAt();
+
+ void cacheBenchmark();
+ void contiguousCacheBenchmark();
+
+ void setCapacity();
+};
+
+QTEST_MAIN(tst_QContiguousCache)
+
+void tst_QContiguousCache::empty()
+{
+ QContiguousCache<int> c(10);
+ QCOMPARE(c.capacity(), 10);
+ QCOMPARE(c.count(), 0);
+ QVERIFY(c.isEmpty());
+ c.append(1);
+ QCOMPARE(c.count(), 1);
+ QVERIFY(!c.isEmpty());
+ c.clear();
+ QCOMPARE(c.capacity(), 10);
+ QCOMPARE(c.count(), 0);
+ QVERIFY(c.isEmpty());
+ c.prepend(1);
+ QCOMPARE(c.count(), 1);
+ QVERIFY(!c.isEmpty());
+ c.clear();
+ QCOMPARE(c.count(), 0);
+ QVERIFY(c.isEmpty());
+ QCOMPARE(c.capacity(), 10);
+}
+
+void tst_QContiguousCache::append_data()
+{
+ QTest::addColumn<int>("start");
+ QTest::addColumn<int>("count");
+ QTest::addColumn<int>("cacheSize");
+ QTest::addColumn<bool>("invalidIndexes");
+
+ QTest::newRow("0+30[10]") << 0 << 30 << 10 << false;
+ QTest::newRow("300+30[10]") << 300 << 30 << 10 << false;
+ QTest::newRow("MAX-10+30[10]") << INT_MAX-10 << 30 << 10 << true;
+}
+
+void tst_QContiguousCache::append()
+{
+ QFETCH(int, start);
+ QFETCH(int, count);
+ QFETCH(int, cacheSize);
+ QFETCH(bool, invalidIndexes);
+
+ int i, j;
+ QContiguousCache<int> c(cacheSize);
+
+ i = 1;
+ QCOMPARE(c.available(), cacheSize);
+ if (start == 0)
+ c.append(i++);
+ else
+ c.insert(start, i++);
+ while (i < count) {
+ c.append(i);
+ QCOMPARE(c.available(), qMax(0, cacheSize - i));
+ QCOMPARE(c.first(), qMax(1, i-cacheSize+1));
+ QCOMPARE(c.last(), i);
+ QCOMPARE(c.count(), qMin(i, cacheSize));
+ QCOMPARE(c.isFull(), i >= cacheSize);
+ i++;
+ }
+
+ QCOMPARE(c.areIndexesValid(), !invalidIndexes);
+ if (invalidIndexes)
+ c.normalizeIndexes();
+ QVERIFY(c.areIndexesValid());
+
+ // test taking from end until empty.
+ for (j = 0; j < cacheSize; j++, i--) {
+ QCOMPARE(c.takeLast(), i-1);
+ QCOMPARE(c.count(), cacheSize-j-1);
+ QCOMPARE(c.available(), j+1);
+ QVERIFY(!c.isFull());
+ QCOMPARE(c.isEmpty(), j==cacheSize-1);
+ }
+
+}
+
+void tst_QContiguousCache::prepend_data()
+{
+ QTest::addColumn<int>("start");
+ QTest::addColumn<int>("count");
+ QTest::addColumn<int>("cacheSize");
+ QTest::addColumn<bool>("invalidIndexes");
+
+ QTest::newRow("30-30[10]") << 30 << 30 << 10 << false;
+ QTest::newRow("300-30[10]") << 300 << 30 << 10 << false;
+ QTest::newRow("10-30[10]") << 10 << 30 << 10 << true;
+}
+
+void tst_QContiguousCache::prepend()
+{
+ QFETCH(int, start);
+ QFETCH(int, count);
+ QFETCH(int, cacheSize);
+ QFETCH(bool, invalidIndexes);
+
+ int i, j;
+ QContiguousCache<int> c(cacheSize);
+
+ i = 1;
+ QCOMPARE(c.available(), cacheSize);
+ c.insert(start, i++);
+ while(i < count) {
+ c.prepend(i);
+ QCOMPARE(c.available(), qMax(0, cacheSize - i));
+ QCOMPARE(c.last(), qMax(1, i-cacheSize+1));
+ QCOMPARE(c.first(), i);
+ QCOMPARE(c.count(), qMin(i, cacheSize));
+ QCOMPARE(c.isFull(), i >= cacheSize);
+ i++;
+ }
+
+ QCOMPARE(c.areIndexesValid(), !invalidIndexes);
+ if (invalidIndexes)
+ c.normalizeIndexes();
+ QVERIFY(c.areIndexesValid());
+
+ // test taking from start until empty.
+ for (j = 0; j < cacheSize; j++, i--) {
+ QCOMPARE(c.takeFirst(), i-1);
+ QCOMPARE(c.count(), cacheSize-j-1);
+ QCOMPARE(c.available(), j+1);
+ QVERIFY(!c.isFull());
+ QCOMPARE(c.isEmpty(), j==cacheSize-1);
+ }
+}
+
+void tst_QContiguousCache::asScrollingList()
+{
+ int i;
+ QContiguousCache<int> c(10);
+
+ // Once allocated QContiguousCache should not
+ // allocate any additional memory for non
+ // complex data types.
+ QBENCHMARK {
+ // simulate scrolling in a list of items;
+ for(i = 0; i < 10; ++i) {
+ QCOMPARE(c.available(), 10-i);
+ c.append(i);
+ }
+
+ QCOMPARE(c.firstIndex(), 0);
+ QCOMPARE(c.lastIndex(), 9);
+ QCOMPARE(c.first(), 0);
+ QCOMPARE(c.last(), 9);
+ QVERIFY(!c.containsIndex(-1));
+ QVERIFY(!c.containsIndex(10));
+ QCOMPARE(c.available(), 0);
+
+ for (i = 0; i < 10; ++i) {
+ QVERIFY(c.containsIndex(i));
+ QCOMPARE(c.at(i), i);
+ QCOMPARE(c[i], i);
+ QCOMPARE(((const QContiguousCache<int>)c)[i], i);
+ }
+
+ for (i = 10; i < 30; ++i)
+ c.append(i);
+
+ QCOMPARE(c.firstIndex(), 20);
+ QCOMPARE(c.lastIndex(), 29);
+ QCOMPARE(c.first(), 20);
+ QCOMPARE(c.last(), 29);
+ QVERIFY(!c.containsIndex(19));
+ QVERIFY(!c.containsIndex(30));
+ QCOMPARE(c.available(), 0);
+
+ for (i = 20; i < 30; ++i) {
+ QVERIFY(c.containsIndex(i));
+ QCOMPARE(c.at(i), i);
+ QCOMPARE(c[i], i);
+ QCOMPARE(((const QContiguousCache<int> )c)[i], i);
+ }
+
+ for (i = 19; i >= 10; --i)
+ c.prepend(i);
+
+ QCOMPARE(c.firstIndex(), 10);
+ QCOMPARE(c.lastIndex(), 19);
+ QCOMPARE(c.first(), 10);
+ QCOMPARE(c.last(), 19);
+ QVERIFY(!c.containsIndex(9));
+ QVERIFY(!c.containsIndex(20));
+ QCOMPARE(c.available(), 0);
+
+ for (i = 10; i < 20; ++i) {
+ QVERIFY(c.containsIndex(i));
+ QCOMPARE(c.at(i), i);
+ QCOMPARE(c[i], i);
+ QCOMPARE(((const QContiguousCache<int> )c)[i], i);
+ }
+
+ for (i = 200; i < 220; ++i)
+ c.insert(i, i);
+
+ QCOMPARE(c.firstIndex(), 210);
+ QCOMPARE(c.lastIndex(), 219);
+ QCOMPARE(c.first(), 210);
+ QCOMPARE(c.last(), 219);
+ QVERIFY(!c.containsIndex(209));
+ QVERIFY(!c.containsIndex(300));
+ QCOMPARE(c.available(), 0);
+
+ for (i = 210; i < 220; ++i) {
+ QVERIFY(c.containsIndex(i));
+ QCOMPARE(c.at(i), i);
+ QCOMPARE(c[i], i);
+ QCOMPARE(((const QContiguousCache<int> )c)[i], i);
+ }
+ c.clear(); // needed to reset benchmark
+ }
+
+ // from a specific bug that was encountered. 100 to 299 cached, attempted to cache 250 - 205 via insert, failed.
+ // bug was that item at 150 would instead be item that should have been inserted at 250
+ c.setCapacity(200);
+ for(i = 100; i < 300; ++i)
+ c.insert(i, i);
+ for (i = 250; i <= 306; ++i)
+ c.insert(i, 1000+i);
+ for (i = 107; i <= 306; ++i) {
+ QVERIFY(c.containsIndex(i));
+ QCOMPARE(c.at(i), i < 250 ? i : 1000+i);
+ }
+}
+
+struct RefCountingClassData
+{
+ QBasicAtomicInt ref;
+ static RefCountingClassData shared_null;
+};
+
+RefCountingClassData RefCountingClassData::shared_null = {
+ Q_BASIC_ATOMIC_INITIALIZER(1)
+};
+
+class RefCountingClass
+{
+public:
+ RefCountingClass() : d(&RefCountingClassData::shared_null) { d->ref.ref(); }
+
+ RefCountingClass(const RefCountingClass &other)
+ {
+ d = other.d;
+ d->ref.ref();
+ }
+
+ ~RefCountingClass()
+ {
+ if (!d->ref.deref())
+ delete d;
+ }
+
+ RefCountingClass &operator=(const RefCountingClass &other)
+ {
+ if (!d->ref.deref())
+ delete d;
+ d = other.d;
+ d->ref.ref();
+ return *this;
+ }
+
+ int refCount() const { return d->ref; }
+private:
+ RefCountingClassData *d;
+};
+
+void tst_QContiguousCache::complexType()
+{
+ RefCountingClass original;
+
+ QContiguousCache<RefCountingClass> contiguousCache(10);
+ contiguousCache.append(original);
+ QCOMPARE(original.refCount(), 3);
+ contiguousCache.removeFirst();
+ QCOMPARE(original.refCount(), 2); // shared null, 'original'.
+ contiguousCache.append(original);
+ QCOMPARE(original.refCount(), 3);
+ contiguousCache.clear();
+ QCOMPARE(original.refCount(), 2);
+
+ for(int i = 0; i < 100; ++i)
+ contiguousCache.insert(i, original);
+
+ QCOMPARE(original.refCount(), 12); // shared null, 'original', + 10 in contiguousCache.
+
+ contiguousCache.clear();
+ QCOMPARE(original.refCount(), 2);
+ for (int i = 0; i < 100; i++)
+ contiguousCache.append(original);
+
+ QCOMPARE(original.refCount(), 12); // shared null, 'original', + 10 in contiguousCache.
+ contiguousCache.clear();
+ QCOMPARE(original.refCount(), 2);
+
+ for (int i = 0; i < 100; i++)
+ contiguousCache.prepend(original);
+
+ QCOMPARE(original.refCount(), 12); // shared null, 'original', + 10 in contiguousCache.
+ contiguousCache.clear();
+ QCOMPARE(original.refCount(), 2);
+
+ for (int i = 0; i < 100; i++)
+ contiguousCache.append(original);
+
+ contiguousCache.takeLast();
+ QCOMPARE(original.refCount(), 11);
+
+ contiguousCache.takeFirst();
+ QCOMPARE(original.refCount(), 10);
+}
+
+void tst_QContiguousCache::operatorAt()
+{
+ RefCountingClass original;
+ QContiguousCache<RefCountingClass> contiguousCache(10);
+
+ for (int i = 25; i < 35; ++i)
+ contiguousCache[i] = original;
+
+ QCOMPARE(original.refCount(), 12); // shared null, orig, items in cache
+
+ // verify const access does not copy items.
+ const QContiguousCache<RefCountingClass> copy(contiguousCache);
+ for (int i = 25; i < 35; ++i)
+ QCOMPARE(copy[i].refCount(), 12);
+
+ // verify modifying the original increments ref count (e.g. does a detach)
+ contiguousCache[25] = original;
+ QCOMPARE(original.refCount(), 22);
+}
+
+/*
+ Benchmarks must be near identical in tasks to be fair.
+ QCache uses pointers to ints as its a requirement of QCache,
+ whereas QContiguousCache doesn't support pointers (won't free them).
+ Given the ability to use simple data types is a benefit, its
+ fair. Although this obviously must take into account we are
+ testing QContiguousCache use cases here, QCache has its own
+ areas where it is the more sensible class to use.
+*/
+void tst_QContiguousCache::cacheBenchmark()
+{
+ QBENCHMARK {
+ QCache<int, int> cache;
+ cache.setMaxCost(100);
+
+ for (int i = 0; i < 1000; i++)
+ cache.insert(i, new int(i));
+ }
+}
+
+void tst_QContiguousCache::contiguousCacheBenchmark()
+{
+ QBENCHMARK {
+ QContiguousCache<int> contiguousCache(100);
+ for (int i = 0; i < 1000; i++)
+ contiguousCache.insert(i, i);
+ }
+}
+
+void tst_QContiguousCache::setCapacity()
+{
+ int i;
+ QContiguousCache<int> contiguousCache(100);
+ for (i = 280; i < 310; ++i)
+ contiguousCache.insert(i, i);
+ QCOMPARE(contiguousCache.capacity(), 100);
+ QCOMPARE(contiguousCache.count(), 30);
+ QCOMPARE(contiguousCache.firstIndex(), 280);
+ QCOMPARE(contiguousCache.lastIndex(), 309);
+
+ for (i = contiguousCache.firstIndex(); i <= contiguousCache.lastIndex(); ++i) {
+ QVERIFY(contiguousCache.containsIndex(i));
+ QCOMPARE(contiguousCache.at(i), i);
+ }
+
+ contiguousCache.setCapacity(150);
+
+ QCOMPARE(contiguousCache.capacity(), 150);
+ QCOMPARE(contiguousCache.count(), 30);
+ QCOMPARE(contiguousCache.firstIndex(), 280);
+ QCOMPARE(contiguousCache.lastIndex(), 309);
+
+ for (i = contiguousCache.firstIndex(); i <= contiguousCache.lastIndex(); ++i) {
+ QVERIFY(contiguousCache.containsIndex(i));
+ QCOMPARE(contiguousCache.at(i), i);
+ }
+
+ contiguousCache.setCapacity(20);
+
+ QCOMPARE(contiguousCache.capacity(), 20);
+ QCOMPARE(contiguousCache.count(), 20);
+ QCOMPARE(contiguousCache.firstIndex(), 290);
+ QCOMPARE(contiguousCache.lastIndex(), 309);
+
+ for (i = contiguousCache.firstIndex(); i <= contiguousCache.lastIndex(); ++i) {
+ QVERIFY(contiguousCache.containsIndex(i));
+ QCOMPARE(contiguousCache.at(i), i);
+ }
+}
+
+#include "tst_qcontiguouscache.moc"
diff --git a/tests/auto/qcssparser/tst_cssparser.cpp b/tests/auto/qcssparser/tst_cssparser.cpp
index ab6bad6..7c4fac1 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/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 3b9895d..b3ae60a 100644
--- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
+++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp
@@ -217,6 +217,8 @@ private slots:
void tabChangesFocus_data();
void cacheMode();
void updateCachedItemAfterMove();
+ void deviceTransform_data();
+ void deviceTransform();
// task specific tests below me
void task141694_textItemEnsureVisible();
@@ -245,50 +247,59 @@ void tst_QGraphicsItem::construction()
QCOMPARE(int(item->type()), int(QGraphicsEllipseItem::Type));
QCOMPARE(qgraphicsitem_cast<QGraphicsEllipseItem *>(item), (QGraphicsEllipseItem *)item);
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), (QGraphicsRectItem *)0);
+ QCOMPARE(item->flags(), 0);
break;
case 1:
item = new QGraphicsLineItem;
QCOMPARE(int(item->type()), int(QGraphicsLineItem::Type));
QCOMPARE(qgraphicsitem_cast<QGraphicsLineItem *>(item), (QGraphicsLineItem *)item);
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), (QGraphicsRectItem *)0);
+ QCOMPARE(item->flags(), 0);
break;
case 2:
item = new QGraphicsPathItem;
QCOMPARE(int(item->type()), int(QGraphicsPathItem::Type));
QCOMPARE(qgraphicsitem_cast<QGraphicsPathItem *>(item), (QGraphicsPathItem *)item);
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), (QGraphicsRectItem *)0);
+ QCOMPARE(item->flags(), 0);
break;
case 3:
item = new QGraphicsPixmapItem;
QCOMPARE(int(item->type()), int(QGraphicsPixmapItem::Type));
QCOMPARE(qgraphicsitem_cast<QGraphicsPixmapItem *>(item), (QGraphicsPixmapItem *)item);
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), (QGraphicsRectItem *)0);
+ QCOMPARE(item->flags(), 0);
break;
case 4:
item = new QGraphicsPolygonItem;
QCOMPARE(int(item->type()), int(QGraphicsPolygonItem::Type));
QCOMPARE(qgraphicsitem_cast<QGraphicsPolygonItem *>(item), (QGraphicsPolygonItem *)item);
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), (QGraphicsRectItem *)0);
+ QCOMPARE(item->flags(), 0);
break;
case 5:
item = new QGraphicsRectItem;
QCOMPARE(int(item->type()), int(QGraphicsRectItem::Type));
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), (QGraphicsRectItem *)item);
QCOMPARE(qgraphicsitem_cast<QGraphicsLineItem *>(item), (QGraphicsLineItem *)0);
+ QCOMPARE(item->flags(), 0);
break;
case 6:
- default:
item = new QGraphicsTextItem;
QCOMPARE(int(item->type()), int(QGraphicsTextItem::Type));
QCOMPARE(qgraphicsitem_cast<QGraphicsTextItem *>(item), (QGraphicsTextItem *)item);
QCOMPARE(qgraphicsitem_cast<QGraphicsRectItem *>(item), (QGraphicsRectItem *)0);
+ // This is the only item that uses an extended style option.
+ QCOMPARE(item->flags(), QGraphicsItem::GraphicsItemFlags(QGraphicsItem::ItemUsesExtendedStyleOption));
+ break;
+ default:
+ qFatal("You broke the logic, please fix!");
break;
}
QCOMPARE(item->scene(), (QGraphicsScene *)0);
QCOMPARE(item->parentItem(), (QGraphicsItem *)0);
QVERIFY(item->children().isEmpty());
- QCOMPARE(item->flags(), 0);
QVERIFY(item->isVisible());
QVERIFY(item->isEnabled());
QVERIFY(!item->isSelected());
@@ -6271,5 +6282,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 da99c30..0c5ebf6 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>
@@ -3537,8 +3538,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 920cba7..8e490ad 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -2371,7 +2371,7 @@ public:
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *viewport)
{
- lastLod = option->levelOfDetail;
+ lastLod = option->levelOfDetailFromTransform(painter->worldTransform());
QGraphicsRectItem::paint(painter, option, viewport);
}
diff --git a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
index 343aac6..a23ada9 100644
--- a/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
+++ b/tests/auto/qgraphicswidget/tst_qgraphicswidget.cpp
@@ -149,6 +149,7 @@ private slots:
void defaultSize();
void explicitMouseGrabber();
void implicitMouseGrabber();
+ void doubleClickAfterExplicitMouseGrab();
void popupMouseGrabber();
void windowFlags_data();
void windowFlags();
@@ -1998,6 +1999,104 @@ void tst_QGraphicsWidget::implicitMouseGrabber()
QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)0);
}
+class GrabOnPressItem : public QGraphicsRectItem
+{
+public:
+ GrabOnPressItem(const QRectF &rect)
+ : QGraphicsRectItem(rect),
+ npress(0), nrelease(0), ndoubleClick(0),
+ ngrab(0), nungrab(0)
+ {
+ }
+ int npress;
+ int nrelease;
+ int ndoubleClick;
+ int ngrab;
+ int nungrab;
+protected:
+ bool sceneEvent(QEvent *event)
+ {
+ switch (event->type()) {
+ case QEvent::GrabMouse:
+ ++ngrab;
+ break;
+ case QEvent::UngrabMouse:
+ ++nungrab;
+ break;
+ default:
+ break;
+ }
+ return QGraphicsRectItem::sceneEvent(event);
+ }
+
+ void mousePressEvent(QGraphicsSceneMouseEvent *)
+ {
+ grabMouse();
+ ++npress;
+ }
+ void mouseReleaseEvent(QGraphicsSceneMouseEvent *)
+ {
+ ungrabMouse();
+ ++nrelease;
+ }
+ void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *)
+ {
+ ++ndoubleClick;
+ }
+};
+
+void tst_QGraphicsWidget::doubleClickAfterExplicitMouseGrab()
+{
+ QGraphicsScene scene;
+ GrabOnPressItem *item = new GrabOnPressItem(QRectF(0, 0, 100, 100));
+ scene.addItem(item);
+
+ {
+ QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMousePress);
+ event.setButton(Qt::LeftButton);
+ event.setButtons(Qt::LeftButton);
+ event.ignore();
+ event.setScenePos(QPointF(50, 50));
+ qApp->sendEvent(&scene, &event);
+ }
+ QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)item);
+ QCOMPARE(item->npress, 1);
+ QCOMPARE(item->ngrab, 1);
+ {
+ QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseRelease);
+ event.setButton(Qt::LeftButton);
+ event.setButtons(0);
+ event.ignore();
+ event.setScenePos(QPointF(50, 50));
+ qApp->sendEvent(&scene, &event);
+ }
+ QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)0);
+ QCOMPARE(item->nrelease, 1);
+ QCOMPARE(item->nungrab, 1);
+ {
+ QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseDoubleClick);
+ event.setButton(Qt::LeftButton);
+ event.setButtons(Qt::LeftButton);
+ event.ignore();
+ event.setScenePos(QPointF(50, 50));
+ qApp->sendEvent(&scene, &event);
+ }
+ QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)item);
+ QCOMPARE(item->ndoubleClick, 1);
+ QCOMPARE(item->ngrab, 2);
+ {
+ QGraphicsSceneMouseEvent event(QEvent::GraphicsSceneMouseRelease);
+ event.setButton(Qt::LeftButton);
+ event.setButtons(0);
+ event.ignore();
+ event.setScenePos(QPointF(50, 50));
+ qApp->sendEvent(&scene, &event);
+ }
+ QCOMPARE(scene.mouseGrabberItem(), (QGraphicsItem *)0);
+ QCOMPARE(item->nrelease, 2);
+ QCOMPARE(item->nungrab, 2);
+}
+
void tst_QGraphicsWidget::popupMouseGrabber()
{
QGraphicsScene scene;
diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
index b22397f..eb30147 100644
--- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
+++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp
@@ -42,6 +42,7 @@
#include <QtTest/QtTest>
#include "private/qhttpnetworkconnection_p.h"
+#include "private/qnoncontiguousbytedevice_p.h"
#include <QAuthenticator>
#include "../network-settings.h"
@@ -303,8 +304,8 @@ void tst_QHttpNetworkConnection::put()
QHttpNetworkRequest request(protocol + host + path, QHttpNetworkRequest::Put);
QByteArray array = data.toLatin1();
- QBuffer buffer(&array);
- request.setData(&buffer);
+ QNonContiguousByteDevice *bd = QNonContiguousByteDeviceFactory::create(&array);
+ request.setUploadByteDevice(bd);
finishedCalled = false;
finishedWithErrorCalled = false;
@@ -393,8 +394,8 @@ void tst_QHttpNetworkConnection::post()
QHttpNetworkRequest request(protocol + host + path, QHttpNetworkRequest::Post);
QByteArray array = data.toLatin1();
- QBuffer buffer(&array);
- request.setData(&buffer);
+ QNonContiguousByteDevice *bd = QNonContiguousByteDeviceFactory::create(&array);
+ request.setUploadByteDevice(bd);
QHttpNetworkReply *reply = connection.sendRequest(request);
diff --git a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
index 9ef8f9a..7eaf7c7 100644
--- a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
+++ b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp
@@ -137,8 +137,6 @@ public slots:
}
};
-static const char *IMAP_IP = "62.70.27.18";
-
tst_QHttpSocketEngine::tst_QHttpSocketEngine()
{
}
@@ -307,12 +305,11 @@ void tst_QHttpSocketEngine::simpleConnectToIMAP()
socketDevice.setProxy(QNetworkProxy(QNetworkProxy::HttpProxy, QtNetworkSettings::serverName(), 3128));
- // Connect to imap.trolltech.com's IP
- QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143));
+ QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143));
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
QVERIFY(socketDevice.waitForWrite());
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState);
- QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP));
+ QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP());
QVERIFY(!socketDevice.localAddress().isNull());
QVERIFY(socketDevice.localPort() > 0);
@@ -328,7 +325,7 @@ void tst_QHttpSocketEngine::simpleConnectToIMAP()
// Check that the greeting is what we expect it to be
QCOMPARE(array.constData(),
- "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n");
+ "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
// Write a logout message
QByteArray array2 = "XXXX LOGOUT\r\n";
@@ -369,7 +366,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 {
@@ -451,14 +447,14 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest()
QTcpSocket socket;
// Connect
- socket.connectToHost("imap.troll.no", 143);
+ socket.connectToHost(QtNetworkSettings::serverName(), 143);
QVERIFY(socket.waitForConnected());
QCOMPARE(socket.state(), QTcpSocket::ConnectedState);
// Read greeting
QVERIFY(socket.waitForReadyRead(5000));
QString s = socket.readLine();
- QCOMPARE(s.toLatin1().constData(), "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n");
+ QCOMPARE(s.toLatin1().constData(), "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
// Write NOOP
QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8);
@@ -508,7 +504,7 @@ void tst_QHttpSocketEngine::tcpSocketNonBlockingTest()
tcpSocketNonBlocking_socket = &socket;
// Connect
- socket.connectToHost("imap.troll.no", 143);
+ socket.connectToHost(QtNetworkSettings::serverName(), 143);
QCOMPARE(socket.state(), QTcpSocket::HostLookupState);
QTestEventLoop::instance().enterLoop(30);
@@ -533,7 +529,7 @@ void tst_QHttpSocketEngine::tcpSocketNonBlockingTest()
// Read greeting
QVERIFY(!tcpSocketNonBlocking_data.isEmpty());
QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(),
- "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n");
+ "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
tcpSocketNonBlocking_data.clear();
tcpSocketNonBlocking_totalWritten = 0;
@@ -696,12 +692,11 @@ 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(IMAP_IP), 143));
+ QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143));
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
QVERIFY(socketDevice.waitForWrite());
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState);
- QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP));
+ QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP());
// Wait for the greeting
QVERIFY(socketDevice.waitForRead());
@@ -715,7 +710,7 @@ void tst_QHttpSocketEngine::passwordAuth()
// Check that the greeting is what we expect it to be
QCOMPARE(array.constData(),
- "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n");
+ "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
// Write a logout message
QByteArray array2 = "XXXX LOGOUT\r\n";
diff --git a/tests/auto/qimage/images/image.tif b/tests/auto/qimage/images/image.tif
new file mode 100644
index 0000000..ee0637c
--- /dev/null
+++ b/tests/auto/qimage/images/image.tif
Binary files differ
diff --git a/tests/auto/qimage/tst_qimage.cpp b/tests/auto/qimage/tst_qimage.cpp
index ee4ece2..c6b0560 100644
--- a/tests/auto/qimage/tst_qimage.cpp
+++ b/tests/auto/qimage/tst_qimage.cpp
@@ -274,6 +274,9 @@ void tst_QImage::formatHandlersInput_data()
QTest::newRow("PPM") << "PPM" << prefix + "image.ppm";
QTest::newRow("XBM") << "XBM" << prefix + "image.xbm";
QTest::newRow("XPM") << "XPM" << prefix + "image.xpm";
+#if defined QTEST_HAVE_TIFF
+ QTest::newRow("TIFF") << "TIFF" << prefix + "image.tif";
+#endif
}
void tst_QImage::formatHandlersInput()
@@ -1454,9 +1457,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/qimagereader/images/image_100dpi.tif b/tests/auto/qimagereader/images/image_100dpi.tif
new file mode 100644
index 0000000..fcf3cd8
--- /dev/null
+++ b/tests/auto/qimagereader/images/image_100dpi.tif
Binary files differ
diff --git a/tests/auto/qimagereader/qimagereader.pro b/tests/auto/qimagereader/qimagereader.pro
index b178823..2c9510e 100644
--- a/tests/auto/qimagereader/qimagereader.pro
+++ b/tests/auto/qimagereader/qimagereader.pro
@@ -3,6 +3,7 @@ SOURCES += tst_qimagereader.cpp
MOC_DIR=tmp
QT += network
RESOURCES += qimagereader.qrc
+DEFINES += SRCDIR=\\\"$$PWD\\\"
!contains(QT_CONFIG, no-gif):DEFINES += QTEST_HAVE_GIF
!contains(QT_CONFIG, no-jpeg):DEFINES += QTEST_HAVE_JPEG
@@ -22,5 +23,6 @@ wince*: {
imagePlugins.path = imageformats
DEPLOYMENT += images imagePlugins
+ DEFINES += SRCDIR=\\\".\\\"
}
diff --git a/tests/auto/qimagereader/qimagereader.qrc b/tests/auto/qimagereader/qimagereader.qrc
index 13ce582..3c674ad 100644
--- a/tests/auto/qimagereader/qimagereader.qrc
+++ b/tests/auto/qimagereader/qimagereader.qrc
@@ -30,6 +30,7 @@
<file>images/image.pgm</file>
<file>images/image.png</file>
<file>images/image.ppm</file>
+ <file>images/image.tif</file>
<file>images/kollada.png</file>
<file>images/marble.xpm</file>
<file>images/namedcolors.xpm</file>
diff --git a/tests/auto/qimagereader/tst_qimagereader.cpp b/tests/auto/qimagereader/tst_qimagereader.cpp
index 8f7094c..f5313eb 100644
--- a/tests/auto/qimagereader/tst_qimagereader.cpp
+++ b/tests/auto/qimagereader/tst_qimagereader.cpp
@@ -158,6 +158,8 @@ private slots:
void pixelCompareWithBaseline();
};
+static const QLatin1String prefix(SRCDIR "/images/");
+
// Testing get/set functions
void tst_QImageReader::getSetCheck()
{
@@ -232,7 +234,7 @@ void tst_QImageReader::readImage()
QFETCH(QByteArray, format);
for (int i = 0; i < 2; ++i) {
- QImageReader io("images/" + fileName, i ? QByteArray() : format);
+ QImageReader io(prefix + fileName, i ? QByteArray() : format);
if (success) {
if (!io.supportsAnimation())
QVERIFY(io.imageCount() > 0);
@@ -248,16 +250,16 @@ void tst_QImageReader::readImage()
QVERIFY2(!image.isNull(), io.errorString().toLatin1().constData());
// No format
- QImageReader io2("images/" + fileName);
+ QImageReader io2(prefix + fileName);
QVERIFY2(!io2.read().isNull(), io.errorString().toLatin1().constData());
// No extension, no format
- QImageReader io3("images/" + fileName.left(fileName.lastIndexOf(QLatin1Char('.'))));
+ QImageReader io3(prefix + fileName.left(fileName.lastIndexOf(QLatin1Char('.'))));
QVERIFY2(!io3.read().isNull(), io.errorString().toLatin1().constData());
// Read into \a image2
QImage image2;
- QImageReader image2Reader("images/" + fileName, i ? QByteArray() : format);
+ QImageReader image2Reader(prefix + fileName, i ? QByteArray() : format);
QCOMPARE(image2Reader.format(), format);
QVERIFY(image2Reader.read(&image2));
if (image2Reader.canRead()) {
@@ -281,8 +283,8 @@ void tst_QImageReader::readImage()
void tst_QImageReader::jpegRgbCmyk()
{
- QImage image1(QLatin1String("images/YCbCr_cmyk.jpg"));
- QImage image2(QLatin1String("images/YCbCr_cmyk.png"));
+ QImage image1(prefix + QLatin1String("YCbCr_cmyk.jpg"));
+ QImage image2(prefix + QLatin1String("YCbCr_cmyk.png"));
QCOMPARE(image1, image2);
}
@@ -293,24 +295,24 @@ void tst_QImageReader::setScaledSize_data()
QTest::addColumn<QSize>("newSize");
QTest::addColumn<QByteArray>("format");
- QTest::newRow("BMP: colorful") << "images/colorful" << QSize(200, 200) << QByteArray("bmp");
- QTest::newRow("BMP: font") << "images/font" << QSize(200, 200) << QByteArray("bmp");
- QTest::newRow("XPM: marble") << "images/marble" << QSize(200, 200) << QByteArray("xpm");
- QTest::newRow("PNG: kollada") << "images/kollada" << QSize(200, 200) << QByteArray("png");
- QTest::newRow("PPM: teapot") << "images/teapot" << QSize(200, 200) << QByteArray("ppm");
- QTest::newRow("PPM: runners") << "images/runners.ppm" << QSize(400, 400) << QByteArray("ppm");
- QTest::newRow("PPM: test") << "images/test.ppm" << QSize(10, 10) << QByteArray("ppm");
- QTest::newRow("XBM: gnus") << "images/gnus" << QSize(200, 200) << QByteArray("xbm");
+ QTest::newRow("BMP: colorful") << "colorful" << QSize(200, 200) << QByteArray("bmp");
+ QTest::newRow("BMP: font") << "font" << QSize(200, 200) << QByteArray("bmp");
+ QTest::newRow("XPM: marble") << "marble" << QSize(200, 200) << QByteArray("xpm");
+ QTest::newRow("PNG: kollada") << "kollada" << QSize(200, 200) << QByteArray("png");
+ QTest::newRow("PPM: teapot") << "teapot" << QSize(200, 200) << QByteArray("ppm");
+ QTest::newRow("PPM: runners") << "runners.ppm" << QSize(400, 400) << QByteArray("ppm");
+ QTest::newRow("PPM: test") << "test.ppm" << QSize(10, 10) << QByteArray("ppm");
+ QTest::newRow("XBM: gnus") << "gnus" << QSize(200, 200) << QByteArray("xbm");
#ifdef QTEST_HAVE_JPEG
- QTest::newRow("JPEG: beavis") << "images/beavis" << QSize(200, 200) << QByteArray("jpeg");
+ QTest::newRow("JPEG: beavis") << "beavis" << QSize(200, 200) << QByteArray("jpeg");
#endif // QTEST_HAVE_JPEG
#ifdef QTEST_HAVE_GIF
- QTest::newRow("GIF: earth") << "images/earth" << QSize(200, 200) << QByteArray("gif");
- QTest::newRow("GIF: trolltech") << "images/trolltech" << QSize(200, 200) << QByteArray("gif");
+ QTest::newRow("GIF: earth") << "earth" << QSize(200, 200) << QByteArray("gif");
+ QTest::newRow("GIF: trolltech") << "trolltech" << QSize(200, 200) << QByteArray("gif");
#endif // QTEST_HAVE_GIF
#ifdef QTEST_HAVE_MNG
- QTest::newRow("MNG: ball") << "images/ball" << QSize(200, 200) << QByteArray("mng");
- QTest::newRow("MNG: fire") << "images/fire" << QSize(200, 200) << QByteArray("mng");
+ QTest::newRow("MNG: ball") << "ball" << QSize(200, 200) << QByteArray("mng");
+ QTest::newRow("MNG: fire") << "fire" << QSize(200, 200) << QByteArray("mng");
#endif // QTEST_HAVE_MNG
}
@@ -323,7 +325,7 @@ void tst_QImageReader::setScaledSize()
if (!format.isEmpty() && !QImageReader::supportedImageFormats().contains(format))
QSKIP("Qt does not support reading the \"" + format + "\" format", SkipSingle);
- QImageReader reader(fileName);
+ QImageReader reader(prefix + fileName);
reader.setScaledSize(newSize);
QImage image = reader.read();
QVERIFY(!image.isNull());
@@ -336,25 +338,25 @@ void tst_QImageReader::setClipRect_data()
QTest::addColumn<QString>("fileName");
QTest::addColumn<QRect>("newRect");
QTest::addColumn<QByteArray>("format");
- QTest::newRow("BMP: colorful") << "images/colorful" << QRect(0, 0, 50, 50) << QByteArray("bmp");
- QTest::newRow("BMP: font") << "images/font" << QRect(0, 0, 50, 50) << QByteArray("bmp");
- QTest::newRow("BMP: 4bpp uncompressed") << "images/tst7.bmp" << QRect(0, 0, 31, 31) << QByteArray("bmp");
- QTest::newRow("XPM: marble") << "images/marble" << QRect(0, 0, 50, 50) << QByteArray("xpm");
- QTest::newRow("PNG: kollada") << "images/kollada" << QRect(0, 0, 50, 50) << QByteArray("png");
- QTest::newRow("PPM: teapot") << "images/teapot" << QRect(0, 0, 50, 50) << QByteArray("ppm");
- QTest::newRow("PPM: runners") << "images/runners.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm");
- QTest::newRow("PPM: test") << "images/test.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm");
- QTest::newRow("XBM: gnus") << "images/gnus" << QRect(0, 0, 50, 50) << QByteArray("xbm");
+ QTest::newRow("BMP: colorful") << "colorful" << QRect(0, 0, 50, 50) << QByteArray("bmp");
+ QTest::newRow("BMP: font") << "font" << QRect(0, 0, 50, 50) << QByteArray("bmp");
+ QTest::newRow("BMP: 4bpp uncompressed") << "tst7.bmp" << QRect(0, 0, 31, 31) << QByteArray("bmp");
+ QTest::newRow("XPM: marble") << "marble" << QRect(0, 0, 50, 50) << QByteArray("xpm");
+ QTest::newRow("PNG: kollada") << "kollada" << QRect(0, 0, 50, 50) << QByteArray("png");
+ QTest::newRow("PPM: teapot") << "teapot" << QRect(0, 0, 50, 50) << QByteArray("ppm");
+ QTest::newRow("PPM: runners") << "runners.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm");
+ QTest::newRow("PPM: test") << "test.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm");
+ QTest::newRow("XBM: gnus") << "gnus" << QRect(0, 0, 50, 50) << QByteArray("xbm");
#ifdef QTEST_HAVE_JPEG
- QTest::newRow("JPEG: beavis") << "images/beavis" << QRect(0, 0, 50, 50) << QByteArray("jpeg");
+ QTest::newRow("JPEG: beavis") << "beavis" << QRect(0, 0, 50, 50) << QByteArray("jpeg");
#endif // QTEST_HAVE_JPEG
#ifdef QTEST_HAVE_GIF
- QTest::newRow("GIF: earth") << "images/earth" << QRect(0, 0, 50, 50) << QByteArray("gif");
- QTest::newRow("GIF: trolltech") << "images/trolltech" << QRect(0, 0, 50, 50) << QByteArray("gif");
+ QTest::newRow("GIF: earth") << "earth" << QRect(0, 0, 50, 50) << QByteArray("gif");
+ QTest::newRow("GIF: trolltech") << "trolltech" << QRect(0, 0, 50, 50) << QByteArray("gif");
#endif // QTEST_HAVE_GIF
#ifdef QTEST_HAVE_MNG
- QTest::newRow("MNG: ball") << "images/ball" << QRect(0, 0, 50, 50) << QByteArray("mng");
- QTest::newRow("MNG: fire") << "images/fire" << QRect(0, 0, 50, 50) << QByteArray("mng");
+ QTest::newRow("MNG: ball") << "ball" << QRect(0, 0, 50, 50) << QByteArray("mng");
+ QTest::newRow("MNG: fire") << "fire" << QRect(0, 0, 50, 50) << QByteArray("mng");
#endif // QTEST_HAVE_MNG
}
@@ -367,13 +369,13 @@ void tst_QImageReader::setClipRect()
if (!format.isEmpty() && !QImageReader::supportedImageFormats().contains(format))
QSKIP("Qt does not support reading the \"" + format + "\" format", SkipSingle);
- QImageReader reader(fileName);
+ QImageReader reader(prefix + fileName);
reader.setClipRect(newRect);
QImage image = reader.read();
QVERIFY(!image.isNull());
QCOMPARE(image.rect(), newRect);
- QImageReader originalReader(fileName);
+ QImageReader originalReader(prefix + fileName);
QImage originalImage = originalReader.read();
QCOMPARE(originalImage.copy(newRect), image);
}
@@ -384,24 +386,24 @@ void tst_QImageReader::setScaledClipRect_data()
QTest::addColumn<QRect>("newRect");
QTest::addColumn<QByteArray>("format");
- QTest::newRow("BMP: colorful") << "images/colorful" << QRect(0, 0, 50, 50) << QByteArray("bmp");
- QTest::newRow("BMP: font") << "images/font" << QRect(0, 0, 50, 50) << QByteArray("bmp");
- QTest::newRow("XPM: marble") << "images/marble" << QRect(0, 0, 50, 50) << QByteArray("xpm");
- QTest::newRow("PNG: kollada") << "images/kollada" << QRect(0, 0, 50, 50) << QByteArray("png");
- QTest::newRow("PPM: teapot") << "images/teapot" << QRect(0, 0, 50, 50) << QByteArray("ppm");
- QTest::newRow("PPM: runners") << "images/runners.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm");
- QTest::newRow("PPM: test") << "images/test.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm");
- QTest::newRow("XBM: gnus") << "images/gnus" << QRect(0, 0, 50, 50) << QByteArray("xbm");
+ QTest::newRow("BMP: colorful") << "colorful" << QRect(0, 0, 50, 50) << QByteArray("bmp");
+ QTest::newRow("BMP: font") << "font" << QRect(0, 0, 50, 50) << QByteArray("bmp");
+ QTest::newRow("XPM: marble") << "marble" << QRect(0, 0, 50, 50) << QByteArray("xpm");
+ QTest::newRow("PNG: kollada") << "kollada" << QRect(0, 0, 50, 50) << QByteArray("png");
+ QTest::newRow("PPM: teapot") << "teapot" << QRect(0, 0, 50, 50) << QByteArray("ppm");
+ QTest::newRow("PPM: runners") << "runners.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm");
+ QTest::newRow("PPM: test") << "test.ppm" << QRect(0, 0, 50, 50) << QByteArray("ppm");
+ QTest::newRow("XBM: gnus") << "gnus" << QRect(0, 0, 50, 50) << QByteArray("xbm");
#ifdef QTEST_HAVE_JPEG
- QTest::newRow("JPEG: beavis") << "images/beavis" << QRect(0, 0, 50, 50) << QByteArray("jpeg");
+ QTest::newRow("JPEG: beavis") << "beavis" << QRect(0, 0, 50, 50) << QByteArray("jpeg");
#endif // QTEST_HAVE_JPEG
#ifdef QTEST_HAVE_GIF
- QTest::newRow("GIF: earth") << "images/earth" << QRect(0, 0, 50, 50) << QByteArray("gif");
- QTest::newRow("GIF: trolltech") << "images/trolltech" << QRect(0, 0, 50, 50) << QByteArray("gif");
+ QTest::newRow("GIF: earth") << "earth" << QRect(0, 0, 50, 50) << QByteArray("gif");
+ QTest::newRow("GIF: trolltech") << "trolltech" << QRect(0, 0, 50, 50) << QByteArray("gif");
#endif // QTEST_HAVE_GIF
#ifdef QTEST_HAVE_MNG
- QTest::newRow("MNG: ball") << "images/ball" << QRect(0, 0, 50, 50) << QByteArray("mng");
- QTest::newRow("MNG: fire") << "images/fire" << QRect(0, 0, 50, 50) << QByteArray("mng");
+ QTest::newRow("MNG: ball") << "ball" << QRect(0, 0, 50, 50) << QByteArray("mng");
+ QTest::newRow("MNG: fire") << "fire" << QRect(0, 0, 50, 50) << QByteArray("mng");
#endif // QTEST_HAVE_MNG
}
@@ -414,14 +416,14 @@ void tst_QImageReader::setScaledClipRect()
if (!format.isEmpty() && !QImageReader::supportedImageFormats().contains(format))
QSKIP("Qt does not support reading the \"" + format + "\" format", SkipSingle);
- QImageReader reader(fileName);
+ QImageReader reader(prefix + fileName);
reader.setScaledSize(QSize(300, 300));
reader.setScaledClipRect(newRect);
QImage image = reader.read();
QVERIFY(!image.isNull());
QCOMPARE(image.rect(), newRect);
- QImageReader originalReader(fileName);
+ QImageReader originalReader(prefix + fileName);
originalReader.setScaledSize(QSize(300, 300));
QImage originalImage = originalReader.read();
QCOMPARE(originalImage.copy(newRect), image);
@@ -433,29 +435,29 @@ void tst_QImageReader::imageFormat_data()
QTest::addColumn<QByteArray>("format");
QTest::addColumn<QImage::Format>("imageFormat");
- QTest::newRow("pbm") << QString("images/image.pbm") << QByteArray("pbm") << QImage::Format_Mono;
- QTest::newRow("pgm") << QString("images/image.pgm") << QByteArray("pgm") << QImage::Format_Indexed8;
- QTest::newRow("ppm-1") << QString("images/image.ppm") << QByteArray("ppm") << QImage::Format_RGB32;
- QTest::newRow("ppm-2") << QString("images/teapot.ppm") << QByteArray("ppm") << QImage::Format_RGB32;
- QTest::newRow("ppm-3") << QString("images/runners.ppm") << QByteArray("ppm") << QImage::Format_RGB32;
- QTest::newRow("ppm-4") << QString("images/test.ppm") << QByteArray("ppm") << QImage::Format_RGB32;
+ QTest::newRow("pbm") << QString("image.pbm") << QByteArray("pbm") << QImage::Format_Mono;
+ QTest::newRow("pgm") << QString("image.pgm") << QByteArray("pgm") << QImage::Format_Indexed8;
+ QTest::newRow("ppm-1") << QString("image.ppm") << QByteArray("ppm") << QImage::Format_RGB32;
+ QTest::newRow("ppm-2") << QString("teapot.ppm") << QByteArray("ppm") << QImage::Format_RGB32;
+ QTest::newRow("ppm-3") << QString("runners.ppm") << QByteArray("ppm") << QImage::Format_RGB32;
+ QTest::newRow("ppm-4") << QString("test.ppm") << QByteArray("ppm") << QImage::Format_RGB32;
#ifdef QTEST_HAVE_JPEG
- QTest::newRow("jpeg-1") << QString("images/beavis.jpg") << QByteArray("jpeg") << QImage::Format_Indexed8;
- QTest::newRow("jpeg-2") << QString("images/YCbCr_cmyk.jpg") << QByteArray("jpeg") << QImage::Format_RGB32;
- QTest::newRow("jpeg-3") << QString("images/YCbCr_rgb.jpg") << QByteArray("jpeg") << QImage::Format_RGB32;
+ QTest::newRow("jpeg-1") << QString("beavis.jpg") << QByteArray("jpeg") << QImage::Format_Indexed8;
+ QTest::newRow("jpeg-2") << QString("YCbCr_cmyk.jpg") << QByteArray("jpeg") << QImage::Format_RGB32;
+ QTest::newRow("jpeg-3") << QString("YCbCr_rgb.jpg") << QByteArray("jpeg") << QImage::Format_RGB32;
#endif
#if defined QTEST_HAVE_GIF
- QTest::newRow("gif-1") << QString("images/earth.gif") << QByteArray("gif") << QImage::Format_Invalid;
- QTest::newRow("gif-2") << QString("images/trolltech.gif") << QByteArray("gif") << QImage::Format_Invalid;
+ QTest::newRow("gif-1") << QString("earth.gif") << QByteArray("gif") << QImage::Format_Invalid;
+ QTest::newRow("gif-2") << QString("trolltech.gif") << QByteArray("gif") << QImage::Format_Invalid;
#endif
- QTest::newRow("xbm") << QString("images/gnus.xbm") << QByteArray("xbm") << QImage::Format_MonoLSB;
- QTest::newRow("xpm") << QString("images/marble.xpm") << QByteArray("xpm") << QImage::Format_Indexed8;
- QTest::newRow("bmp-1") << QString("images/colorful.bmp") << QByteArray("bmp") << QImage::Format_Indexed8;
- QTest::newRow("bmp-2") << QString("images/font.bmp") << QByteArray("bmp") << QImage::Format_Indexed8;
- QTest::newRow("png") << QString("images/kollada.png") << QByteArray("png") << QImage::Format_ARGB32;
- QTest::newRow("png-2") << QString("images/YCbCr_cmyk.png") << QByteArray("png") << QImage::Format_RGB32;
- QTest::newRow("mng-1") << QString("images/ball.mng") << QByteArray("mng") << QImage::Format_Invalid;
- QTest::newRow("mng-2") << QString("images/fire.mng") << QByteArray("mng") << QImage::Format_Invalid;
+ QTest::newRow("xbm") << QString("gnus.xbm") << QByteArray("xbm") << QImage::Format_MonoLSB;
+ QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm") << QImage::Format_Indexed8;
+ QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp") << QImage::Format_Indexed8;
+ QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp") << QImage::Format_Indexed8;
+ QTest::newRow("png") << QString("kollada.png") << QByteArray("png") << QImage::Format_ARGB32;
+ QTest::newRow("png-2") << QString("YCbCr_cmyk.png") << QByteArray("png") << QImage::Format_RGB32;
+ QTest::newRow("mng-1") << QString("ball.mng") << QByteArray("mng") << QImage::Format_Invalid;
+ QTest::newRow("mng-2") << QString("fire.mng") << QByteArray("mng") << QImage::Format_Invalid;
}
void tst_QImageReader::imageFormat()
@@ -463,7 +465,8 @@ void tst_QImageReader::imageFormat()
QFETCH(QString, fileName);
QFETCH(QByteArray, format);
QFETCH(QImage::Format, imageFormat);
- if (QImageReader::imageFormat(fileName).isEmpty()) {
+
+ if (QImageReader::imageFormat(prefix + fileName).isEmpty()) {
if (QByteArray("jpeg") == format)
#ifndef QTEST_HAVE_JPEG
return;
@@ -478,31 +481,31 @@ void tst_QImageReader::imageFormat()
#endif // !QTEST_HAVE_MNG
QSKIP(("Qt does not support the " + format + " format.").constData(), SkipSingle);
} else {
- QCOMPARE(QImageReader::imageFormat(fileName), format);
+ QCOMPARE(QImageReader::imageFormat(prefix + fileName), format);
}
- QImageReader reader(fileName);
+ QImageReader reader(prefix + fileName);
QCOMPARE(reader.imageFormat(), imageFormat);
}
void tst_QImageReader::blackXPM()
{
- QImage image(QLatin1String("images/black.xpm"));
- QImage image2(QLatin1String("images/black.png"));
+ QImage image(prefix + QLatin1String("black.xpm"));
+ QImage image2(prefix + QLatin1String("black.png"));
QCOMPARE(image.pixel(25, 25), qRgb(190, 190, 190));
QCOMPARE(image.pixel(25, 25), image2.pixel(25, 25));
}
void tst_QImageReader::transparentXPM()
{
- QImage image(QLatin1String("images/nontransparent.xpm"));
- QImage image2(QLatin1String("images/transparent.xpm"));
+ QImage image(prefix + QLatin1String("nontransparent.xpm"));
+ QImage image2(prefix + QLatin1String("transparent.xpm"));
QCOMPARE(image.format(), QImage::Format_RGB32);
QCOMPARE(image2.format(), QImage::Format_ARGB32);
}
void tst_QImageReader::multiWordNamedColorXPM()
{
- QImage image(QLatin1String("images/namedcolors.xpm"));
+ QImage image(prefix + QLatin1String("namedcolors.xpm"));
QCOMPARE(image.pixel(0, 0), qRgb(102, 139, 139)); // pale turquoise 4
QCOMPARE(image.pixel(0, 1), qRgb(250, 250, 210)); // light golden rod yellow
QCOMPARE(image.pixel(0, 2), qRgb(255, 250, 205)); // lemon chiffon
@@ -593,7 +596,7 @@ void tst_QImageReader::supportsAnimation()
{
QFETCH(QString, fileName);
QFETCH(bool, success);
- QImageReader io("images/" + fileName);
+ QImageReader io(prefix + fileName);
QCOMPARE(io.supportsAnimation(), success);
}
@@ -606,7 +609,7 @@ void tst_QImageReader::sizeBeforeRead()
{
QFETCH(QString, fileName);
QFETCH(QByteArray, format);
- QImageReader reader(fileName);
+ QImageReader reader(prefix + fileName);
QVERIFY(reader.canRead());
if (format == "mng") {
QCOMPARE(reader.size(), QSize());
@@ -644,7 +647,7 @@ void tst_QImageReader::imageFormatBeforeRead()
void tst_QImageReader::gifHandlerBugs()
{
{
- QImageReader io("images/trolltech.gif");
+ QImageReader io(prefix + "trolltech.gif");
QVERIFY(io.loopCount() != 1);
int count=0;
for (; io.canRead(); io.read(), ++count) ;
@@ -653,8 +656,8 @@ void tst_QImageReader::gifHandlerBugs()
// Task 95166
{
- QImageReader io1("images/bat1.gif");
- QImageReader io2("images/bat2.gif");
+ QImageReader io1(prefix + "bat1.gif");
+ QImageReader io2(prefix + "bat2.gif");
QVERIFY(io1.canRead());
QVERIFY(io2.canRead());
QImage im1 = io1.read();
@@ -666,8 +669,8 @@ void tst_QImageReader::gifHandlerBugs()
// Task 9994
{
- QImageReader io1("images/noclearcode.gif");
- QImageReader io2("images/noclearcode.bmp");
+ QImageReader io1(prefix + "noclearcode.gif");
+ QImageReader io2(prefix + "noclearcode.bmp");
QVERIFY(io1.canRead()); QVERIFY(io2.canRead());
QImage im1 = io1.read(); QImage im2 = io2.read();
QVERIFY(!im1.isNull()); QVERIFY(!im2.isNull());
@@ -731,29 +734,29 @@ void tst_QImageReader::readFromDevice_data()
QTest::addColumn<QString>("fileName");
QTest::addColumn<QByteArray>("format");
- QTest::newRow("pbm") << QString("images/image.pbm") << QByteArray("pbm");
- QTest::newRow("pgm") << QString("images/image.pgm") << QByteArray("pgm");
- QTest::newRow("ppm-1") << QString("images/image.ppm") << QByteArray("ppm");
- QTest::newRow("ppm-2") << QString("images/teapot.ppm") << QByteArray("ppm");
- QTest::newRow("ppm-3") << QString("images/teapot.ppm") << QByteArray("ppm");
- QTest::newRow("ppm-4") << QString("images/runners.ppm") << QByteArray("ppm");
+ QTest::newRow("pbm") << QString("image.pbm") << QByteArray("pbm");
+ QTest::newRow("pgm") << QString("image.pgm") << QByteArray("pgm");
+ QTest::newRow("ppm-1") << QString("image.ppm") << QByteArray("ppm");
+ QTest::newRow("ppm-2") << QString("teapot.ppm") << QByteArray("ppm");
+ QTest::newRow("ppm-3") << QString("teapot.ppm") << QByteArray("ppm");
+ QTest::newRow("ppm-4") << QString("runners.ppm") << QByteArray("ppm");
#ifdef QTEST_HAVE_JPEG
- QTest::newRow("jpeg-1") << QString("images/beavis.jpg") << QByteArray("jpeg");
- QTest::newRow("jpeg-2") << QString("images/YCbCr_cmyk.jpg") << QByteArray("jpeg");
- QTest::newRow("jpeg-3") << QString("images/YCbCr_rgb.jpg") << QByteArray("jpeg");
+ QTest::newRow("jpeg-1") << QString("beavis.jpg") << QByteArray("jpeg");
+ QTest::newRow("jpeg-2") << QString("YCbCr_cmyk.jpg") << QByteArray("jpeg");
+ QTest::newRow("jpeg-3") << QString("YCbCr_rgb.jpg") << QByteArray("jpeg");
#endif // QTEST_HAVE_JPEG
#ifdef QTEST_HAVE_GIF
- QTest::newRow("gif-1") << QString("images/earth.gif") << QByteArray("gif");
- QTest::newRow("gif-2") << QString("images/trolltech.gif") << QByteArray("gif");
+ QTest::newRow("gif-1") << QString("earth.gif") << QByteArray("gif");
+ QTest::newRow("gif-2") << QString("trolltech.gif") << QByteArray("gif");
#endif // QTEST_HAVE_GIF
- QTest::newRow("xbm") << QString("images/gnus.xbm") << QByteArray("xbm");
- QTest::newRow("xpm") << QString("images/marble.xpm") << QByteArray("xpm");
- QTest::newRow("bmp-1") << QString("images/colorful.bmp") << QByteArray("bmp");
- QTest::newRow("bmp-2") << QString("images/font.bmp") << QByteArray("bmp");
- QTest::newRow("png") << QString("images/kollada.png") << QByteArray("png");
+ QTest::newRow("xbm") << QString("gnus.xbm") << QByteArray("xbm");
+ QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm");
+ QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp");
+ QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp");
+ QTest::newRow("png") << QString("kollada.png") << QByteArray("png");
#ifdef QTEST_HAVE_MNG
- QTest::newRow("mng-1") << QString("images/ball.mng") << QByteArray("mng");
- QTest::newRow("mng-2") << QString("images/fire.mng") << QByteArray("mng");
+ QTest::newRow("mng-1") << QString("ball.mng") << QByteArray("mng");
+ QTest::newRow("mng-2") << QString("fire.mng") << QByteArray("mng");
#endif // QTEST_HAVE_MNG
}
@@ -762,9 +765,9 @@ void tst_QImageReader::readFromDevice()
QFETCH(QString, fileName);
QFETCH(QByteArray, format);
- QImage expectedImage(fileName, format);
+ QImage expectedImage(prefix + fileName, format);
- QFile file(fileName);
+ QFile file(prefix + fileName);
QVERIFY(file.open(QFile::ReadOnly));
QByteArray imageData = file.readAll();
QVERIFY(!imageData.isEmpty());
@@ -813,26 +816,26 @@ void tst_QImageReader::readFromFileAfterJunk_data()
QTest::addColumn<QString>("fileName");
QTest::addColumn<QByteArray>("format");
- QTest::newRow("pbm") << QString("images/image.pbm") << QByteArray("pbm");
- QTest::newRow("pgm") << QString("images/image.pgm") << QByteArray("pgm");
- QTest::newRow("ppm-1") << QString("images/image.ppm") << QByteArray("ppm");
- QTest::newRow("ppm-2") << QString("images/teapot.ppm") << QByteArray("ppm");
- QTest::newRow("ppm-3") << QString("images/teapot.ppm") << QByteArray("ppm");
- QTest::newRow("ppm-4") << QString("images/runners.ppm") << QByteArray("ppm");
+ QTest::newRow("pbm") << QString("image.pbm") << QByteArray("pbm");
+ QTest::newRow("pgm") << QString("image.pgm") << QByteArray("pgm");
+ QTest::newRow("ppm-1") << QString("image.ppm") << QByteArray("ppm");
+ QTest::newRow("ppm-2") << QString("teapot.ppm") << QByteArray("ppm");
+ QTest::newRow("ppm-3") << QString("teapot.ppm") << QByteArray("ppm");
+ QTest::newRow("ppm-4") << QString("runners.ppm") << QByteArray("ppm");
#ifdef QTEST_HAVE_JPEG
- QTest::newRow("jpeg-1") << QString("images/beavis.jpg") << QByteArray("jpeg");
- QTest::newRow("jpeg-2") << QString("images/YCbCr_cmyk.jpg") << QByteArray("jpeg");
- QTest::newRow("jpeg-3") << QString("images/YCbCr_rgb.jpg") << QByteArray("jpeg");
+ QTest::newRow("jpeg-1") << QString("beavis.jpg") << QByteArray("jpeg");
+ QTest::newRow("jpeg-2") << QString("YCbCr_cmyk.jpg") << QByteArray("jpeg");
+ QTest::newRow("jpeg-3") << QString("YCbCr_rgb.jpg") << QByteArray("jpeg");
#endif
#if defined QTEST_HAVE_GIF
// QTest::newRow("gif-1") << QString("images/earth.gif") << QByteArray("gif");
// QTest::newRow("gif-2") << QString("images/trolltech.gif") << QByteArray("gif");
#endif
- QTest::newRow("xbm") << QString("images/gnus.xbm") << QByteArray("xbm");
- QTest::newRow("xpm") << QString("images/marble.xpm") << QByteArray("xpm");
- QTest::newRow("bmp-1") << QString("images/colorful.bmp") << QByteArray("bmp");
- QTest::newRow("bmp-2") << QString("images/font.bmp") << QByteArray("bmp");
- QTest::newRow("png") << QString("images/kollada.png") << QByteArray("png");
+ QTest::newRow("xbm") << QString("gnus.xbm") << QByteArray("xbm");
+ QTest::newRow("xpm") << QString("marble.xpm") << QByteArray("xpm");
+ QTest::newRow("bmp-1") << QString("colorful.bmp") << QByteArray("bmp");
+ QTest::newRow("bmp-2") << QString("font.bmp") << QByteArray("bmp");
+ QTest::newRow("png") << QString("kollada.png") << QByteArray("png");
// QTest::newRow("mng-1") << QString("images/ball.mng") << QByteArray("mng");
// QTest::newRow("mng-2") << QString("images/fire.mng") << QByteArray("mng");
}
@@ -851,7 +854,7 @@ void tst_QImageReader::readFromFileAfterJunk()
QFile junkFile("junk");
QVERIFY(junkFile.open(QFile::WriteOnly));
- QFile imageFile(fileName);
+ QFile imageFile(prefix + fileName);
QVERIFY(imageFile.open(QFile::ReadOnly));
QByteArray imageData = imageFile.readAll();
QVERIFY(!imageData.isNull());
@@ -869,7 +872,7 @@ void tst_QImageReader::readFromFileAfterJunk()
for (int i = 0; i < iterations; ++i) {
QImageWriter writer(&junkFile, format);
junkFile.write("deadbeef", 9);
- QVERIFY(writer.write(QImage(fileName)));
+ QVERIFY(writer.write(QImage(prefix + fileName)));
}
}
junkFile.close();
@@ -903,8 +906,8 @@ void tst_QImageReader::description_data()
willem["Software"] = "Created on a NeXTstation color using \"pnmtopng\".";
willem["Disclaimer"] = "Freeware.";
- QTest::newRow("PNG") << QString("images/pngwithtext.png") << willem;
- QTest::newRow("PNG Compressed") << QString("images/pngwithcompressedtext.png") << willem;
+ QTest::newRow("PNG") << QString("pngwithtext.png") << willem;
+ QTest::newRow("PNG Compressed") << QString("pngwithcompressedtext.png") << willem;
}
void tst_QImageReader::description()
@@ -913,9 +916,9 @@ void tst_QImageReader::description()
QFETCH(QStringMap, description);
// Sanity check
- QVERIFY(!QImage(fileName).isNull());
+ QVERIFY(!QImage(prefix + fileName).isNull());
- QImageReader reader(fileName);
+ QImageReader reader(prefix + fileName);
foreach (QString key, description.keys())
QCOMPARE(reader.text(key), description.value(key));
@@ -940,143 +943,143 @@ void tst_QImageReader::readFromResources_data()
QTest::addColumn<QSize>("size");
QTest::addColumn<QString>("message");
- QTest::newRow("images/corrupt.bmp") << QString("images/corrupt.bmp")
+ QTest::newRow("corrupt.bmp") << QString("corrupt.bmp")
<< QByteArray("bmp") << QSize(0, 0)
<< QString("");
- QTest::newRow("images/negativeheight.bmp") << QString("images/negativeheight.bmp")
+ QTest::newRow("negativeheight.bmp") << QString("negativeheight.bmp")
<< QByteArray("bmp") << QSize(127, 64)
<< QString("");
- QTest::newRow("images/font.bmp") << QString("images/font.bmp")
+ QTest::newRow("font.bmp") << QString("font.bmp")
<< QByteArray("bmp") << QSize(240, 8)
<< QString("");
- QTest::newRow("images/noclearcode.bmp") << QString("images/noclearcode.bmp")
+ QTest::newRow("noclearcode.bmp") << QString("noclearcode.bmp")
<< QByteArray("bmp") << QSize(29, 18)
<< QString("");
- QTest::newRow("images/colorful.bmp") << QString("images/colorful.bmp")
+ QTest::newRow("colorful.bmp") << QString("colorful.bmp")
<< QByteArray("bmp") << QSize(320, 200)
<< QString("");
- QTest::newRow("images/16bpp.bmp") << QString("images/16bpp.bmp")
+ QTest::newRow("16bpp.bmp") << QString("16bpp.bmp")
<< QByteArray("bmp") << QSize(320, 240)
<< QString("");
- QTest::newRow("images/crash-signed-char.bmp") << QString("images/crash-signed-char.bmp")
+ QTest::newRow("crash-signed-char.bmp") << QString("crash-signed-char.bmp")
<< QByteArray("bmp") << QSize(360, 280)
<< QString("");
- QTest::newRow("images/4bpp-rle.bmp") << QString("images/4bpp-rle.bmp")
+ QTest::newRow("4bpp-rle.bmp") << QString("4bpp-rle.bmp")
<< QByteArray("bmp") << QSize(640, 480)
<< QString("");
#ifdef QTEST_HAVE_GIF
- QTest::newRow("images/corrupt.gif") << QString("images/corrupt.gif")
+ QTest::newRow("corrupt.gif") << QString("corrupt.gif")
<< QByteArray("gif") << QSize(0, 0)
<< QString("");
- QTest::newRow("images/trolltech.gif") << QString("images/trolltech.gif")
+ QTest::newRow("trolltech.gif") << QString("trolltech.gif")
<< QByteArray("gif") << QSize(128, 64)
<< QString("");
- QTest::newRow("images/noclearcode.gif") << QString("images/noclearcode.gif")
+ QTest::newRow("noclearcode.gif") << QString("noclearcode.gif")
<< QByteArray("gif") << QSize(29, 18)
<< QString("");
- QTest::newRow("images/earth.gif") << QString("images/earth.gif")
+ QTest::newRow("earth.gif") << QString("earth.gif")
<< QByteArray("gif") << QSize(320, 200)
<< QString("");
- QTest::newRow("images/bat1.gif") << QString("images/bat1.gif")
+ QTest::newRow("bat1.gif") << QString("bat1.gif")
<< QByteArray("gif") << QSize(32, 32)
<< QString("");
- QTest::newRow("images/bat2.gif") << QString("images/bat2.gif")
+ QTest::newRow("bat2.gif") << QString("bat2.gif")
<< QByteArray("gif") << QSize(32, 32)
<< QString("");
#endif
#ifdef QTEST_HAVE_JPEG
- QTest::newRow("images/corrupt.jpg") << QString("images/corrupt.jpg")
+ QTest::newRow("corrupt.jpg") << QString("corrupt.jpg")
<< QByteArray("jpg") << QSize(0, 0)
<< QString("JPEG datastream contains no image");
- QTest::newRow("images/beavis.jpg") << QString("images/beavis.jpg")
+ QTest::newRow("beavis.jpg") << QString("beavis.jpg")
<< QByteArray("jpg") << QSize(350, 350)
<< QString("");
- QTest::newRow("images/YCbCr_cmyk.jpg") << QString("images/YCbCr_cmyk.jpg")
+ QTest::newRow("YCbCr_cmyk.jpg") << QString("YCbCr_cmyk.jpg")
<< QByteArray("jpg") << QSize(75, 50)
<< QString("");
- QTest::newRow("images/YCbCr_rgb.jpg") << QString("images/YCbCr_rgb.jpg")
+ QTest::newRow("YCbCr_rgb.jpg") << QString("YCbCr_rgb.jpg")
<< QByteArray("jpg") << QSize(75, 50)
<< QString("");
#endif
#ifdef QTEST_HAVE_MNG
- QTest::newRow("images/corrupt.mng") << QString("images/corrupt.mng")
+ QTest::newRow("corrupt.mng") << QString("corrupt.mng")
<< QByteArray("mng") << QSize(0, 0)
<< QString("MNG error 901: Application signalled I/O error; chunk IHDR; subcode 0:0");
- QTest::newRow("images/fire.mng") << QString("images/fire.mng")
+ QTest::newRow("fire.mng") << QString("fire.mng")
<< QByteArray("mng") << QSize(30, 60)
<< QString("");
- QTest::newRow("images/ball.mng") << QString("images/ball.mng")
+ QTest::newRow("ball.mng") << QString("ball.mng")
<< QByteArray("mng") << QSize(32, 32)
<< QString("");
#endif
- QTest::newRow("images/image.pbm") << QString("images/image.pbm")
+ QTest::newRow("image.pbm") << QString("image.pbm")
<< QByteArray("pbm") << QSize(16, 6)
<< QString("");
- QTest::newRow("images/image.pgm") << QString("images/image.pgm")
+ QTest::newRow("image.pgm") << QString("image.pgm")
<< QByteArray("pgm") << QSize(24, 7)
<< QString("");
- QTest::newRow("images/corrupt.png") << QString("images/corrupt.png")
+ QTest::newRow("corrupt.png") << QString("corrupt.png")
<< QByteArray("png") << QSize(0, 0)
<< QString("");
- QTest::newRow("images/away.png") << QString("images/away.png")
+ QTest::newRow("away.png") << QString("away.png")
<< QByteArray("png") << QSize(16, 16)
<< QString("");
- QTest::newRow("images/image.png") << QString("images/image.png")
+ QTest::newRow("image.png") << QString("image.png")
<< QByteArray("png") << QSize(22, 22)
<< QString("");
- QTest::newRow("images/pngwithcompressedtext.png") << QString("images/pngwithcompressedtext.png")
+ QTest::newRow("pngwithcompressedtext.png") << QString("pngwithcompressedtext.png")
<< QByteArray("png") << QSize(32, 32)
<< QString("");
- QTest::newRow("images/pngwithtext.png") << QString("images/pngwithtext.png")
+ QTest::newRow("pngwithtext.png") << QString("pngwithtext.png")
<< QByteArray("png") << QSize(32, 32)
<< QString("");
- QTest::newRow("images/kollada.png") << QString("images/kollada.png")
+ QTest::newRow("kollada.png") << QString("kollada.png")
<< QByteArray("png") << QSize(436, 160)
<< QString("");
- QTest::newRow("images/black.png") << QString("images/black.png")
+ QTest::newRow("black.png") << QString("black.png")
<< QByteArray("png") << QSize(48, 48)
<< QString("");
- QTest::newRow("images/YCbCr_cmyk.png") << QString("images/YCbCr_cmyk.png")
+ QTest::newRow("YCbCr_cmyk.png") << QString("YCbCr_cmyk.png")
<< QByteArray("png") << QSize(75, 50)
<< QString("");
- QTest::newRow("images/teapot.ppm") << QString("images/teapot.ppm")
+ QTest::newRow("teapot.ppm") << QString("teapot.ppm")
<< QByteArray("ppm") << QSize(256, 256)
<< QString("");
- QTest::newRow("images/image.ppm") << QString("images/image.ppm")
+ QTest::newRow("image.ppm") << QString("image.ppm")
<< QByteArray("ppm") << QSize(4, 4)
<< QString("");
- QTest::newRow("images/runners.ppm") << QString("images/runners.ppm")
+ QTest::newRow("runners.ppm") << QString("runners.ppm")
<< QByteArray("ppm") << QSize(400, 400)
<< QString("");
- QTest::newRow("images/test.ppm") << QString("images/test.ppm")
+ QTest::newRow("test.ppm") << QString("test.ppm")
<< QByteArray("ppm") << QSize(10, 10)
<< QString("");
-// QTest::newRow("images/corrupt.xbm") << QString("images/corrupt.xbm") << QByteArray("xbm") << QSize(0, 0);
- QTest::newRow("images/gnus.xbm") << QString("images/gnus.xbm")
+// QTest::newRow("corrupt.xbm") << QString("corrupt.xbm") << QByteArray("xbm") << QSize(0, 0);
+ QTest::newRow("gnus.xbm") << QString("gnus.xbm")
<< QByteArray("xbm") << QSize(271, 273)
<< QString("");
- QTest::newRow("images/corrupt-colors.xpm") << QString("images/corrupt-colors.xpm")
+ QTest::newRow("corrupt-colors.xpm") << QString("corrupt-colors.xpm")
<< QByteArray("xpm") << QSize(0, 0)
<< QString("QImage: XPM color specification is missing: bla9an.n#x");
- QTest::newRow("images/corrupt-pixels.xpm") << QString("images/corrupt-pixels.xpm")
+ QTest::newRow("corrupt-pixels.xpm") << QString("corrupt-pixels.xpm")
<< QByteArray("xpm") << QSize(0, 0)
<< QString("QImage: XPM pixels missing on image line 3");
- QTest::newRow("images/marble.xpm") << QString("images/marble.xpm")
+ QTest::newRow("marble.xpm") << QString("marble.xpm")
<< QByteArray("xpm") << QSize(240, 240)
<< QString("");
- QTest::newRow("images/test.xpm") << QString("images/test.xpm")
+ QTest::newRow("test.xpm") << QString("test.xpm")
<< QByteArray("xpm") << QSize(256, 256)
<< QString("");
- QTest::newRow("images/black.xpm") << QString("images/black.xpm")
+ QTest::newRow("black.xpm") << QString("black.xpm")
<< QByteArray("xpm") << QSize(48, 48)
<< QString("");
- QTest::newRow("images/namedcolors.xpm") << QString("images/namedcolors.xpm")
+ QTest::newRow("namedcolors.xpm") << QString("namedcolors.xpm")
<< QByteArray("xpm") << QSize(8, 8)
<< QString("");
- QTest::newRow("images/nontransparent.xpm") << QString("images/nontransparent.xpm")
+ QTest::newRow("nontransparent.xpm") << QString("nontransparent.xpm")
<< QByteArray("xpm") << QSize(8, 8)
<< QString("");
- QTest::newRow("images/transparent.xpm") << QString("images/transparent.xpm")
+ QTest::newRow("transparent.xpm") << QString("transparent.xpm")
<< QByteArray("xpm") << QSize(8, 8)
<< QString("");
}
@@ -1087,9 +1090,8 @@ void tst_QImageReader::readFromResources()
QFETCH(QByteArray, format);
QFETCH(QSize, size);
QFETCH(QString, message);
-
for (int i = 0; i < 2; ++i) {
- QString file = i ? (":/" + fileName) : fileName;
+ QString file = i ? (":/images/" + fileName) : (prefix + fileName);
{
// suppress warnings if we expect them
if (!message.isEmpty()) {
@@ -1153,7 +1155,7 @@ void tst_QImageReader::readFromResources()
QTest::ignoreMessage(QtWarningMsg, message.toLatin1());
QTest::ignoreMessage(QtWarningMsg, message.toLatin1());
}
- QCOMPARE(QImageReader(fileName).read(), QImageReader(":/" + fileName).read());
+ QCOMPARE(QImageReader(prefix + fileName).read(), QImageReader(":/images/" + fileName).read());
}
void tst_QImageReader::readCorruptImage_data()
@@ -1162,25 +1164,25 @@ void tst_QImageReader::readCorruptImage_data()
QTest::addColumn<bool>("shouldFail");
QTest::addColumn<QString>("message");
#if defined QTEST_HAVE_JPEG
- QTest::newRow("corrupt jpeg") << QString("images/corrupt.jpg") << true
+ QTest::newRow("corrupt jpeg") << QString("corrupt.jpg") << true
<< QString("JPEG datastream contains no image");
#endif
#if defined QTEST_HAVE_GIF
- QTest::newRow("corrupt gif") << QString("images/corrupt.gif") << true << QString("");
+ QTest::newRow("corrupt gif") << QString("corrupt.gif") << true << QString("");
#endif
#ifdef QTEST_HAVE_MNG
- QTest::newRow("corrupt mng") << QString("images/corrupt.mng") << true
+ QTest::newRow("corrupt mng") << QString("corrupt.mng") << true
<< QString("MNG error 901: Application signalled I/O error; chunk IHDR; subcode 0:0");
#endif
- QTest::newRow("corrupt png") << QString("images/corrupt.png") << true << QString("");
- QTest::newRow("corrupt bmp") << QString("images/corrupt.bmp") << true << QString("");
- QTest::newRow("corrupt xpm (colors)") << QString("images/corrupt-colors.xpm") << true
+ QTest::newRow("corrupt png") << QString("corrupt.png") << true << QString("");
+ QTest::newRow("corrupt bmp") << QString("corrupt.bmp") << true << QString("");
+ QTest::newRow("corrupt xpm (colors)") << QString("corrupt-colors.xpm") << true
<< QString("QImage: XPM color specification is missing: bla9an.n#x");
- QTest::newRow("corrupt xpm (pixels)") << QString("images/corrupt-pixels.xpm") << true
+ QTest::newRow("corrupt xpm (pixels)") << QString("corrupt-pixels.xpm") << true
<< QString("QImage: XPM pixels missing on image line 3");
- QTest::newRow("corrupt xbm") << QString("images/corrupt.xbm") << false << QString("");
+ QTest::newRow("corrupt xbm") << QString("corrupt.xbm") << false << QString("");
#if defined QTEST_HAVE_TIFF
- QTest::newRow("corrupt tiff") << QString("images/corrupt-data.tif") << true << QString("");
+ QTest::newRow("corrupt tiff") << QString("corrupt-data.tif") << true << QString("");
#endif
}
@@ -1189,16 +1191,17 @@ void tst_QImageReader::readCorruptImage()
QFETCH(QString, fileName);
QFETCH(bool, shouldFail);
QFETCH(QString, message);
+
if (!message.isEmpty())
QTest::ignoreMessage(QtWarningMsg, message.toLatin1());
- QImageReader reader(fileName);
+ QImageReader reader(prefix + fileName);
QVERIFY(reader.canRead());
QCOMPARE(reader.read().isNull(), shouldFail);
}
void tst_QImageReader::readCorruptBmp()
{
- QCOMPARE(QImage("images/tst7.bmp").convertToFormat(QImage::Format_ARGB32_Premultiplied), QImage("images/tst7.png").convertToFormat(QImage::Format_ARGB32_Premultiplied));
+ QCOMPARE(QImage("tst7.bmp").convertToFormat(QImage::Format_ARGB32_Premultiplied), QImage("images/tst7.png").convertToFormat(QImage::Format_ARGB32_Premultiplied));
}
void tst_QImageReader::supportsOption_data()
@@ -1206,7 +1209,7 @@ void tst_QImageReader::supportsOption_data()
QTest::addColumn<QString>("fileName");
QTest::addColumn<QIntList>("options");
- QTest::newRow("png") << QString("images/black.png")
+ QTest::newRow("png") << QString("black.png")
<< (QIntList() << QImageIOHandler::Gamma
<< QImageIOHandler::Description
<< QImageIOHandler::Quality
@@ -1234,7 +1237,7 @@ void tst_QImageReader::supportsOption()
<< QImageIOHandler::Animation
<< QImageIOHandler::BackgroundColor;
- QImageReader reader(fileName);
+ QImageReader reader(prefix + fileName);
for (int i = 0; i < options.size(); ++i) {
QVERIFY(reader.supportsOption(QImageIOHandler::ImageOption(options.at(i))));
allOptions.remove(QImageIOHandler::ImageOption(options.at(i)));
@@ -1250,14 +1253,14 @@ void tst_QImageReader::tiffCompression_data()
QTest::addColumn<QString>("uncompressedFile");
QTest::addColumn<QString>("compressedFile");
- QTest::newRow("TIFF: adobedeflate") << "images/rgba_nocompression_littleendian.tif"
- << "images/rgba_adobedeflate_littleendian.tif";
- QTest::newRow("TIFF: lzw") << "images/rgba_nocompression_littleendian.tif"
- << "images/rgba_lzw_littleendian.tif";
- QTest::newRow("TIFF: packbits") << "images/rgba_nocompression_littleendian.tif"
- << "images/rgba_packbits_littleendian.tif";
- QTest::newRow("TIFF: zipdeflate") << "images/rgba_nocompression_littleendian.tif"
- << "images/rgba_zipdeflate_littleendian.tif";
+ QTest::newRow("TIFF: adobedeflate") << "rgba_nocompression_littleendian.tif"
+ << "rgba_adobedeflate_littleendian.tif";
+ QTest::newRow("TIFF: lzw") << "rgba_nocompression_littleendian.tif"
+ << "rgba_lzw_littleendian.tif";
+ QTest::newRow("TIFF: packbits") << "rgba_nocompression_littleendian.tif"
+ << "rgba_packbits_littleendian.tif";
+ QTest::newRow("TIFF: zipdeflate") << "rgba_nocompression_littleendian.tif"
+ << "rgba_zipdeflate_littleendian.tif";
}
void tst_QImageReader::tiffCompression()
@@ -1265,16 +1268,16 @@ void tst_QImageReader::tiffCompression()
QFETCH(QString, uncompressedFile);
QFETCH(QString, compressedFile);
- QImage uncompressedImage(uncompressedFile);
- QImage compressedImage(compressedFile);
+ QImage uncompressedImage(prefix + uncompressedFile);
+ QImage compressedImage(prefix + compressedFile);
QCOMPARE(uncompressedImage, compressedImage);
}
void tst_QImageReader::tiffEndianness()
{
- QImage littleEndian("images/rgba_nocompression_littleendian.tif");
- QImage bigEndian("images/rgba_nocompression_bigendian.tif");
+ QImage littleEndian(prefix + "rgba_nocompression_littleendian.tif");
+ QImage bigEndian(prefix + "rgba_nocompression_bigendian.tif");
QCOMPARE(littleEndian, bigEndian);
}
@@ -1286,8 +1289,10 @@ void tst_QImageReader::dotsPerMeter_data()
QTest::addColumn<QString>("fileName");
QTest::addColumn<int>("expectedDotsPerMeterX");
QTest::addColumn<int>("expectedDotsPerMeterY");
-
- QTest::newRow("TIFF: 72 dpi") << "images/rgba_nocompression_littleendian.tif" << qRound(72 * (100 / 2.54)) << qRound(72 * (100 / 2.54));
+#if defined QTEST_HAVE_TIFF
+ QTest::newRow("TIFF: 72 dpi") << ("rgba_nocompression_littleendian.tif") << qRound(72 * (100 / 2.54)) << qRound(72 * (100 / 2.54));
+ QTest::newRow("TIFF: 100 dpi") << ("image_100dpi.tif") << qRound(100 * (100 / 2.54)) << qRound(100 * (100 / 2.54));
+#endif
}
void tst_QImageReader::dotsPerMeter()
@@ -1296,7 +1301,7 @@ void tst_QImageReader::dotsPerMeter()
QFETCH(int, expectedDotsPerMeterX);
QFETCH(int, expectedDotsPerMeterY);
- QImage image(fileName);
+ QImage image(prefix + fileName);
QCOMPARE(image.dotsPerMeterX(), expectedDotsPerMeterX);
QCOMPARE(image.dotsPerMeterY(), expectedDotsPerMeterY);
@@ -1307,8 +1312,10 @@ void tst_QImageReader::physicalDpi_data()
QTest::addColumn<QString>("fileName");
QTest::addColumn<int>("expectedPhysicalDpiX");
QTest::addColumn<int>("expectedPhysicalDpiY");
-
- QTest::newRow("TIFF: 72 dpi") << "images/rgba_nocompression_littleendian.tif" << 72 << 72;
+#if defined QTEST_HAVE_TIFF
+ QTest::newRow("TIFF: 72 dpi") << "rgba_nocompression_littleendian.tif" << 72 << 72;
+ QTest::newRow("TIFF: 100 dpi") << "image_100dpi.tif" << 100 << 100;
+#endif
}
void tst_QImageReader::physicalDpi()
@@ -1317,7 +1324,7 @@ void tst_QImageReader::physicalDpi()
QFETCH(int, expectedPhysicalDpiX);
QFETCH(int, expectedPhysicalDpiY);
- QImage image(fileName);
+ QImage image(prefix + fileName);
QCOMPARE(image.physicalDpiX(), expectedPhysicalDpiX);
QCOMPARE(image.physicalDpiY(), expectedPhysicalDpiY);
@@ -1328,7 +1335,7 @@ void tst_QImageReader::autoDetectImageFormat()
// Assume PNG is supported :-)
{
// Disables file name extension probing
- QImageReader reader("images/kollada");
+ QImageReader reader(prefix + "kollada");
reader.setAutoDetectImageFormat(false);
QVERIFY(!reader.canRead());
QVERIFY(reader.read().isNull());
@@ -1338,7 +1345,7 @@ void tst_QImageReader::autoDetectImageFormat()
}
{
// Disables detection based on suffix
- QImageReader reader("images/kollada.png");
+ QImageReader reader(prefix + "kollada.png");
reader.setAutoDetectImageFormat(false);
QVERIFY(!reader.canRead());
QVERIFY(reader.read().isNull());
@@ -1348,7 +1355,7 @@ void tst_QImageReader::autoDetectImageFormat()
}
{
// Disables detection based on content
- QImageReader reader("images/kollada-noext");
+ QImageReader reader(prefix + "kollada-noext");
reader.setAutoDetectImageFormat(false);
QVERIFY(!reader.canRead());
QVERIFY(reader.read().isNull());
diff --git a/tests/auto/qimagewriter/tst_qimagewriter.cpp b/tests/auto/qimagewriter/tst_qimagewriter.cpp
index 878d398..349afa5 100644
--- a/tests/auto/qimagewriter/tst_qimagewriter.cpp
+++ b/tests/auto/qimagewriter/tst_qimagewriter.cpp
@@ -97,6 +97,9 @@ private slots:
void saveWithNoFormat_data();
void saveWithNoFormat();
+ void resolution_data();
+ void resolution();
+
void saveToTemporaryFile();
};
@@ -162,7 +165,7 @@ tst_QImageWriter::tst_QImageWriter()
tst_QImageWriter::~tst_QImageWriter()
{
- QDir dir("images");
+ QDir dir(prefix);
QStringList filesToDelete = dir.entryList(QStringList() << "gen-*" , QDir::NoDotAndDotDot | QDir::Files);
foreach( QString file, filesToDelete) {
QFile::remove(dir.absoluteFilePath(file));
@@ -442,13 +445,13 @@ void tst_QImageWriter::supportsOption_data()
QTest::addColumn<QString>("fileName");
QTest::addColumn<QIntList>("options");
- QTest::newRow("png") << QString(prefix + "gen-black.png")
+ QTest::newRow("png") << QString("gen-black.png")
<< (QIntList() << QImageIOHandler::Gamma
<< QImageIOHandler::Description
<< QImageIOHandler::Quality
<< QImageIOHandler::Size);
#if defined QTEST_HAVE_TIFF
- QTest::newRow("tiff") << QString("images/gen-black.tiff")
+ QTest::newRow("tiff") << QString("gen-black.tiff")
<< (QIntList() << QImageIOHandler::Size
<< QImageIOHandler::CompressionRatio);
#endif
@@ -475,7 +478,7 @@ void tst_QImageWriter::supportsOption()
<< QImageIOHandler::Animation
<< QImageIOHandler::BackgroundColor;
- QImageWriter writer(fileName);
+ QImageWriter writer(prefix + fileName);
for (int i = 0; i < options.size(); ++i) {
QVERIFY(writer.supportsOption(QImageIOHandler::ImageOption(options.at(i))));
allOptions.remove(QImageIOHandler::ImageOption(options.at(i)));
@@ -530,6 +533,39 @@ void tst_QImageWriter::saveWithNoFormat()
QVERIFY2(!outImage.isNull(), qPrintable(reader.errorString()));
}
+void tst_QImageWriter::resolution_data()
+{
+ QTest::addColumn<QString>("filename");
+ QTest::addColumn<int>("expectedDotsPerMeterX");
+ QTest::addColumn<int>("expectedDotsPerMeterY");
+#if defined QTEST_HAVE_TIFF
+ QTest::newRow("TIFF: 100 dpi") << ("image_100dpi.tif") << qRound(100 * (100 / 2.54)) << qRound(100 * (100 / 2.54));
+ QTest::newRow("TIFF: 50 dpi") << ("image_50dpi.tif") << qRound(50 * (100 / 2.54)) << qRound(50 * (100 / 2.54));
+ QTest::newRow("TIFF: 300 dot per meter") << ("image_300dpm.tif") << 300 << 300;
+#endif
+}
+
+void tst_QImageWriter::resolution()
+{
+ QFETCH(QString, filename);
+ QFETCH(int, expectedDotsPerMeterX);
+ QFETCH(int, expectedDotsPerMeterY);
+
+ QImage image(prefix + QLatin1String("colorful.bmp"));
+ image.setDotsPerMeterX(expectedDotsPerMeterX);
+ image.setDotsPerMeterY(expectedDotsPerMeterY);
+ const QString generatedFilepath = prefix + "gen-" + filename;
+ {
+ QImageWriter writer(generatedFilepath);
+ QVERIFY(writer.write(image));
+ }
+ QImageReader reader(generatedFilepath);
+ const QImage generatedImage = reader.read();
+
+ QCOMPARE(expectedDotsPerMeterX, generatedImage.dotsPerMeterX());
+ QCOMPARE(expectedDotsPerMeterY, generatedImage.dotsPerMeterY());
+}
+
void tst_QImageWriter::saveToTemporaryFile()
{
QImage image(prefix + "kollada.png");
diff --git a/tests/auto/qiodevice/tst_qiodevice.cpp b/tests/auto/qiodevice/tst_qiodevice.cpp
index 03a0665..367a2e0 100644
--- a/tests/auto/qiodevice/tst_qiodevice.cpp
+++ b/tests/auto/qiodevice/tst_qiodevice.cpp
@@ -120,7 +120,7 @@ void tst_QIODevice::constructing_QTcpSocket()
QVERIFY(!device->isOpen());
- socket.connectToHost("imap.troll.no", 143);
+ socket.connectToHost(QtNetworkSettings::serverName(), 143);
QVERIFY(socket.waitForConnected(5000));
QVERIFY(device->isOpen());
@@ -134,7 +134,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));
while (!device->canReadLine())
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 748bd50..3317c1d 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/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/qmap/tst_qmap.cpp b/tests/auto/qmap/tst_qmap.cpp
index 99efc80..68ac8d6 100644
--- a/tests/auto/qmap/tst_qmap.cpp
+++ b/tests/auto/qmap/tst_qmap.cpp
@@ -39,6 +39,7 @@
**
****************************************************************************/
+#define QT_STRICT_ITERATORS
#include <QtTest/QtTest>
#include <QDebug>
@@ -400,7 +401,7 @@ void tst_QMap::operator_eq()
QVERIFY(a == b);
QVERIFY(!(a != b));
-
+
a.insert(1,1);
b.insert(1,1);
QVERIFY(a == b);
@@ -422,7 +423,7 @@ void tst_QMap::operator_eq()
b.insert(-1, -1);
QVERIFY(a != b);
- QVERIFY(!(a == b));
+ QVERIFY(!(a == b));
}
{
@@ -468,7 +469,7 @@ void tst_QMap::operator_eq()
b.insert("willy", 1);
QVERIFY(a != b);
QVERIFY(!(a == b));
- }
+ }
}
void tst_QMap::empty()
@@ -523,9 +524,9 @@ void tst_QMap::find()
map1.insertMulti(4, compareString);
}
- QMap<int, QString>::const_iterator it=map1.find(4);
+ QMap<int, QString>::const_iterator it=map1.constFind(4);
- for(i = 9; i > 2 && it != map1.end() && it.key() == 4; --i) {
+ for(i = 9; i > 2 && it != map1.constEnd() && it.key() == 4; --i) {
compareString = testString.arg(i);
QVERIFY(it.value() == compareString);
++it;
@@ -546,9 +547,9 @@ void tst_QMap::constFind()
map1.insert(1,"Mensch");
map1.insert(1,"Mayer");
map1.insert(2,"Hej");
-
+
QVERIFY(map1.constFind(4) == map1.constEnd());
-
+
QVERIFY(map1.constFind(1).value() == "Mayer");
QVERIFY(map1.constFind(2).value() == "Hej");
@@ -677,7 +678,7 @@ void tst_QMap::iterators()
cstlIt--;
QVERIFY(cstlIt.value() == "Teststring 3");
- for(cstlIt = map.begin(), i = 1; cstlIt != map.constEnd(), i < 100; ++cstlIt, ++i)
+ for(cstlIt = map.constBegin(), i = 1; cstlIt != map.constEnd(), i < 100; ++cstlIt, ++i)
QVERIFY(cstlIt.value() == testString.arg(i));
//Java-Style iterators
diff --git a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
index 68ec414..90276f2 100644
--- a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
+++ b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp
@@ -100,8 +100,6 @@ private slots:
void receiveUrgentData();
};
-static const char *IMAP_IP = "62.70.27.18";
-
tst_QNativeSocketEngine::tst_QNativeSocketEngine()
{
}
@@ -155,15 +153,14 @@ 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(IMAP_IP), 143);
- if (!connected) {
+ const bool isConnected = socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143);
+ if (!isConnected) {
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
QVERIFY(socketDevice.waitForWrite());
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState);
}
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState);
- QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP));
+ QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP());
// Wait for the greeting
QVERIFY(socketDevice.waitForRead());
@@ -176,7 +173,7 @@ void tst_QNativeSocketEngine::simpleConnectToIMAP()
QVERIFY(socketDevice.read(array.data(), array.size()) == available);
// Check that the greeting is what we expect it to be
- QCOMPARE(array.constData(), "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n");
+ QCOMPARE(array.constData(), "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
// Write a logout message
QByteArray array2 = "ZZZ LOGOUT\r\n";
@@ -580,9 +577,8 @@ void tst_QNativeSocketEngine::networkError()
QVERIFY(client.initialize(QAbstractSocket::TcpSocket, QAbstractSocket::IPv4Protocol));
- // Connect to imap.trolltech.com's IP
- bool connected = client.connectToHost(QHostAddress(IMAP_IP), 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 6c622f7..b76a4e6 100644
--- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
+++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp
@@ -237,6 +237,8 @@ private Q_SLOTS:
void httpProxyCommands_data();
void httpProxyCommands();
void proxyChange();
+ void authorizationError_data();
+ void authorizationError();
};
QT_BEGIN_NAMESPACE
@@ -3134,7 +3136,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);
@@ -3189,7 +3192,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();
@@ -3512,5 +3516,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..aa80534 100644
--- a/tests/auto/qobjectrace/tst_qobjectrace.cpp
+++ b/tests/auto/qobjectrace/tst_qobjectrace.cpp
@@ -43,6 +43,7 @@
#include <QtCore>
#include <QtTest/QtTest>
+
enum { OneMinute = 60 * 1000, TwoMinutes = OneMinute * 2 };
class tst_QObjectRace: public QObject
@@ -50,6 +51,7 @@ class tst_QObjectRace: public QObject
Q_OBJECT
private slots:
void moveToThreadRace();
+ void destroyRace();
};
class RaceObject : public QObject
@@ -69,12 +71,18 @@ public:
public slots:
void theSlot()
{
- enum { step = 1000 };
+ enum { step = 35 };
if ((++count % step) == 0) {
QThread *nextThread = threads.at((count / step) % threads.size());
moveToThread(nextThread);
}
}
+
+ void destroSlot() {
+ emit theSignal();
+ }
+signals:
+ void theSignal();
};
class RaceThread : public QThread
@@ -119,6 +127,10 @@ private slots:
if (stopWatch.elapsed() >= OneMinute / 2)
#endif
quit();
+
+ QObject o;
+ connect(&o, SIGNAL(destroyed()) , object, SLOT(destroSlot()));
+ connect(object, SIGNAL(destroyed()) , &o, SLOT(deleteLater()));
}
};
@@ -137,15 +149,110 @@ void tst_QObjectRace::moveToThreadRace()
for (int i = 0; i < ThreadCount; ++i)
threads[i]->start();
- QVERIFY(threads[0]->wait(TwoMinutes));
+
+ while(!threads[0]->isFinished()) {
+ QPointer<RaceObject> foo (object);
+ QObject o;
+ connect(&o, SIGNAL(destroyed()) , object, SLOT(destroSlot()));
+ connect(object, SIGNAL(destroyed()) , &o, SLOT(deleteLater()));
+ QTest::qWait(10);
+ }
// the other threads should finish pretty quickly now
for (int i = 1; i < ThreadCount; ++i)
- QVERIFY(threads[i]->wait(30000));
+ QVERIFY(threads[i]->wait(300));
for (int i = 0; i < ThreadCount; ++i)
delete threads[i];
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/qpixmapcache/tst_qpixmapcache.cpp b/tests/auto/qpixmapcache/tst_qpixmapcache.cpp
index 1f515ff..405ac34 100644
--- a/tests/auto/qpixmapcache/tst_qpixmapcache.cpp
+++ b/tests/auto/qpixmapcache/tst_qpixmapcache.cpp
@@ -44,9 +44,7 @@
#include <qpixmapcache.h>
-
-
-
+#include "../../../src/gui/image/qpixmapcache_p.h"
//TESTED_CLASS=
@@ -68,10 +66,21 @@ private slots:
void setCacheLimit();
void find();
void insert();
+ void replace();
void remove();
void clear();
+ void pixmapKey();
};
+static QPixmapCache::KeyData* getPrivate(QPixmapCache::Key &key)
+{
+ return (*reinterpret_cast<QPixmapCache::KeyData**>(&key));
+}
+
+static QPixmapCache::KeyData** getPrivateRef(QPixmapCache::Key &key)
+{
+ return (reinterpret_cast<QPixmapCache::KeyData**>(&key));
+}
static int originalCacheLimit;
@@ -119,6 +128,72 @@ void tst_QPixmapCache::setCacheLimit()
QVERIFY(QPixmapCache::find("P1") != 0);
delete p1;
+
+ //The int part of the API
+ p1 = new QPixmap(2, 3);
+ QPixmapCache::Key key = QPixmapCache::insert(*p1);
+ QVERIFY(QPixmapCache::find(key, p1) != 0);
+ delete p1;
+
+ QPixmapCache::setCacheLimit(0);
+ QVERIFY(QPixmapCache::find(key, p1) == 0);
+
+ p1 = new QPixmap(2, 3);
+ QPixmapCache::setCacheLimit(1000);
+ QPixmapCache::replace(key, *p1);
+ QVERIFY(QPixmapCache::find(key, p1) == 0);
+
+ delete p1;
+
+ //Let check if keys are released when the pixmap cache is
+ //full or has been flushed.
+ QPixmapCache::clear();
+ p1 = new QPixmap(2, 3);
+ key = QPixmapCache::insert(*p1);
+ QVERIFY(QPixmapCache::find(key, p1) != 0);
+ QPixmapCache::setCacheLimit(0);
+ QVERIFY(QPixmapCache::find(key, p1) == 0);
+ QPixmapCache::setCacheLimit(1000);
+ key = QPixmapCache::insert(*p1);
+ QCOMPARE(getPrivate(key)->isValid, true);
+ QCOMPARE(getPrivate(key)->key, 1);
+
+ delete p1;
+
+ //Let check if removing old entries doesn't let you get
+ // wrong pixmaps
+ QPixmapCache::clear();
+ QPixmap p2;
+ p1 = new QPixmap(2, 3);
+ key = QPixmapCache::insert(*p1);
+ QVERIFY(QPixmapCache::find(key, &p2) != 0);
+ //we flush the cache
+ QPixmapCache::setCacheLimit(0);
+ QPixmapCache::setCacheLimit(1000);
+ QPixmapCache::Key key2 = QPixmapCache::insert(*p1);
+ QCOMPARE(getPrivate(key2)->key, 2);
+ QVERIFY(QPixmapCache::find(key, &p2) == 0);
+ QVERIFY(QPixmapCache::find(key2, &p2) != 0);
+ QCOMPARE(p2, *p1);
+
+ delete p1;
+
+ //Here we simulate the flushing when the app is idle
+ /*QPixmapCache::clear();
+ QPixmapCache::setCacheLimit(originalCacheLimit);
+ p1 = new QPixmap(300, 300);
+ key = QPixmapCache::insert(*p1);
+ QCOMPARE(getPrivate(key)->key, 1);
+ key2 = QPixmapCache::insert(*p1);
+ key2 = QPixmapCache::insert(*p1);
+ QPixmapCache::Key key3 = QPixmapCache::insert(*p1);
+ QTest::qWait(32000);
+ key2 = QPixmapCache::insert(*p1);
+ QCOMPARE(getPrivate(key2)->key, 1);
+ //This old key is not valid anymore after the flush
+ QCOMPARE(getPrivate(key)->isValid, false);
+ QVERIFY(QPixmapCache::find(key, &p2) == 0);
+ delete p1;*/
}
void tst_QPixmapCache::find()
@@ -137,6 +212,28 @@ void tst_QPixmapCache::find()
QPixmap *p3 = QPixmapCache::find("P1");
QVERIFY(p3);
QCOMPARE(p1, *p3);
+
+ //The int part of the API
+ QPixmapCache::Key key = QPixmapCache::insert(p1);
+
+ QVERIFY(QPixmapCache::find(key, &p2));
+ QCOMPARE(p2.width(), 10);
+ QCOMPARE(p2.height(), 10);
+ QCOMPARE(p1, p2);
+
+ QPixmapCache::clear();
+
+ key = QPixmapCache::insert(p1);
+
+ //The int part of the API
+ // make sure it doesn't explode
+ QList<QPixmapCache::Key> keys;
+ for (int i = 0; i < 40000; ++i)
+ QPixmapCache::insert(p1);
+
+ //at that time the first key has been erase because no more place in the cache
+ QVERIFY(QPixmapCache::find(key, &p1) == 0);
+ QCOMPARE(getPrivate(key)->isValid, false);
}
void tst_QPixmapCache::insert()
@@ -152,18 +249,22 @@ void tst_QPixmapCache::insert()
QPixmapCache::insert("0", p1);
// ditto
- for (int j = 0; j < 20000; ++j)
+ for (int j = 0; j < 40000; ++j)
QPixmapCache::insert(QString::number(j), p1);
int num = 0;
- for (int k = 0; k < 20000; ++k) {
+ for (int k = 0; k < 40000; ++k) {
if (QPixmapCache::find(QString::number(k)))
++num;
}
+ if (QPixmapCache::find("0"))
+ ++num;
+
int estimatedNum = (1024 * QPixmapCache::cacheLimit())
/ ((p1.width() * p1.height() * p1.depth()) / 8);
- QVERIFY(estimatedNum - 1 <= num <= estimatedNum + 1);
+
+ QVERIFY(num <= estimatedNum);
QPixmap p3;
QPixmapCache::insert("null", p3);
@@ -176,6 +277,50 @@ void tst_QPixmapCache::insert()
QPixmapCache::insert("custom", c2);
//We have deleted the old pixmap in the cache for the same key
QVERIFY(c1.isDetached());
+
+ //The int part of the API
+ // make sure it doesn't explode
+ QList<QPixmapCache::Key> keys;
+ for (int i = 0; i < 40000; ++i)
+ keys.append(QPixmapCache::insert(p1));
+
+ num = 0;
+ for (int k = 0; k < 40000; ++k) {
+ if (QPixmapCache::find(keys.at(k), &p2))
+ ++num;
+ }
+
+ estimatedNum = (1024 * QPixmapCache::cacheLimit())
+ / ((p1.width() * p1.height() * p1.depth()) / 8);
+ QVERIFY(num <= estimatedNum);
+ QPixmapCache::insert(p3);
+
+}
+
+void tst_QPixmapCache::replace()
+{
+ //The int part of the API
+ QPixmap p1(10, 10);
+ p1.fill(Qt::red);
+
+ QPixmap p2(10, 10);
+ p2.fill(Qt::yellow);
+
+ QPixmapCache::Key key = QPixmapCache::insert(p1);
+
+ QPixmap p3;
+ QVERIFY(QPixmapCache::find(key, &p3) == 1);
+
+ QPixmapCache::replace(key,p2);
+
+ QVERIFY(QPixmapCache::find(key, &p3) == 1);
+
+ QCOMPARE(p3.width(), 10);
+ QCOMPARE(p3.height(), 10);
+ QCOMPARE(p3, p2);
+
+ //Broken keys
+ QCOMPARE(QPixmapCache::replace(QPixmapCache::Key(), p2), false);
}
void tst_QPixmapCache::remove()
@@ -198,6 +343,40 @@ void tst_QPixmapCache::remove()
QPixmapCache::remove("green");
QVERIFY(QPixmapCache::find("green") == 0);
+
+ //The int part of the API
+ QPixmapCache::clear();
+ p1.fill(Qt::red);
+ QPixmapCache::Key key = QPixmapCache::insert(p1);
+ p1.fill(Qt::yellow);
+
+ QVERIFY(QPixmapCache::find(key, &p2));
+ QVERIFY(p1.toImage() != p2.toImage());
+ QVERIFY(p1.toImage() == p1.toImage()); // sanity check
+
+ QPixmapCache::remove(key);
+ QVERIFY(QPixmapCache::find(key, &p1) == 0);
+
+ //Broken key
+ QPixmapCache::remove(QPixmapCache::Key());
+ QVERIFY(QPixmapCache::find(QPixmapCache::Key(), &p1) == 0);
+
+ //Test if keys are release
+ QPixmapCache::clear();
+ key = QPixmapCache::insert(p1);
+ QCOMPARE(getPrivate(key)->key, 1);
+ QPixmapCache::remove(key);
+ key = QPixmapCache::insert(p1);
+ QCOMPARE(getPrivate(key)->key, 1);
+
+ //We mix both part of the API
+ QPixmapCache::clear();
+ p1.fill(Qt::red);
+ QPixmapCache::insert("red", p1);
+ key = QPixmapCache::insert(p1);
+ QPixmapCache::remove(key);
+ QVERIFY(QPixmapCache::find(key, &p1) == 0);
+ QVERIFY(QPixmapCache::find("red") != 0);
}
void tst_QPixmapCache::clear()
@@ -205,12 +384,11 @@ void tst_QPixmapCache::clear()
QPixmap p1(10, 10);
p1.fill(Qt::red);
- for (int i = 0; i < 20000; ++i) {
+ for (int i = 0; i < 20000; ++i)
QVERIFY(QPixmapCache::find("x" + QString::number(i)) == 0);
- }
- for (int j = 0; j < 20000; ++j) {
+
+ for (int j = 0; j < 20000; ++j)
QPixmapCache::insert(QString::number(j), p1);
- }
int num = 0;
for (int k = 0; k < 20000; ++k) {
@@ -221,10 +399,68 @@ void tst_QPixmapCache::clear()
QPixmapCache::clear();
- for (int k = 0; k < 20000; ++k) {
+ for (int k = 0; k < 20000; ++k)
QVERIFY(QPixmapCache::find(QString::number(k)) == 0);
+
+ //The int part of the API
+ QPixmap p2(10, 10);
+ p2.fill(Qt::red);
+
+ QList<QPixmapCache::Key> keys;
+ for (int k = 0; k < 20000; ++k)
+ keys.append(QPixmapCache::insert(p2));
+
+ QPixmapCache::clear();
+
+ for (int k = 0; k < 20000; ++k) {
+ QVERIFY(QPixmapCache::find(keys.at(k), &p1) == 0);
+ QCOMPARE(getPrivate(keys[k])->isValid, false);
}
}
+void tst_QPixmapCache::pixmapKey()
+{
+ QPixmapCache::Key key;
+ //Default constructed keys have no d pointer unless
+ //we use them
+ QVERIFY(!getPrivate(key));
+ //Let's put a d pointer
+ QPixmapCache::KeyData** keyd = getPrivateRef(key);
+ *keyd = new QPixmapCache::KeyData;
+ QCOMPARE(getPrivate(key)->ref, 1);
+ QPixmapCache::Key key2;
+ //Let's put a d pointer
+ QPixmapCache::KeyData** key2d = getPrivateRef(key2);
+ *key2d = new QPixmapCache::KeyData;
+ QCOMPARE(getPrivate(key2)->ref, 1);
+ key = key2;
+ QCOMPARE(getPrivate(key2)->ref, 2);
+ QCOMPARE(getPrivate(key)->ref, 2);
+ QPixmapCache::Key key3;
+ //Let's put a d pointer
+ QPixmapCache::KeyData** key3d = getPrivateRef(key3);
+ *key3d = new QPixmapCache::KeyData;
+ QPixmapCache::Key key4 = key3;
+ QCOMPARE(getPrivate(key3)->ref, 2);
+ QCOMPARE(getPrivate(key4)->ref, 2);
+ key4 = key;
+ QCOMPARE(getPrivate(key4)->ref, 3);
+ QCOMPARE(getPrivate(key3)->ref, 1);
+ QPixmapCache::Key key5(key3);
+ QCOMPARE(getPrivate(key3)->ref, 2);
+ QCOMPARE(getPrivate(key5)->ref, 2);
+
+ //let test default constructed keys
+ QPixmapCache::Key key6;
+ QVERIFY(!getPrivate(key6));
+ QPixmapCache::Key key7;
+ QVERIFY(!getPrivate(key7));
+ key6 = key7;
+ QVERIFY(!getPrivate(key6));
+ QVERIFY(!getPrivate(key7));
+ QPixmapCache::Key key8(key7);
+ QVERIFY(!getPrivate(key8));
+}
+
QTEST_MAIN(tst_QPixmapCache)
#include "tst_qpixmapcache.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/qscriptqobject/tst_qscriptqobject.cpp b/tests/auto/qscriptqobject/tst_qscriptqobject.cpp
index 9b9dd16..1025d2a 100644
--- a/tests/auto/qscriptqobject/tst_qscriptqobject.cpp
+++ b/tests/auto/qscriptqobject/tst_qscriptqobject.cpp
@@ -107,6 +107,7 @@ class MyQObject : public QObject
Q_PROPERTY(int readOnlyProperty READ readOnlyProperty)
Q_PROPERTY(QKeySequence shortcut READ shortcut WRITE setShortcut)
Q_PROPERTY(CustomType propWithCustomType READ propWithCustomType WRITE setPropWithCustomType)
+ Q_PROPERTY(Policy enumProperty READ enumProperty WRITE setEnumProperty)
Q_ENUMS(Policy Strategy)
Q_FLAGS(Ability)
@@ -144,6 +145,7 @@ public:
m_hiddenValue(456.0),
m_writeOnlyValue(789),
m_readOnlyValue(987),
+ m_enumValue(BarPolicy),
m_qtFunctionInvoked(-1)
{ }
@@ -205,6 +207,11 @@ public:
void setPropWithCustomType(const CustomType &c)
{ m_customType = c; }
+ Policy enumProperty() const
+ { return m_enumValue; }
+ void setEnumProperty(Policy policy)
+ { m_enumValue = policy; }
+
int qtFunctionInvoked() const
{ return m_qtFunctionInvoked; }
@@ -255,8 +262,8 @@ public:
{ m_qtFunctionInvoked = 36; m_actuals << policy; }
Q_INVOKABLE Policy myInvokableReturningEnum()
{ m_qtFunctionInvoked = 37; return BazPolicy; }
- Q_INVOKABLE MyQObject::Policy myInvokableReturningQualifiedEnum()
- { m_qtFunctionInvoked = 38; return BazPolicy; }
+ Q_INVOKABLE MyQObject::Strategy myInvokableReturningQualifiedEnum()
+ { m_qtFunctionInvoked = 38; return BazStrategy; }
Q_INVOKABLE QVector<int> myInvokableReturningVectorOfInt()
{ m_qtFunctionInvoked = 11; return QVector<int>(); }
Q_INVOKABLE void myInvokableWithVectorOfIntArg(const QVector<int> &)
@@ -410,6 +417,7 @@ protected:
int m_readOnlyValue;
QKeySequence m_shortcut;
CustomType m_customType;
+ Policy m_enumValue;
int m_qtFunctionInvoked;
QVariantList m_actuals;
QByteArray m_connectedSignal;
@@ -417,6 +425,7 @@ protected:
};
Q_DECLARE_METATYPE(MyQObject*)
+Q_DECLARE_METATYPE(MyQObject::Policy)
class MyOtherQObject : public MyQObject
{
@@ -530,6 +539,24 @@ static QScriptValue getSetProperty(QScriptContext *ctx, QScriptEngine *)
return ctx->callee().property("value");
}
+static QScriptValue policyToScriptValue(QScriptEngine *engine, const MyQObject::Policy &policy)
+{
+ return qScriptValueFromValue(engine, policy);
+}
+
+static void policyFromScriptValue(const QScriptValue &value, MyQObject::Policy &policy)
+{
+ QString str = value.toString();
+ if (str == QLatin1String("red"))
+ policy = MyQObject::FooPolicy;
+ else if (str == QLatin1String("green"))
+ policy = MyQObject::BarPolicy;
+ else if (str == QLatin1String("blue"))
+ policy = MyQObject::BazPolicy;
+ else
+ policy = (MyQObject::Policy)-1;
+}
+
void tst_QScriptExtQObject::getSetStaticProperty()
{
QCOMPARE(m_engine->evaluate("myObject.noSuchProperty").isUndefined(), true);
@@ -751,6 +778,31 @@ void tst_QScriptExtQObject::getSetStaticProperty()
QScriptValue::ReadOnly);
}
+ // enum property
+ QCOMPARE(m_myObject->enumProperty(), MyQObject::BarPolicy);
+ {
+ QScriptValue val = m_engine->evaluate("myObject.enumProperty");
+ QVERIFY(val.isNumber());
+ QCOMPARE(val.toInt32(), (int)MyQObject::BarPolicy);
+ }
+ m_engine->evaluate("myObject.enumProperty = 2");
+ QCOMPARE(m_myObject->enumProperty(), MyQObject::BazPolicy);
+ m_engine->evaluate("myObject.enumProperty = 'BarPolicy'");
+ QCOMPARE(m_myObject->enumProperty(), MyQObject::BarPolicy);
+ m_engine->evaluate("myObject.enumProperty = 'ScoobyDoo'");
+ // ### ouch! Shouldn't QMetaProperty::write() rather not change the value...?
+ QCOMPARE(m_myObject->enumProperty(), (MyQObject::Policy)-1);
+ // enum property with custom conversion
+ qScriptRegisterMetaType<MyQObject::Policy>(m_engine, policyToScriptValue, policyFromScriptValue);
+ m_engine->evaluate("myObject.enumProperty = 'red'");
+ QCOMPARE(m_myObject->enumProperty(), MyQObject::FooPolicy);
+ m_engine->evaluate("myObject.enumProperty = 'green'");
+ QCOMPARE(m_myObject->enumProperty(), MyQObject::BarPolicy);
+ m_engine->evaluate("myObject.enumProperty = 'blue'");
+ QCOMPARE(m_myObject->enumProperty(), MyQObject::BazPolicy);
+ m_engine->evaluate("myObject.enumProperty = 'nada'");
+ QCOMPARE(m_myObject->enumProperty(), (MyQObject::Policy)-1);
+
// auto-dereferencing of pointers
{
QBrush b = QColor(0xCA, 0xFE, 0xBA, 0xBE);
@@ -1879,6 +1931,16 @@ void tst_QScriptExtQObject::classEnums()
QCOMPARE(m_myObject->qtFunctionActuals().at(0).toInt(), int(MyQObject::BazPolicy));
m_myObject->resetQtFunctionInvoked();
+ QCOMPARE(m_engine->evaluate("myObject.myInvokableWithEnumArg('BarPolicy')").isUndefined(), true);
+ QCOMPARE(m_myObject->qtFunctionInvoked(), 10);
+ QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
+ QCOMPARE(m_myObject->qtFunctionActuals().at(0).toInt(), int(MyQObject::BarPolicy));
+
+ m_myObject->resetQtFunctionInvoked();
+ QVERIFY(m_engine->evaluate("myObject.myInvokableWithEnumArg('NoSuchPolicy')").isError());
+ QCOMPARE(m_myObject->qtFunctionInvoked(), -1);
+
+ m_myObject->resetQtFunctionInvoked();
QCOMPARE(m_engine->evaluate("myObject.myInvokableWithQualifiedEnumArg(MyQObject.BazPolicy)").isUndefined(), true);
QCOMPARE(m_myObject->qtFunctionInvoked(), 36);
QCOMPARE(m_myObject->qtFunctionActuals().size(), 1);
diff --git a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
index 64439fb..a52bb3e 100644
--- a/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
+++ b/tests/auto/qsharedpointer/tst_qsharedpointer.cpp
@@ -57,8 +57,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();
@@ -321,6 +324,10 @@ class DiffPtrDerivedData: public Stuffing, public Data
{
};
+class VirtualDerived: virtual public Data
+{
+};
+
void tst_QSharedPointer::downCast()
{
{
@@ -439,7 +446,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);
@@ -453,7 +460,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;
@@ -464,23 +471,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);
@@ -490,6 +527,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);
@@ -498,6 +536,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 86333e0..5ab5064 100644
--- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
+++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp
@@ -145,8 +145,6 @@ private slots:
}
};
-static const char *IMAP_IP = "62.70.27.18";
-
tst_QSocks5SocketEngine::tst_QSocks5SocketEngine()
{
}
@@ -321,12 +319,11 @@ void tst_QSocks5SocketEngine::simpleConnectToIMAP()
socketDevice.setProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080));
- // Connect to imap.trolltech.com's IP
- QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143));
+ QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143));
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
QVERIFY(socketDevice.waitForWrite());
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState);
- QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP));
+ QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP());
// Wait for the greeting
QVERIFY(socketDevice.waitForRead());
@@ -340,7 +337,7 @@ void tst_QSocks5SocketEngine::simpleConnectToIMAP()
// Check that the greeting is what we expect it to be
QCOMPARE(array.constData(),
- "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n");
+ "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
// Write a logout message
QByteArray array2 = "XXXX LOGOUT\r\n";
@@ -589,14 +586,14 @@ void tst_QSocks5SocketEngine::tcpSocketBlockingTest()
QTcpSocket socket;
// Connect
- socket.connectToHost("imap.troll.no", 143);
+ socket.connectToHost(QtNetworkSettings::serverName(), 143);
QVERIFY(socket.waitForConnected());
QCOMPARE(socket.state(), QTcpSocket::ConnectedState);
// Read greeting
QVERIFY(socket.waitForReadyRead(5000));
QString s = socket.readLine();
- QCOMPARE(s.toLatin1().constData(), "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n");
+ QCOMPARE(s.toLatin1().constData(), "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
// Write NOOP
QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8);
@@ -646,7 +643,7 @@ void tst_QSocks5SocketEngine::tcpSocketNonBlockingTest()
tcpSocketNonBlocking_socket = &socket;
// Connect
- socket.connectToHost("imap.troll.no", 143);
+ socket.connectToHost(QtNetworkSettings::serverName(), 143);
QCOMPARE(socket.state(), QTcpSocket::HostLookupState);
QTestEventLoop::instance().enterLoop(30);
@@ -671,7 +668,7 @@ void tst_QSocks5SocketEngine::tcpSocketNonBlockingTest()
// Read greeting
QVERIFY(!tcpSocketNonBlocking_data.isEmpty());
QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(),
- "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n");
+ "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
tcpSocketNonBlocking_data.clear();
tcpSocketNonBlocking_totalWritten = 0;
@@ -798,14 +795,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;
@@ -819,7 +816,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();
}
@@ -834,15 +834,14 @@ void tst_QSocks5SocketEngine::passwordAuth()
socketDevice.setProxy(QNetworkProxy(QNetworkProxy::Socks5Proxy, QtNetworkSettings::serverName(), 1080, "qsockstest", "password"));
- // Connect to imap.trolltech.com's IP
- QVERIFY(!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143));
+ QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143));
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
QVERIFY(socketDevice.waitForWrite());
- if (!socketDevice.connectToHost(QHostAddress(IMAP_IP), 143)) {
+ if (!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143)) {
qDebug("%d, %s", socketDevice.error(), socketDevice.errorString().toLatin1().constData());
}
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState);
- QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP));
+ QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP());
// Wait for the greeting
QVERIFY(socketDevice.waitForRead());
@@ -856,7 +855,7 @@ void tst_QSocks5SocketEngine::passwordAuth()
// Check that the greeting is what we expect it to be
QCOMPARE(array.constData(),
- "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n");
+ "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
// Write a logout message
QByteArray array2 = "XXXX LOGOUT\r\n";
@@ -902,17 +901,16 @@ 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(IMAP_IP), 143));
+ QVERIFY(!socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143));
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectingState);
while (socketDevice.state() == QAbstractSocket::ConnectingState) {
QVERIFY(socketDevice.waitForWrite());
- socketDevice.connectToHost(QHostAddress(IMAP_IP), 143);
+ socketDevice.connectToHost(QtNetworkSettings::serverIP(), 143);
}
if (socketDevice.state() != QAbstractSocket::ConnectedState)
qDebug("%d, %s", socketDevice.error(), socketDevice.errorString().toLatin1().constData());
QVERIFY(socketDevice.state() == QAbstractSocket::ConnectedState);
- QVERIFY(socketDevice.peerAddress() == QHostAddress(IMAP_IP));
+ QVERIFY(socketDevice.peerAddress() == QtNetworkSettings::serverIP());
// Wait for the greeting
QVERIFY(socketDevice.waitForRead());
@@ -926,7 +924,7 @@ void tst_QSocks5SocketEngine::passwordAuth2()
// Check that the greeting is what we expect it to be
QCOMPARE(array.constData(),
- "* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n");
+ "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n");
// Write a logout message
QByteArray array2 = "XXXX LOGOUT\r\n";
diff --git a/tests/auto/qspinbox/tst_qspinbox.cpp b/tests/auto/qspinbox/tst_qspinbox.cpp
index 1867356..575f261 100644
--- a/tests/auto/qspinbox/tst_qspinbox.cpp
+++ b/tests/auto/qspinbox/tst_qspinbox.cpp
@@ -241,6 +241,12 @@ void tst_QSpinBox::getSetCheck()
QCOMPARE(0.0, obj2.value());
obj2.setValue(1.0);
QCOMPARE(1.0, obj2.value());
+
+ // Make sure we update line edit geometry when updating
+ // buttons - see task 235747
+ QRect oldEditGeometry = obj1.childrenRect();
+ obj1.setButtonSymbols(QAbstractSpinBox::NoButtons);
+ QVERIFY(obj1.childrenRect() != oldEditGeometry);
}
tst_QSpinBox::tst_QSpinBox()
diff --git a/tests/auto/qsplitter/tst_qsplitter.cpp b/tests/auto/qsplitter/tst_qsplitter.cpp
index 33404e4..5fa0286 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/qsslsocket/qsslsocket.pro b/tests/auto/qsslsocket/qsslsocket.pro
index 147b40d..c29fc68 100644
--- a/tests/auto/qsslsocket/qsslsocket.pro
+++ b/tests/auto/qsslsocket/qsslsocket.pro
@@ -7,6 +7,12 @@ QT -= gui
TARGET = tst_qsslsocket
+!wince* {
+DEFINES += SRCDIR=\\\"$$PWD/\\\"
+} else {
+DEFINES += SRCDIR=\\\"./\\\"
+}
+
win32 {
CONFIG(debug, debug|release) {
DESTDIR = debug
diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp
index 432092a..40840bd 100644
--- a/tests/auto/qsslsocket/tst_qsslsocket.cpp
+++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp
@@ -416,7 +416,7 @@ void tst_QSslSocket::simpleConnect()
connect(&socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(exitLoop()));
// Start connecting
- socket.connectToHost("imap.troll.no", 993);
+ socket.connectToHost(QtNetworkSettings::serverName(), 993);
QCOMPARE(socket.state(), QAbstractSocket::HostLookupState);
enterLoop(10);
@@ -471,7 +471,7 @@ void tst_QSslSocket::simpleConnectWithIgnore()
connect(&socket, SIGNAL(sslErrors(const QList<QSslError> &)), this, SLOT(exitLoop()));
// Start connecting
- socket.connectToHost("imap.troll.no", 993);
+ socket.connectToHost(QtNetworkSettings::serverName(), 993);
QCOMPARE(socket.state(), QAbstractSocket::HostLookupState);
enterLoop(10);
@@ -490,7 +490,7 @@ void tst_QSslSocket::simpleConnectWithIgnore()
if (!socket.canReadLine())
enterLoop(10);
- QCOMPARE(socket.readAll(), QByteArray("* OK esparsett Cyrus IMAP4 v2.2.8 server ready\r\n"));
+ QCOMPARE(socket.readAll(), QByteArray("* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"));
socket.disconnectFromHost();
}
@@ -499,36 +499,39 @@ void tst_QSslSocket::sslErrors_data()
{
QTest::addColumn<QString>("host");
QTest::addColumn<int>("port");
- QTest::addColumn<SslErrorList>("errors");
-
- QTest::newRow("imap.troll.no") << "imap.troll.no" << 993
- << (SslErrorList()
- << QSslError::HostNameMismatch
- << QSslError::SelfSignedCertificateInChain);
- QTest::newRow("imap.trolltech.com") << "imap.trolltech.com" << 993
- << (SslErrorList()
- << QSslError::SelfSignedCertificateInChain);
+ 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())
- list << error.error();
+ output << error.error();
#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
- if (list.last() == QSslError::CertificateUntrusted)
- list.takeLast();
+ if (output.last() == QSslError::CertificateUntrusted)
+ output.takeLast();
#endif
- QCOMPARE(list, errors);
+ QCOMPARE(output, expected);
}
void tst_QSslSocket::addCaCertificate()
@@ -575,7 +578,7 @@ void tst_QSslSocket::connectToHostEncrypted()
QSslSocketPtr socket = newSocket();
this->socket = socket;
- socket->addCaCertificates(QLatin1String("certs/qt-test-server-cacert.pem"));
+ QVERIFY(socket->addCaCertificates(QLatin1String(SRCDIR "certs/qt-test-server-cacert.pem")));
#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
connect(&socket, SIGNAL(sslErrors(QList<QSslError>)),
this, SLOT(untrustedWorkaroundSlot(QList<QSslError>)));
@@ -672,7 +675,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);
@@ -733,7 +736,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);
@@ -816,7 +819,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());
@@ -847,13 +850,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());
@@ -954,7 +957,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()));
@@ -1038,7 +1041,7 @@ void tst_QSslSocket::wildcard()
// responds with the wildcard, and QSslSocket should accept that as a
// valid connection. This was broken in 4.3.0.
QSslSocketPtr socket = newSocket();
- socket->addCaCertificates(QLatin1String("certs/qt-test-server-cacert.pem"));
+ socket->addCaCertificates(QLatin1String(SRCDIR "certs/qt-test-server-cacert.pem"));
this->socket = socket;
#ifdef QSSLSOCKET_CERTUNTRUSTED_WORKAROUND
connect(socket, SIGNAL(sslErrors(QList<QSslError>)),
@@ -1064,7 +1067,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());
@@ -1223,13 +1226,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());
@@ -1389,8 +1392,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();
}
@@ -1513,7 +1516,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()));
@@ -1526,7 +1529,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/qtcpserver/tst_qtcpserver.cpp b/tests/auto/qtcpserver/tst_qtcpserver.cpp
index 50b293d..4fd1827 100644
--- a/tests/auto/qtcpserver/tst_qtcpserver.cpp
+++ b/tests/auto/qtcpserver/tst_qtcpserver.cpp
@@ -364,7 +364,7 @@ void tst_QTcpServer::ipv6LoopbackPerformanceTest()
void tst_QTcpServer::ipv4PerformanceTest()
{
QTcpSocket probeSocket;
- probeSocket.connectToHost("imap.troll.no", 143);
+ probeSocket.connectToHost(QtNetworkSettings::serverName(), 143);
QVERIFY(probeSocket.waitForConnected(5000));
QTcpServer server;
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/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp
index efdaaec..23ead01 100644
--- a/tests/auto/qwidget/tst_qwidget.cpp
+++ b/tests/auto/qwidget/tst_qwidget.cpp
@@ -8412,6 +8412,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/selftests/expected_xunit.txt b/tests/auto/selftests/expected_xunit.txt
index 875dda6..cb74491 100644
--- a/tests/auto/selftests/expected_xunit.txt
+++ b/tests/auto/selftests/expected_xunit.txt
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<testsuite errors="3" failures="2" tests="6" name="tst_Xunit">
+<testsuite errors="5" failures="3" tests="9" name="tst_Xunit">
<properties>
<property value="4.6.0" name="QTestVersion"/>
<property value="4.6.0" name="QtVersion"/>
@@ -20,10 +20,21 @@
<testcase result="fail" name="testFunc4">
<failure message="a forced failure!" result="fail"/>
</testcase>
+ <testcase result="xfail" name="testFunc5">
+ <!-- message="this failure is expected" type="info" -->
+ </testcase>
+ <testcase result="xfail" name="testFunc6">
+ <!-- message="this failure is also expected" type="info" -->
+ </testcase>
+ <testcase result="xpass" name="testFunc7">
+ <failure message="&apos;true&apos; returned FALSE. ()" result="xpass"/>
+ </testcase>
<testcase result="pass" name="cleanupTestCase"/>
<system-err>
<![CDATA[just a QWARN() !]]>
<![CDATA[a qDebug() call with comment-ending stuff -->]]>
<![CDATA[skipping this function!]]>
+<![CDATA[this failure is expected]]>
+<![CDATA[this failure is also expected]]>
</system-err>
</testsuite>
diff --git a/tests/auto/selftests/xunit/tst_xunit.cpp b/tests/auto/selftests/xunit/tst_xunit.cpp
index dbe9fec..c3c90ab 100644
--- a/tests/auto/selftests/xunit/tst_xunit.cpp
+++ b/tests/auto/selftests/xunit/tst_xunit.cpp
@@ -53,6 +53,9 @@ private slots:
void testFunc2();
void testFunc3();
void testFunc4();
+ void testFunc5();
+ void testFunc6();
+ void testFunc7();
};
tst_Xunit::tst_Xunit()
@@ -81,6 +84,32 @@ void tst_Xunit::testFunc4()
QFAIL("a forced failure!");
}
+/*
+ Note there are two testfunctions which give expected failures.
+ This is so we can test that expected failures don't add to failure
+ counts and unexpected passes do. If we had one xfail and one xpass
+ testfunction, we couldn't test which one of them adds to the failure
+ count.
+*/
+
+void tst_Xunit::testFunc5()
+{
+ QEXPECT_FAIL("", "this failure is expected", Abort);
+ QVERIFY(false);
+}
+
+void tst_Xunit::testFunc6()
+{
+ QEXPECT_FAIL("", "this failure is also expected", Abort);
+ QVERIFY(false);
+}
+
+void tst_Xunit::testFunc7()
+{
+ QEXPECT_FAIL("", "this pass is unexpected", Abort);
+ QVERIFY(true);
+}
+
QTEST_APPLESS_MAIN(tst_Xunit)
#include "tst_xunit.moc"
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
index 3aef69f..e21e5a3 100644
--- a/tests/auto/utf8/tst_utf8.cpp
+++ b/tests/auto/utf8/tst_utf8.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 test suite of the Qt Toolkit.
diff --git a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp
index a293de4..a06e033 100644
--- a/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/benchmarks/qgraphicsview/tst_qgraphicsview.cpp
@@ -705,7 +705,6 @@ public:
QGraphicsPixmapItem::paint(painter,option,widget);
//We just want to wait, and we don't want to process the event loop with qWait
QTest::qSleep(3);
-
}
protected:
void advance(int i)
diff --git a/tests/benchmarks/qpixmapcache/qpixmapcache.pro b/tests/benchmarks/qpixmapcache/qpixmapcache.pro
new file mode 100644
index 0000000..e0d7543
--- /dev/null
+++ b/tests/benchmarks/qpixmapcache/qpixmapcache.pro
@@ -0,0 +1,6 @@
+load(qttest_p4)
+TEMPLATE = app
+TARGET = tst_qpixmapcache
+TEMPLATE = app
+# Input
+SOURCES += tst_qpixmapcache.cpp
diff --git a/tests/benchmarks/qpixmapcache/tst_qpixmapcache.cpp b/tests/benchmarks/qpixmapcache/tst_qpixmapcache.cpp
new file mode 100644
index 0000000..f3c1134
--- /dev/null
+++ b/tests/benchmarks/qpixmapcache/tst_qpixmapcache.cpp
@@ -0,0 +1,226 @@
+/****************************************************************************
+**
+** 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 <qtest.h>
+#include <QPixmapCache>
+//TESTED_FILES=
+
+class tst_QPixmapCache : public QObject
+{
+ Q_OBJECT
+
+public:
+ tst_QPixmapCache();
+ virtual ~tst_QPixmapCache();
+
+public slots:
+ void init();
+ void cleanup();
+
+private slots:
+ void insert_data();
+ void insert();
+ void find_data();
+ void find();
+ void styleUseCaseComplexKey();
+ void styleUseCaseComplexKey_data();
+};
+
+tst_QPixmapCache::tst_QPixmapCache()
+{
+}
+
+tst_QPixmapCache::~tst_QPixmapCache()
+{
+}
+
+void tst_QPixmapCache::init()
+{
+}
+
+void tst_QPixmapCache::cleanup()
+{
+}
+
+void tst_QPixmapCache::insert_data()
+{
+ QTest::addColumn<bool>("cacheType");
+ QTest::newRow("QPixmapCache") << true;
+ QTest::newRow("QPixmapCache (int API)") << false;
+}
+
+QList<QPixmapCache::Key> keys;
+
+void tst_QPixmapCache::insert()
+{
+ QFETCH(bool, cacheType);
+ QPixmap p;
+ if (cacheType) {
+ QBENCHMARK {
+ for (int i = 0 ; i <= 10000 ; i++)
+ {
+ QString tmp;
+ tmp.sprintf("my-key-%d", i);
+ QPixmapCache::insert(tmp, p);
+ }
+ }
+ } else {
+ QBENCHMARK {
+ for (int i = 0 ; i <= 10000 ; i++)
+ keys.append(QPixmapCache::insert(p));
+ }
+ }
+}
+
+void tst_QPixmapCache::find_data()
+{
+ QTest::addColumn<bool>("cacheType");
+ QTest::newRow("QPixmapCache") << true;
+ QTest::newRow("QPixmapCache (int API)") << false;
+}
+
+void tst_QPixmapCache::find()
+{
+ QFETCH(bool, cacheType);
+ QPixmap p;
+ if (cacheType) {
+ QBENCHMARK {
+ QString tmp;
+ for (int i = 0 ; i <= 10000 ; i++)
+ {
+ tmp.sprintf("my-key-%d", i);
+ QPixmapCache::find(tmp, p);
+ }
+ }
+ } else {
+ QBENCHMARK {
+ for (int i = 0 ; i <= 10000 ; i++)
+ QPixmapCache::find(keys.at(i), &p);
+ }
+ }
+
+}
+
+void tst_QPixmapCache::styleUseCaseComplexKey_data()
+{
+ QTest::addColumn<bool>("cacheType");
+ QTest::newRow("QPixmapCache") << true;
+ QTest::newRow("QPixmapCache (int API)") << false;
+}
+
+struct styleStruct {
+ QString key;
+ uint state;
+ uint direction;
+ uint complex;
+ uint palette;
+ int width;
+ int height;
+ bool operator==(const styleStruct &str) const
+ {
+ return str.key == key && str.state == state && str.direction == direction
+ && str.complex == complex && str.palette == palette && str.width == width
+ && str.height == height;
+ }
+};
+
+uint qHash(const styleStruct &myStruct)
+{
+ return qHash(myStruct.state);
+}
+
+void tst_QPixmapCache::styleUseCaseComplexKey()
+{
+ QFETCH(bool, cacheType);
+ QPixmap p;
+ if (cacheType) {
+ QBENCHMARK {
+ for (int i = 0 ; i <= 10000 ; i++)
+ {
+ QString tmp;
+ tmp.sprintf("%s-%d-%d-%d-%d-%d-%d", QString("my-progressbar-%1").arg(i).toLatin1().constData(), 5, 3, 0, 358, 100, 200);
+ QPixmapCache::insert(tmp, p);
+ }
+
+ for (int i = 0 ; i <= 10000 ; i++)
+ {
+ QString tmp;
+ tmp.sprintf("%s-%d-%d-%d-%d-%d-%d", QString("my-progressbar-%1").arg(i).toLatin1().constData(), 5, 3, 0, 358, 100, 200);
+ QPixmapCache::find(tmp, p);
+ }
+ }
+ } else {
+ QHash<styleStruct, QPixmapCache::Key> hash;
+ QBENCHMARK {
+ for (int i = 0 ; i <= 10000 ; i++)
+ {
+ styleStruct myStruct;
+ myStruct.key = QString("my-progressbar-%1").arg(i);
+ myStruct.key = 5;
+ myStruct.key = 4;
+ myStruct.key = 3;
+ myStruct.palette = 358;
+ myStruct.width = 100;
+ myStruct.key = 200;
+ QPixmapCache::Key key = QPixmapCache::insert(p);
+ hash.insert(myStruct, key);
+ }
+ for (int i = 0 ; i <= 10000 ; i++)
+ {
+ styleStruct myStruct;
+ myStruct.key = QString("my-progressbar-%1").arg(i);
+ myStruct.key = 5;
+ myStruct.key = 4;
+ myStruct.key = 3;
+ myStruct.palette = 358;
+ myStruct.width = 100;
+ myStruct.key = 200;
+ QPixmapCache::Key key = hash.value(myStruct);
+ QPixmapCache::find(key, &p);
+ }
+ }
+ }
+
+}
+
+
+QTEST_MAIN(tst_QPixmapCache)
+#include "tst_qpixmapcache.moc"
diff --git a/tools/assistant/compat/mainwindow.cpp b/tools/assistant/compat/mainwindow.cpp
index 9f91f9b..5de0d3c 100644
--- a/tools/assistant/compat/mainwindow.cpp
+++ b/tools/assistant/compat/mainwindow.cpp
@@ -312,21 +312,14 @@ void MainWindow::about()
{
QMessageBox box(this);
- // TODO: Remove these variables for 4.6.0. Must keep this way for 4.5.x due to string freeze.
- QString edition;
- QString info;
- QString moreInfo;
-
box.setText(QString::fromLatin1("<center><img src=\":/trolltech/assistant/images/assistant-128.png\">"
"<h3>%1</h3>"
- "<p>Version %2 %3</p></center>"
- "<p>%4</p>"
- "<p>%5</p>"
+ "<p>Version %2</p></center>"
"<p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p>"
"<p>The program is provided AS IS with NO WARRANTY OF ANY KIND,"
" INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A"
" PARTICULAR PURPOSE.<p/>")
- .arg(tr("Qt Assistant")).arg(QLatin1String(QT_VERSION_STR)).arg(edition).arg(info).arg(moreInfo));
+ .arg(tr("Qt Assistant")).arg(QLatin1String(QT_VERSION_STR)));
box.setWindowTitle(tr("Qt Assistant"));
box.setIcon(QMessageBox::NoIcon);
box.exec();
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 cb10e3f..2b53f09 100644
--- a/tools/assistant/tools/assistant/mainwindow.cpp
+++ b/tools/assistant/tools/assistant/mainwindow.cpp
@@ -797,23 +797,16 @@ void MainWindow::showAboutDialog()
aboutDia.setPixmap(pix);
aboutDia.setWindowTitle(aboutDia.documentTitle());
} else {
- // TODO: Remove these variables for 4.6.0. Must keep this way for 4.5.x due to string freeze.
- QString edition;
- QString info;
- QString moreInfo;
-
QByteArray resources;
aboutDia.setText(QString::fromLatin1("<center>"
"<h3>%1</h3>"
- "<p>Version %2 %3</p></center>"
- "<p>%4</p>"
- "<p>%5</p>"
+ "<p>Version %2</p></center>"
"<p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)"
".</p><p>The program is provided AS IS with NO WARRANTY OF ANY KIND,"
" INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A"
" PARTICULAR PURPOSE.<p/>")
- .arg(tr("Qt Assistant")).arg(QLatin1String(QT_VERSION_STR))
- .arg(edition).arg(info).arg(moreInfo), resources);
+ .arg(tr("Qt Assistant")).arg(QLatin1String(QT_VERSION_STR)),
+ resources);
QLatin1String path(":/trolltech/assistant/images/assistant-128.png");
aboutDia.setPixmap(QString(path));
}
@@ -926,25 +919,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 b0e7b53..8fd8c0a 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -350,6 +350,7 @@ Configure::Configure( int& argc, char** argv )
dictionary[ "QMAKESPEC" ] = tmp;
dictionary[ "INCREDIBUILD_XGE" ] = "auto";
+ dictionary[ "LTCG" ] = "no";
}
Configure::~Configure()
@@ -486,6 +487,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" ) {
@@ -1459,6 +1466,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 "
@@ -2441,6 +2451,8 @@ void Configure::generateCachefile()
else
configStream << " static";
+ if( dictionary[ "LTCG" ] == "yes" )
+ configStream << " ltcg";
if( dictionary[ "STL" ] == "yes" )
configStream << " stl";
if ( dictionary[ "EXCEPTIONS" ] == "yes" )
@@ -2862,6 +2874,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/designer/versiondialog.cpp b/tools/designer/src/designer/versiondialog.cpp
index c21912b..97dc5a1 100644
--- a/tools/designer/src/designer/versiondialog.cpp
+++ b/tools/designer/src/designer/versiondialog.cpp
@@ -172,15 +172,11 @@ VersionDialog::VersionDialog(QWidget *parent)
version = version.arg(tr("Qt Designer")).arg(QLatin1String(QT_VERSION_STR));
version.append(tr("<br/>Qt Designer is a graphical user interface designer for Qt applications.<br/>"));
- // TODO: Remove this variable for 4.6.0. Must keep this way for 4.5.x due to string freeze
- QString edition;
-
lbl->setText(tr("%1"
- "<br/>%2"
"<br/>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)."
"<br/><br/>The program is provided AS IS with NO WARRANTY OF ANY KIND,"
" INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A"
- " PARTICULAR PURPOSE.<br/> ").arg(version).arg(edition));
+ " PARTICULAR PURPOSE.<br/> ").arg(version));
lbl->setWordWrap(true);
lbl->setOpenExternalLinks(true);
diff --git a/tools/designer/src/lib/shared/formwindowbase.cpp b/tools/designer/src/lib/shared/formwindowbase.cpp
index 5be907b..377ae43 100644
--- a/tools/designer/src/lib/shared/formwindowbase.cpp
+++ b/tools/designer/src/lib/shared/formwindowbase.cpp
@@ -51,7 +51,7 @@
#include "deviceprofile_p.h"
#include "qdesigner_utils_p.h"
-#include <abstractformbuilder.h>
+#include "qsimpleresource_p.h"
#include <QtDesigner/QDesignerFormEditorInterface>
#include <QtDesigner/QDesignerContainerExtension>
@@ -478,6 +478,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/kmap2qmap/main.cpp b/tools/kmap2qmap/main.cpp
index b518392..12d91c6 100644
--- a/tools/kmap2qmap/main.cpp
+++ b/tools/kmap2qmap/main.cpp
@@ -384,10 +384,12 @@ static const symbol_synonyms_t symbol_synonyms[] = {
static const int symbol_synonyms_size = sizeof(symbol_synonyms)/sizeof(symbol_synonyms_t);
// makes the generated array in --header mode a bit more human readable
+QT_BEGIN_NAMESPACE
static bool operator<(const QWSKeyboard::Mapping &m1, const QWSKeyboard::Mapping &m2)
{
return m1.keycode != m2.keycode ? m1.keycode < m2.keycode : m1.modifiers < m2.modifiers;
}
+QT_END_NAMESPACE
class KeymapParser {
public:
diff --git a/tools/linguist/linguist/mainwindow.cpp b/tools/linguist/linguist/mainwindow.cpp
index 5157fbe..921b8b6 100644
--- a/tools/linguist/linguist/mainwindow.cpp
+++ b/tools/linguist/linguist/mainwindow.cpp
@@ -1342,17 +1342,13 @@ void MainWindow::about()
QString version = tr("Version %1");
version = version.arg(QLatin1String(QT_VERSION_STR));
- // TODO: Remove this variable for 4.6.0. Must keep this way for 4.5.x due to string freeze.
- QString edition;
-
box.setText(tr("<center><img src=\":/images/splash.png\"/></img><p>%1</p></center>"
"<p>Qt Linguist is a tool for adding translations to Qt "
"applications.</p>"
- "<p>%2</p>"
"<p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)."
"</p><p>The program is provided AS IS with NO WARRANTY OF ANY KIND,"
" INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A"
- " PARTICULAR PURPOSE.</p>").arg(version).arg(edition));
+ " PARTICULAR PURPOSE.</p>").arg(version));
box.setWindowTitle(QApplication::translate("AboutDialog", "Qt Linguist"));
box.setIcon(QMessageBox::NoIcon);
diff --git a/tools/linguist/lupdate/java.cpp b/tools/linguist/lupdate/java.cpp
index c8dbe5b..31024f9 100644
--- a/tools/linguist/lupdate/java.cpp
+++ b/tools/linguist/lupdate/java.cpp
@@ -60,7 +60,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
{
@@ -144,7 +144,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() ) {
@@ -384,9 +388,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 a10e668..3b9ba73 100644
--- a/tools/macdeployqt/shared/shared.cpp
+++ b/tools/macdeployqt/shared/shared.cpp
@@ -357,7 +357,7 @@ DeploymentInfo deployQtFrameworks(QList<FrameworkInfo> frameworks,
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;
@@ -375,7 +375,7 @@ DeploymentInfo deployQtFrameworks(QList<FrameworkInfo> frameworks,
// 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/qdbusviewer/qdbusviewer.cpp b/tools/qdbus/qdbusviewer/qdbusviewer.cpp
index 9c25a89..fcb63a8 100644
--- a/tools/qdbus/qdbusviewer/qdbusviewer.cpp
+++ b/tools/qdbus/qdbusviewer/qdbusviewer.cpp
@@ -441,21 +441,14 @@ void QDBusViewer::about()
{
QMessageBox box(this);
- // TODO: Remove these variables for 4.6.0. Must keep this way for 4.5.x due to string freeze.
- QString edition;
- QString info;
- QString moreInfo;
-
box.setText(QString::fromLatin1("<center><img src=\":/trolltech/qdbusviewer/images/qdbusviewer-128.png\">"
"<h3>%1</h3>"
- "<p>Version %2 %3</p></center>"
- "<p>%4</p>"
- "<p>%5</p>"
+ "<p>Version %2</p></center>"
"<p>Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).</p>"
"<p>The program is provided AS IS with NO WARRANTY OF ANY KIND,"
" INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A"
" PARTICULAR PURPOSE.<p/>")
- .arg(tr("D-Bus Viewer")).arg(QLatin1String(QT_VERSION_STR)).arg(edition).arg(info).arg(moreInfo));
+ .arg(tr("D-Bus Viewer")).arg(QLatin1String(QT_VERSION_STR)));
box.setWindowTitle(tr("D-Bus Viewer"));
box.exec();
}
diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp
index 13d52bf..e271338 100644
--- a/tools/qdoc3/htmlgenerator.cpp
+++ b/tools/qdoc3/htmlgenerator.cpp
@@ -61,6 +61,127 @@ QT_BEGIN_NAMESPACE
static bool showBrokenLinks = false;
+static QRegExp linkTag("(<@link node=\"([^\"]+)\">).*(</@link>)");
+static QRegExp funcTag("(<@func target=\"([^\"]*)\">)(.*)(</@func>)");
+static QRegExp typeTag("(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)(</@\\2>)");
+static QRegExp spanTag("</@(?:comment|preprocessor|string|char)>");
+static QRegExp unknownTag("</?@[^>]*>");
+
+bool parseArg(const QString &src,
+ const QString &tag,
+ int *pos,
+ int n,
+ QStringRef *contents,
+ QStringRef *par1 = 0,
+ bool debug = false)
+{
+#define SKIP_CHAR(c) \
+ if (debug) \
+ qDebug() << "looking for " << c << " at " << QString(src.data() + i, n - i); \
+ if (i >= n || src[i] != c) { \
+ if (debug) \
+ qDebug() << " char '" << c << "' not found"; \
+ return false; \
+ } \
+ ++i;
+
+
+#define SKIP_SPACE \
+ while (i < n && src[i] == ' ') \
+ ++i;
+
+ int i = *pos;
+ int j = i;
+
+ // assume "<@" has been parsed outside
+ //SKIP_CHAR('<');
+ //SKIP_CHAR('@');
+
+ if (tag != QStringRef(&src, i, tag.length())) {
+ if (0 && debug)
+ qDebug() << "tag " << tag << " not found at " << i;
+ return false;
+ }
+
+ if (debug)
+ qDebug() << "haystack:" << src << "needle:" << tag << "i:" <<i;
+
+ // skip tag
+ i += tag.length();
+
+ // parse stuff like: linkTag("(<@link node=\"([^\"]+)\">).*(</@link>)");
+ if (par1) {
+ SKIP_SPACE;
+ // read parameter name
+ j = i;
+ while (i < n && src[i].isLetter())
+ ++i;
+ if (src[i] == '=') {
+ if (debug)
+ qDebug() << "read parameter" << QString(src.data() + j, i - j);
+ SKIP_CHAR('=');
+ SKIP_CHAR('"');
+ // skip parameter name
+ j = i;
+ while (i < n && src[i] != '"')
+ ++i;
+ *par1 = QStringRef(&src, j, i - j);
+ SKIP_CHAR('"');
+ SKIP_SPACE;
+ } else {
+ if (debug)
+ qDebug() << "no optional parameter found";
+ }
+ }
+ SKIP_SPACE;
+ SKIP_CHAR('>');
+
+ // find contents up to closing "</@tag>
+ j = i;
+ for (; true; ++i) {
+ if (i + 4 + tag.length() > n)
+ return false;
+ if (src[i] != '<')
+ continue;
+ if (src[i + 1] != '/')
+ continue;
+ if (src[i + 2] != '@')
+ continue;
+ if (tag != QStringRef(&src, i + 3, tag.length()))
+ continue;
+ if (src[i + 3 + tag.length()] != '>')
+ continue;
+ break;
+ }
+
+ *contents = QStringRef(&src, j, i - j);
+
+ i += tag.length() + 4;
+
+ *pos = i;
+ if (debug)
+ qDebug() << " tag " << tag << " found: pos now: " << i;
+ return true;
+#undef SKIP_CHAR
+}
+
+static void addLink(const QString &linkTarget,
+ const QStringRef &nestedStuff,
+ QString *res)
+{
+ if (!linkTarget.isEmpty()) {
+ *res += "<a href=\"";
+ *res += linkTarget;
+ *res += "\">";
+ *res += nestedStuff;
+ *res += "</a>";
+ }
+ else {
+ *res += nestedStuff;
+ }
+}
+
+
HtmlGenerator::HtmlGenerator()
: helpProjectWriter(0), inLink(false), inContents(false),
inSectionHeading(false), inTableHeader(false), numTableRows(0),
@@ -1928,40 +2049,6 @@ void HtmlGenerator::generateLegaleseList(const Node *relative, CodeMarker *marke
}
}
-void HtmlGenerator::generateSynopsis(const Node *node, const Node *relative,
- CodeMarker *marker, CodeMarker::SynopsisStyle style)
-{
- QString marked = marker->markedUpSynopsis(node, relative, style);
- QRegExp templateTag("(<[^@>]*>)");
- if (marked.indexOf(templateTag) != -1) {
- QString contents = protect(marked.mid(templateTag.pos(1),
- templateTag.cap(1).length()));
- marked.replace(templateTag.pos(1), templateTag.cap(1).length(),
- contents);
- }
- marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])</@param>"), "<i>\\1<sub>\\2</sub></i>");
- marked.replace("<@param>", "<i>");
- marked.replace("</@param>", "</i>");
-
- if (style == CodeMarker::Summary)
- marked.replace("@name>", "b>");
-
- if (style == CodeMarker::SeparateList) {
- QRegExp extraRegExp("<@extra>.*</@extra>");
- extraRegExp.setMinimal(true);
- marked.replace(extraRegExp, "");
- } else {
- marked.replace("<@extra>", "&nbsp;&nbsp;<tt>");
- marked.replace("</@extra>", "</tt>");
- }
-
- if (style != CodeMarker::Detailed) {
- marked.replace("<@type>", "");
- marked.replace("</@type>", "");
- }
- out() << highlightedCode(marked, marker, relative);
-}
-
void HtmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* marker */)
{
QMap<const FakeNode *, QMap<QString, FakeNode *> > fakeNodeMap;
@@ -2075,21 +2162,35 @@ void HtmlGenerator::generateOverviewList(const Node *relative, CodeMarker * /* m
}
}
-void HtmlGenerator::generateSectionList(const Section& section, const Node *relative,
- CodeMarker *marker, CodeMarker::SynopsisStyle style)
+#ifdef QDOC_NAME_ALIGNMENT
+void HtmlGenerator::generateSectionList(const Section& section,
+ const Node *relative,
+ CodeMarker *marker,
+ CodeMarker::SynopsisStyle style)
{
+ bool name_alignment = true;
if (!section.members.isEmpty()) {
bool twoColumn = false;
if (style == CodeMarker::SeparateList) {
+ name_alignment = false;
twoColumn = (section.members.count() >= 16);
- } else if (section.members.first()->type() == Node::Property) {
+ }
+ else if (section.members.first()->type() == Node::Property) {
twoColumn = (section.members.count() >= 5);
+ name_alignment = false;
+ }
+ if (name_alignment) {
+ out() << "<table border=\"0\" cellpadding=\"0\" "
+ << "cellspacing=\"0\">\n";
+ }
+ else {
+ if (twoColumn)
+ out() << "<p><table width=\"100%\" "
+ << "border=\"0\" cellpadding=\"0\""
+ << " cellspacing=\"0\">\n"
+ << "<tr><td width=\"45%\" valign=\"top\">";
+ out() << "<ul>\n";
}
- if (twoColumn)
- out() << "<p><table width=\"100%\" border=\"0\" cellpadding=\"0\""
- " cellspacing=\"0\">\n"
- << "<tr><td width=\"45%\" valign=\"top\">";
- out() << "<ul>\n";
int i = 0;
NodeList::ConstIterator m = section.members.begin();
@@ -2099,41 +2200,60 @@ void HtmlGenerator::generateSectionList(const Section& section, const Node *rela
continue;
}
- if (twoColumn && i == (int) (section.members.count() + 1) / 2)
- out() << "</ul></td><td valign=\"top\"><ul>\n";
+ if (name_alignment) {
+ out() << "<tr><td class=\"memItemLeft\" "
+ << "nowrap align=\"right\" valign=\"top\">";
+ }
+ else {
+ if (twoColumn && i == (int) (section.members.count() + 1) / 2)
+ out() << "</ul></td><td valign=\"top\"><ul>\n";
+ out() << "<li><div class=\"fn\"></div>";
+ }
- out() << "<li><div class=\"fn\"></div>";
if (style == CodeMarker::Accessors)
out() << "<b>";
- generateSynopsis(*m, relative, marker, style);
+ generateSynopsis(*m, relative, marker, style, name_alignment);
if (style == CodeMarker::Accessors)
out() << "</b>";
- out() << "</li>\n";
+ if (name_alignment)
+ out() << "</td></tr>\n";
+ else
+ out() << "</li>\n";
i++;
++m;
}
- out() << "</ul>\n";
- if (twoColumn)
- out() << "</td></tr>\n</table></p>\n";
+ if (name_alignment)
+ out() << "</table>\n";
+ else {
+ out() << "</ul>\n";
+ if (twoColumn)
+ out() << "</td></tr>\n</table></p>\n";
+ }
}
if (style == CodeMarker::Summary && !section.inherited.isEmpty()) {
out() << "<ul>\n";
- generateSectionInheritedList(section, relative, marker);
+ generateSectionInheritedList(section, relative, marker, name_alignment);
out() << "</ul>\n";
}
}
-void HtmlGenerator::generateSectionInheritedList(const Section& section, const Node *relative,
- CodeMarker *marker)
+void HtmlGenerator::generateSectionInheritedList(const Section& section,
+ const Node *relative,
+ CodeMarker *marker,
+ bool nameAlignment)
{
QList<QPair<ClassNode *, int> >::ConstIterator p = section.inherited.begin();
while (p != section.inherited.end()) {
- out() << "<li><div class=\"fn\"></div>";
+ if (nameAlignment)
+ out() << "<li><div bar=2 class=\"fn\"></div>";
+ else
+ out() << "<li><div class=\"fn\"></div>";
out() << (*p).second << " ";
if ((*p).second == 1) {
out() << section.singularMember;
- } else {
+ }
+ else {
out() << section.pluralMember;
}
out() << " inherited from <a href=\"" << fileName((*p).first)
@@ -2144,270 +2264,315 @@ void HtmlGenerator::generateSectionInheritedList(const Section& section, const N
}
}
-void HtmlGenerator::generateLink(const Atom *atom, const Node * /* relative */, CodeMarker *marker)
+void HtmlGenerator::generateSynopsis(const Node *node,
+ const Node *relative,
+ CodeMarker *marker,
+ CodeMarker::SynopsisStyle style,
+ bool nameAlignment)
{
- static QRegExp camelCase("[A-Z][A-Z][a-z]|[a-z][A-Z0-9]|_");
-
- if (funcLeftParen.indexIn(atom->string()) != -1 && marker->recognizeLanguage("Cpp")) {
- // hack for C++: move () outside of link
- int k = funcLeftParen.pos(1);
- out() << protect(atom->string().left(k));
- if (link.isEmpty()) {
- if (showBrokenLinks)
- out() << "</i>";
- } else {
- out() << "</a>";
- }
- inLink = false;
- out() << protect(atom->string().mid(k));
- } else if (marker->recognizeLanguage("Java")) {
- // hack for Java: remove () and use <tt> when appropriate
- bool func = atom->string().endsWith("()");
- bool tt = (func || atom->string().contains(camelCase));
- if (tt)
- out() << "<tt>";
- if (func) {
- out() << protect(atom->string().left(atom->string().length() - 2));
- } else {
- out() << protect(atom->string());
- }
- out() << "</tt>";
- } else {
- out() << protect(atom->string());
+ QString marked = marker->markedUpSynopsis(node, relative, style);
+ QRegExp templateTag("(<[^@>]*>)");
+ if (marked.indexOf(templateTag) != -1) {
+ QString contents = protect(marked.mid(templateTag.pos(1),
+ templateTag.cap(1).length()));
+ marked.replace(templateTag.pos(1), templateTag.cap(1).length(),
+ contents);
}
-}
-
-QString HtmlGenerator::cleanRef(const QString& ref)
-{
- QString clean;
-
- if (ref.isEmpty())
- return clean;
+ marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])</@param>"),
+ "<i>\\1<sub>\\2</sub></i>");
+ marked.replace("<@param>", "<i>");
+ marked.replace("</@param>", "</i>");
- clean.reserve(ref.size() + 20);
- const QChar c = ref[0];
- const uint u = c.unicode();
+ if (style == CodeMarker::Summary)
+ marked.replace("@name>", "b>");
- if ((u >= 'a' && u <= 'z') ||
- (u >= 'A' && u <= 'Z') ||
- (u >= '0' && u <= '9')) {
- clean += c;
- } else if (u == '~') {
- clean += "dtor.";
- } else if (u == '_') {
- clean += "underscore.";
+ if (style == CodeMarker::SeparateList) {
+ QRegExp extraRegExp("<@extra>.*</@extra>");
+ extraRegExp.setMinimal(true);
+ marked.replace(extraRegExp, "");
} else {
- clean += "A";
+ marked.replace("<@extra>", "&nbsp;&nbsp;<tt>");
+ marked.replace("</@extra>", "</tt>");
}
- for (int i = 1; i < (int) ref.length(); i++) {
- const QChar c = ref[i];
- const uint u = c.unicode();
- if ((u >= 'a' && u <= 'z') ||
- (u >= 'A' && u <= 'Z') ||
- (u >= '0' && u <= '9') || u == '-' ||
- u == '_' || u == ':' || u == '.') {
- clean += c;
- } else if (c.isSpace()) {
- clean += "-";
- } else if (u == '!') {
- clean += "-not";
- } else if (u == '&') {
- clean += "-and";
- } else if (u == '<') {
- clean += "-lt";
- } else if (u == '=') {
- clean += "-eq";
- } else if (u == '>') {
- clean += "-gt";
- } else if (u == '#') {
- clean += "#";
- } else {
- clean += "-";
- clean += QString::number((int)u, 16);
- }
+ if (style != CodeMarker::Detailed) {
+ marked.replace("<@type>", "");
+ marked.replace("</@type>", "");
}
- return clean;
+ out() << highlightedCode(marked, marker, relative, nameAlignment);
}
-QString HtmlGenerator::registerRef(const QString& ref)
+QString HtmlGenerator::highlightedCode(const QString& markedCode,
+ CodeMarker *marker,
+ const Node *relative,
+ bool nameAlignment)
{
- QString clean = HtmlGenerator::cleanRef(ref);
+ QString src = markedCode;
+ QString html;
+ QStringRef arg;
+ QStringRef par1;
- for (;;) {
- QString& prevRef = refMap[clean.toLower()];
- if (prevRef.isEmpty()) {
- prevRef = ref;
- break;
- } else if (prevRef == ref) {
- break;
+ const QChar charLangle = '<';
+ const QChar charAt = '@';
+
+ // replace all <@link> tags: "(<@link node=\"([^\"]+)\">).*(</@link>)"
+ static const QString linkTag("link");
+ for (int i = 0, n = src.size(); i < n;) {
+ if (src.at(i) == charLangle && src.at(i + 1).unicode() == '@') {
+ if (nameAlignment && (i != 0))
+ html += "&nbsp;</td><td class=\"memItemRight\" valign=\"bottom\">";
+ i += 2;
+ if (parseArg(src, linkTag, &i, n, &arg, &par1)) {
+ QString link = linkForNode(
+ CodeMarker::nodeForString(par1.toString()), relative);
+ addLink(link, arg, &html);
+ }
+ else {
+ html += charLangle;
+ html += charAt;
+ }
+ }
+ else {
+ html += src.at(i++);
}
- clean += "x";
}
- return clean;
-}
-QString HtmlGenerator::protect(const QString& string)
-{
-#define APPEND(x) \
- if (html.isEmpty()) { \
- html = string; \
- html.truncate(i); \
- } \
- html += (x);
- QString html;
- int n = string.length();
-
- for (int i = 0; i < n; ++i) {
- QChar ch = string.at(i);
+ if (slow) {
+ // is this block ever used at all?
+ // replace all <@func> tags: "(<@func target=\"([^\"]*)\">)(.*)(</@func>)"
+ src = html;
+ html = QString();
+ static const QString funcTag("func");
+ for (int i = 0, n = src.size(); i < n;) {
+ if (src.at(i) == charLangle && src.at(i + 1) == charAt) {
+ i += 2;
+ if (parseArg(src, funcTag, &i, n, &arg, &par1)) {
+ QString link = linkForNode(
+ marker->resolveTarget(par1.toString(),
+ tre,
+ relative),
+ relative);
+ addLink(link, arg, &html);
+ par1 = QStringRef();
+ }
+ else {
+ html += charLangle;
+ html += charAt;
+ }
+ }
+ else {
+ html += src.at(i++);
+ }
+ }
+ }
- if (ch == QLatin1Char('&')) {
- APPEND("&amp;");
- } else if (ch == QLatin1Char('<')) {
- APPEND("&lt;");
- } else if (ch == QLatin1Char('>')) {
- APPEND("&gt;");
- } else if (ch == QLatin1Char('"')) {
- APPEND("&quot;");
- } else if (ch.unicode() > 0x007F
- || (ch == QLatin1Char('*') && i + 1 < n && string.at(i) == QLatin1Char('/'))
- || (ch == QLatin1Char('.') && i > 2 && string.at(i - 2) == QLatin1Char('.'))) {
- // we escape '*/' and the last dot in 'e.g.' and 'i.e.' for the Javadoc generator
- APPEND("&#x");
- html += QString::number(ch.unicode(), 16);
- html += QLatin1Char(';');
- } else {
- if (!html.isEmpty())
- html += ch;
+ // replace all "(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)(</@\\2>)" tags
+ src = html;
+ html = QString();
+ static const QString typeTags[] = { "type", "headerfile", "func" };
+ for (int i = 0, n = src.size(); i < n;) {
+ if (src.at(i) == charLangle && src.at(i + 1) == charAt) {
+ i += 2;
+ bool handled = false;
+ for (int k = 0; k != 3; ++k) {
+ if (parseArg(src, typeTags[k], &i, n, &arg, &par1)) {
+ par1 = QStringRef();
+ QString link = linkForNode(
+ marker->resolveTarget(arg.toString(), tre, relative),
+ relative);
+ addLink(link, arg, &html);
+ handled = true;
+ break;
+ }
+ }
+ if (!handled) {
+ html += charLangle;
+ html += charAt;
+ }
+ }
+ else {
+ html += src.at(i++);
}
}
- if (!html.isEmpty())
- return html;
- return string;
+ // replace all
+ // "<@comment>" -> "<span class=\"comment\">";
+ // "<@preprocessor>" -> "<span class=\"preprocessor\">";
+ // "<@string>" -> "<span class=\"string\">";
+ // "<@char>" -> "<span class=\"char\">";
+ // "</@(?:comment|preprocessor|string|char)>" -> "</span>"
+ src = html;
+ html = QString();
+ static const QString spanTags[] = {
+ "<@comment>", "<span class=\"comment\">",
+ "<@preprocessor>", "<span class=\"preprocessor\">",
+ "<@string>", "<span class=\"string\">",
+ "<@char>", "<span class=\"char\">",
+ "</@comment>", "</span>",
+ "</@preprocessor>","</span>",
+ "</@string>", "</span>",
+ "</@char>", "</span>"
+ // "<@char>", "<font color=blue>",
+ // "</@char>", "</font>",
+ // "<@func>", "<font color=green>",
+ // "</@func>", "</font>",
+ // "<@id>", "<i>",
+ // "</@id>", "</i>",
+ // "<@keyword>", "<b>",
+ // "</@keyword>", "</b>",
+ // "<@number>", "<font color=yellow>",
+ // "</@number>", "</font>",
+ // "<@op>", "<b>",
+ // "</@op>", "</b>",
+ // "<@param>", "<i>",
+ // "</@param>", "</i>",
+ // "<@string>", "<font color=green>",
+ // "</@string>", "</font>",
+ };
+ for (int i = 0, n = src.size(); i < n;) {
+ if (src.at(i) == charLangle) {
+ bool handled = false;
+ for (int k = 0; k != 8; ++k) {
+ const QString & tag = spanTags[2 * k];
+ if (tag == QStringRef(&src, i, tag.length())) {
+ html += spanTags[2 * k + 1];
+ i += tag.length();
+ handled = true;
+ break;
+ }
+ }
+ if (!handled) {
+ ++i;
+ if (src.at(i) == charAt ||
+ (src.at(i) == QLatin1Char('/') && src.at(i + 1) == charAt)) {
+ // drop 'our' unknown tags (the ones still containing '@')
+ while (i < n && src.at(i) != QLatin1Char('>'))
+ ++i;
+ ++i;
+ }
+ else {
+ // retain all others
+ html += charLangle;
+ }
+ }
+ }
+ else {
+ html += src.at(i);
+ ++i;
+ }
+ }
-#undef APPEND
+ return html;
}
-static QRegExp linkTag("(<@link node=\"([^\"]+)\">).*(</@link>)");
-static QRegExp funcTag("(<@func target=\"([^\"]*)\">)(.*)(</@func>)");
-static QRegExp typeTag("(<@(type|headerfile|func)(?: +[^>]*)?>)(.*)(</@\\2>)");
-static QRegExp spanTag("</@(?:comment|preprocessor|string|char)>");
-static QRegExp unknownTag("</?@[^>]*>");
-
-bool parseArg(const QString &src,
- const QString &tag,
- int *pos,
- int n,
- QStringRef *contents,
- QStringRef *par1 = 0,
- bool debug = false)
+#else
+void HtmlGenerator::generateSectionList(const Section& section,
+ const Node *relative,
+ CodeMarker *marker,
+ CodeMarker::SynopsisStyle style)
{
-#define SKIP_CHAR(c) \
- if (debug) \
- qDebug() << "looking for " << c << " at " << QString(src.data() + i, n - i); \
- if (i >= n || src[i] != c) { \
- if (debug) \
- qDebug() << " char '" << c << "' not found"; \
- return false; \
- } \
- ++i;
-
-
-#define SKIP_SPACE \
- while (i < n && src[i] == ' ') \
- ++i;
+ if (!section.members.isEmpty()) {
+ bool twoColumn = false;
+ if (style == CodeMarker::SeparateList) {
+ twoColumn = (section.members.count() >= 16);
+ } else if (section.members.first()->type() == Node::Property) {
+ twoColumn = (section.members.count() >= 5);
+ }
+ if (twoColumn)
+ out() << "<p><table width=\"100%\" border=\"0\" cellpadding=\"0\""
+ " cellspacing=\"0\">\n"
+ << "<tr><td width=\"45%\" valign=\"top\">";
+ out() << "<ul>\n";
- int i = *pos;
- int j = i;
+ int i = 0;
+ NodeList::ConstIterator m = section.members.begin();
+ while (m != section.members.end()) {
+ if ((*m)->access() == Node::Private) {
+ ++m;
+ continue;
+ }
- // assume "<@" has been parsed outside
- //SKIP_CHAR('<');
- //SKIP_CHAR('@');
+ if (twoColumn && i == (int) (section.members.count() + 1) / 2)
+ out() << "</ul></td><td valign=\"top\"><ul>\n";
- if (tag != QStringRef(&src, i, tag.length())) {
- if (0 && debug)
- qDebug() << "tag " << tag << " not found at " << i;
- return false;
+ out() << "<li><div class=\"fn\"></div>";
+ if (style == CodeMarker::Accessors)
+ out() << "<b>";
+ generateSynopsis(*m, relative, marker, style);
+ if (style == CodeMarker::Accessors)
+ out() << "</b>";
+ out() << "</li>\n";
+ i++;
+ ++m;
+ }
+ out() << "</ul>\n";
+ if (twoColumn)
+ out() << "</td></tr>\n</table></p>\n";
}
- if (debug)
- qDebug() << "haystack:" << src << "needle:" << tag << "i:" <<i;
-
- // skip tag
- i += tag.length();
+ if (style == CodeMarker::Summary && !section.inherited.isEmpty()) {
+ out() << "<ul>\n";
+ generateSectionInheritedList(section, relative, marker);
+ out() << "</ul>\n";
+ }
+}
- // parse stuff like: linkTag("(<@link node=\"([^\"]+)\">).*(</@link>)");
- if (par1) {
- SKIP_SPACE;
- // read parameter name
- j = i;
- while (i < n && src[i].isLetter())
- ++i;
- if (src[i] == '=') {
- if (debug)
- qDebug() << "read parameter" << QString(src.data() + j, i - j);
- SKIP_CHAR('=');
- SKIP_CHAR('"');
- // skip parameter name
- j = i;
- while (i < n && src[i] != '"')
- ++i;
- *par1 = QStringRef(&src, j, i - j);
- SKIP_CHAR('"');
- SKIP_SPACE;
+void HtmlGenerator::generateSectionInheritedList(const Section& section,
+ const Node *relative,
+ CodeMarker *marker)
+{
+ QList<QPair<ClassNode *, int> >::ConstIterator p = section.inherited.begin();
+ while (p != section.inherited.end()) {
+ out() << "<li><div bar=2 class=\"fn\"></div>";
+ out() << (*p).second << " ";
+ if ((*p).second == 1) {
+ out() << section.singularMember;
} else {
- if (debug)
- qDebug() << "no optional parameter found";
+ out() << section.pluralMember;
}
+ out() << " inherited from <a href=\"" << fileName((*p).first)
+ << "#" << HtmlGenerator::cleanRef(section.name.toLower()) << "\">"
+ << protect(marker->plainFullName((*p).first, relative))
+ << "</a></li>\n";
+ ++p;
}
- SKIP_SPACE;
- SKIP_CHAR('>');
+}
- // find contents up to closing "</@tag>
- j = i;
- for (; true; ++i) {
- if (i + 4 + tag.length() > n)
- return false;
- if (src[i] != '<')
- continue;
- if (src[i + 1] != '/')
- continue;
- if (src[i + 2] != '@')
- continue;
- if (tag != QStringRef(&src, i + 3, tag.length()))
- continue;
- if (src[i + 3 + tag.length()] != '>')
- continue;
- break;
+void HtmlGenerator::generateSynopsis(const Node *node,
+ const Node *relative,
+ CodeMarker *marker,
+ CodeMarker::SynopsisStyle style)
+{
+ QString marked = marker->markedUpSynopsis(node, relative, style);
+ QRegExp templateTag("(<[^@>]*>)");
+ if (marked.indexOf(templateTag) != -1) {
+ QString contents = protect(marked.mid(templateTag.pos(1),
+ templateTag.cap(1).length()));
+ marked.replace(templateTag.pos(1), templateTag.cap(1).length(),
+ contents);
}
+ marked.replace(QRegExp("<@param>([a-z]+)_([1-9n])</@param>"), "<i>\\1<sub>\\2</sub></i>");
+ marked.replace("<@param>", "<i>");
+ marked.replace("</@param>", "</i>");
- *contents = QStringRef(&src, j, i - j);
-
- i += tag.length() + 4;
-
- *pos = i;
- if (debug)
- qDebug() << " tag " << tag << " found: pos now: " << i;
- return true;
-#undef SKIP_CHAR
-}
+ if (style == CodeMarker::Summary)
+ marked.replace("@name>", "b>");
-static void addLink(const QString &linkTarget,
- const QStringRef &nestedStuff,
- QString *res)
-{
- if (!linkTarget.isEmpty()) {
- *res += "<a href=\"";
- *res += linkTarget;
- *res += "\">";
- *res += nestedStuff;
- *res += "</a>";
+ if (style == CodeMarker::SeparateList) {
+ QRegExp extraRegExp("<@extra>.*</@extra>");
+ extraRegExp.setMinimal(true);
+ marked.replace(extraRegExp, "");
+ } else {
+ marked.replace("<@extra>", "&nbsp;&nbsp;<tt>");
+ marked.replace("</@extra>", "</tt>");
}
- else {
- *res += nestedStuff;
+
+ if (style != CodeMarker::Detailed) {
+ marked.replace("<@type>", "");
+ marked.replace("</@type>", "");
}
+ out() << highlightedCode(marked, marker, relative);
}
QString HtmlGenerator::highlightedCode(const QString& markedCode,
@@ -2570,6 +2735,153 @@ QString HtmlGenerator::highlightedCode(const QString& markedCode,
return html;
}
+#endif
+
+void HtmlGenerator::generateLink(const Atom *atom, const Node * /* relative */, CodeMarker *marker)
+{
+ static QRegExp camelCase("[A-Z][A-Z][a-z]|[a-z][A-Z0-9]|_");
+
+ if (funcLeftParen.indexIn(atom->string()) != -1 && marker->recognizeLanguage("Cpp")) {
+ // hack for C++: move () outside of link
+ int k = funcLeftParen.pos(1);
+ out() << protect(atom->string().left(k));
+ if (link.isEmpty()) {
+ if (showBrokenLinks)
+ out() << "</i>";
+ } else {
+ out() << "</a>";
+ }
+ inLink = false;
+ out() << protect(atom->string().mid(k));
+ } else if (marker->recognizeLanguage("Java")) {
+ // hack for Java: remove () and use <tt> when appropriate
+ bool func = atom->string().endsWith("()");
+ bool tt = (func || atom->string().contains(camelCase));
+ if (tt)
+ out() << "<tt>";
+ if (func) {
+ out() << protect(atom->string().left(atom->string().length() - 2));
+ } else {
+ out() << protect(atom->string());
+ }
+ out() << "</tt>";
+ } else {
+ out() << protect(atom->string());
+ }
+}
+
+QString HtmlGenerator::cleanRef(const QString& ref)
+{
+ QString clean;
+
+ if (ref.isEmpty())
+ return clean;
+
+ clean.reserve(ref.size() + 20);
+ const QChar c = ref[0];
+ const uint u = c.unicode();
+
+ if ((u >= 'a' && u <= 'z') ||
+ (u >= 'A' && u <= 'Z') ||
+ (u >= '0' && u <= '9')) {
+ clean += c;
+ } else if (u == '~') {
+ clean += "dtor.";
+ } else if (u == '_') {
+ clean += "underscore.";
+ } else {
+ clean += "A";
+ }
+
+ for (int i = 1; i < (int) ref.length(); i++) {
+ const QChar c = ref[i];
+ const uint u = c.unicode();
+ if ((u >= 'a' && u <= 'z') ||
+ (u >= 'A' && u <= 'Z') ||
+ (u >= '0' && u <= '9') || u == '-' ||
+ u == '_' || u == ':' || u == '.') {
+ clean += c;
+ } else if (c.isSpace()) {
+ clean += "-";
+ } else if (u == '!') {
+ clean += "-not";
+ } else if (u == '&') {
+ clean += "-and";
+ } else if (u == '<') {
+ clean += "-lt";
+ } else if (u == '=') {
+ clean += "-eq";
+ } else if (u == '>') {
+ clean += "-gt";
+ } else if (u == '#') {
+ clean += "#";
+ } else {
+ clean += "-";
+ clean += QString::number((int)u, 16);
+ }
+ }
+ return clean;
+}
+
+QString HtmlGenerator::registerRef(const QString& ref)
+{
+ QString clean = HtmlGenerator::cleanRef(ref);
+
+ for (;;) {
+ QString& prevRef = refMap[clean.toLower()];
+ if (prevRef.isEmpty()) {
+ prevRef = ref;
+ break;
+ } else if (prevRef == ref) {
+ break;
+ }
+ clean += "x";
+ }
+ return clean;
+}
+
+QString HtmlGenerator::protect(const QString& string)
+{
+#define APPEND(x) \
+ if (html.isEmpty()) { \
+ html = string; \
+ html.truncate(i); \
+ } \
+ html += (x);
+
+ QString html;
+ int n = string.length();
+
+ for (int i = 0; i < n; ++i) {
+ QChar ch = string.at(i);
+
+ if (ch == QLatin1Char('&')) {
+ APPEND("&amp;");
+ } else if (ch == QLatin1Char('<')) {
+ APPEND("&lt;");
+ } else if (ch == QLatin1Char('>')) {
+ APPEND("&gt;");
+ } else if (ch == QLatin1Char('"')) {
+ APPEND("&quot;");
+ } else if (ch.unicode() > 0x007F
+ || (ch == QLatin1Char('*') && i + 1 < n && string.at(i) == QLatin1Char('/'))
+ || (ch == QLatin1Char('.') && i > 2 && string.at(i - 2) == QLatin1Char('.'))) {
+ // we escape '*/' and the last dot in 'e.g.' and 'i.e.' for the Javadoc generator
+ APPEND("&#x");
+ html += QString::number(ch.unicode(), 16);
+ html += QLatin1Char(';');
+ } else {
+ if (!html.isEmpty())
+ html += ch;
+ }
+ }
+
+ if (!html.isEmpty())
+ return html;
+ return string;
+
+#undef APPEND
+}
QString HtmlGenerator::fileBase(const Node *node)
{
@@ -2851,7 +3163,7 @@ void HtmlGenerator::findAllFunctions(const InnerNode *node)
const FunctionNode *func = static_cast<const FunctionNode *>(*c);
if (func->status() > Node::Obsolete && func->metaness() != FunctionNode::Ctor
&& func->metaness() != FunctionNode::Dtor) {
- funcIndex[(*c)->name()].insert((*c)->parent()->name(), *c);
+ funcIndex[(*c)->name()].insert(tre->fullDocumentName((*c)->parent()), *c);
}
}
}
diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h
index de64190..ec9532f 100644
--- a/tools/qdoc3/htmlgenerator.h
+++ b/tools/qdoc3/htmlgenerator.h
@@ -46,6 +46,8 @@
#ifndef HTMLGENERATOR_H
#define HTMLGENERATOR_H
+#define QDOC_NAME_ALIGNMENT
+
#include <qmap.h>
#include <qregexp.h>
@@ -139,17 +141,36 @@ class HtmlGenerator : public PageGenerator
void generateFunctionIndex(const Node *relative, CodeMarker *marker);
void generateLegaleseList(const Node *relative, CodeMarker *marker);
void generateOverviewList(const Node *relative, CodeMarker *marker);
- void generateSynopsis(const Node *node,
- const Node *relative,
- CodeMarker *marker,
- CodeMarker::SynopsisStyle style);
void generateSectionList(const Section& section,
const Node *relative,
CodeMarker *marker,
CodeMarker::SynopsisStyle style);
+#ifdef QDOC_NAME_ALIGNMENT
+ void generateSynopsis(const Node *node,
+ const Node *relative,
+ CodeMarker *marker,
+ CodeMarker::SynopsisStyle style,
+ bool nameAlignment = false);
+ void generateSectionInheritedList(const Section& section,
+ const Node *relative,
+ CodeMarker *marker,
+ bool nameAlignment = false);
+ QString highlightedCode(const QString& markedCode,
+ CodeMarker *marker,
+ const Node *relative,
+ bool nameAlignment = false);
+#else
+ void generateSynopsis(const Node *node,
+ const Node *relative,
+ CodeMarker *marker,
+ CodeMarker::SynopsisStyle style);
void generateSectionInheritedList(const Section& section,
const Node *relative,
CodeMarker *marker);
+ QString highlightedCode(const QString& markedCode,
+ CodeMarker *marker,
+ const Node *relative);
+#endif
void generateFullName(const Node *apparentNode,
const Node *relative,
CodeMarker *marker,
@@ -159,7 +180,6 @@ class HtmlGenerator : public PageGenerator
void generateStatus(const Node *node, CodeMarker *marker);
QString registerRef(const QString& ref);
- QString highlightedCode(const QString& markedCode, CodeMarker *marker, const Node *relative);
QString fileBase(const Node *node);
#if 0
QString fileBase(const Node *node, const SectionIterator& section);
diff --git a/tools/qdoc3/test/classic.css b/tools/qdoc3/test/classic.css
index 6cf7377..8e9eb78 100644
--- a/tools/qdoc3/test/classic.css
+++ b/tools/qdoc3/test/classic.css
@@ -1,12 +1,34 @@
+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+ font-family: Arial, Geneva, Helvetica, sans-serif;
+}
+BODY,TD {
+ font-size: 90%;
+}
+H1 {
+ text-align: center;
+ font-size: 160%;
+}
+H2 {
+ font-size: 120%;
+}
+H3 {
+ font-size: 100%;
+}
+
h3.fn,span.fn
{
- margin-left: 1cm;
- text-indent: -1cm;
+ background-color: #d5e1d5;
+ border-width: 1px;
+ border-style: solid;
+ border-color: #66bc29;
+ font-weight: bold;
+ -moz-border-radius: 8px 8px 8px 8px;
+ padding: 6px 0px 6px 10px;
}
a:link
{
- color: #004faf;
+ color: #0046ad;
text-decoration: none
}
@@ -40,22 +62,50 @@ a.compat:visited
text-decoration: none
}
-td.postheader
-{
- font-family: sans-serif
-}
-
-tr.address
-{
- font-family: sans-serif
-}
-
body
{
background: #ffffff;
color: black
}
+table td.memItemLeft {
+ width: 200px;
+ padding: 1px 0px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #66bc29;
+ border-right-color: #66bc29;
+ border-bottom-color: #66bc29;
+ border-left-color: #66bc29;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+table td.memItemRight {
+ padding: 1px 8px 0px 8px;
+ margin: 4px;
+ border-top-width: 1px;
+ border-right-width: 1px;
+ border-bottom-width: 1px;
+ border-left-width: 1px;
+ border-top-color: #66bc29;
+ border-right-color: #66bc29;
+ border-bottom-color: #66bc29;
+ border-left-color: #66bc29;
+ border-top-style: solid;
+ border-right-style: none;
+ border-bottom-style: none;
+ border-left-style: none;
+ background-color: #FAFAFA;
+ font-size: 80%;
+}
+
table tr.odd {
background: #f0f0f0;
color: black;
diff --git a/tools/qtestlib/chart/benchmark_template.html b/tools/qtestlib/chart/benchmark_template.html
index 11efd92..a7e48be 100644
--- a/tools/qtestlib/chart/benchmark_template.html
+++ b/tools/qtestlib/chart/benchmark_template.html
@@ -108,15 +108,25 @@ function checkform()
this.createChart();
}
+function createElement(nodeName, name) {
+ var node;
+ try {
+ node = document.createElement("<"+nodeName+" name="+name+">");
+ } catch (e) {
+ node = document.createElement(nodeName);
+ node.name = name;
+ }
+ return node;
+}
+
function createFormSelector(form, value, text, type)
{
- var selector = document.createElement('input');
- form.appendChild(selector);
+ var selector = createElement('input', 'list');
selector.type = type;
- selector.name = 'list';
selector.defaultChecked = true;
selector.value = value;
+ form.appendChild(selector);
form.appendChild(document.createTextNode(text));
form.appendChild(document.createElement("BR"));
}
diff --git a/tools/qtestlib/chart/reportgenerator.cpp b/tools/qtestlib/chart/reportgenerator.cpp
index bf5bf94..94661ba 100644
--- a/tools/qtestlib/chart/reportgenerator.cpp
+++ b/tools/qtestlib/chart/reportgenerator.cpp
@@ -253,7 +253,7 @@ QByteArray printSeriesLabels(const QString &tableName, const QString &seriesColu
output += "[";
foreach(const QString &serie, series) {
- output += "\"" + serie.toLocal8Bit() + "\", ";
+ output += "\"" + serie.toLocal8Bit() + "\",";
}
output.chop(1); //remove last comma
output += "]\n";
@@ -446,7 +446,6 @@ void ReportGenerator::writeReports()
}
*/
writeReport("Results", "results.html", false);
- qDebug() << "Supported browsers: Firefox, Safari, Opera, Qt Demo Browser (IE and KDE 3 Konqueror are not supported)";
}
QString ReportGenerator::fileName()
diff --git a/tools/tools.pro b/tools/tools.pro
index 0a56cfb..d034dcd 100644
--- a/tools/tools.pro
+++ b/tools/tools.pro
@@ -22,7 +22,7 @@ mac {
SUBDIRS += macdeployqt
}
-SUBDIRS += kmap2qmap
+embedded:SUBDIRS += kmap2qmap
contains(QT_CONFIG, dbus):SUBDIRS += qdbus
!wince*:contains(QT_CONFIG, xmlpatterns): SUBDIRS += xmlpatterns
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/translations/qt_ja_JP.ts b/translations/qt_ja_JP.ts
index 7c8b874..55b21d0 100644
--- a/translations/qt_ja_JP.ts
+++ b/translations/qt_ja_JP.ts
@@ -2,29 +2,12 @@
<!DOCTYPE TS>
<TS version="2.0" language="ja">
<context>
- <name>AudioOutput</name>
- <message>
- <location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+375"/>
- <source>&lt;html&gt;The audio playback device &lt;b&gt;%1&lt;/b&gt; does not work.&lt;br/&gt;Falling back to &lt;b&gt;%2&lt;/b&gt;.&lt;/html&gt;</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+13"/>
- <source>&lt;html&gt;Switching to the audio playback device &lt;b&gt;%1&lt;/b&gt;&lt;br/&gt;which just became available and has higher preference.&lt;/html&gt;</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+3"/>
- <source>Revert back to device &apos;%1&apos;</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
<name>CloseButton</name>
<message>
- <location filename="../src/gui/widgets/qtabbar.cpp" line="+2251"/>
+ <location filename="../src/gui/widgets/qtabbar.cpp" line="+2253"/>
<source>Close Tab</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>ToolTip</translatorcomment>
+ <translation>タブを閉じる</translation>
</message>
</context>
<context>
@@ -43,32 +26,50 @@
<message>
<location filename="../src/3rdparty/phonon/phonon/phononnamespace.cpp" line="+55"/>
<source>Notifications</source>
- <translation type="unfinished"></translation>
+ <translation>通知</translation>
</message>
<message>
<location line="+2"/>
<source>Music</source>
- <translation type="unfinished"></translation>
+ <translation>音楽</translation>
</message>
<message>
<location line="+2"/>
<source>Video</source>
- <translation type="unfinished"></translation>
+ <translation>動画</translation>
</message>
<message>
<location line="+2"/>
<source>Communication</source>
- <translation type="unfinished"></translation>
+ <translation>コミュニケーション</translation>
</message>
<message>
<location line="+2"/>
<source>Games</source>
- <translation type="unfinished"></translation>
+ <translation>ゲーム</translation>
</message>
<message>
<location line="+2"/>
<source>Accessibility</source>
- <translation type="unfinished"></translation>
+ <translation>アクセシビリティ</translation>
+ </message>
+</context>
+<context>
+ <name>Phonon::AudioOutput</name>
+ <message>
+ <location filename="../src/3rdparty/phonon/phonon/audiooutput.cpp" line="+375"/>
+ <source>&lt;html&gt;The audio playback device &lt;b&gt;%1&lt;/b&gt; does not work.&lt;br/&gt;Falling back to &lt;b&gt;%2&lt;/b&gt;.&lt;/html&gt;</source>
+ <translation>&lt;html&gt;オーディオ再生デバイス&lt;b&gt;%1&lt;/b&gt;が動作しません。&lt;br/&gt;&lt;b&gt;%2&lt;/b&gt;を使用します。&lt;/html&gt;</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>&lt;html&gt;Switching to the audio playback device &lt;b&gt;%1&lt;/b&gt;&lt;br/&gt;which just became available and has higher preference.&lt;/html&gt;</source>
+ <translation>&lt;html&gt;より高いパフォーマンスを得られるオーディオデバイス &lt;b&gt;%1&lt;/b&gt; が使用可能となったので、使用します。&lt;/html&gt;</translation>
+ </message>
+ <message>
+ <location line="+3"/>
+ <source>Revert back to device &apos;%1&apos;</source>
+ <translation>デバイス &apos;%1&apos; に戻す</translation>
</message>
</context>
<context>
@@ -77,13 +78,13 @@
<location filename="../src/3rdparty/phonon/gstreamer/backend.cpp" line="+171"/>
<source>Warning: You do not seem to have the package gstreamer0.10-plugins-good installed.
Some video features have been disabled.</source>
- <translation type="unfinished"></translation>
+ <translation>警告: gstreamer0.10-plugins-good がインストールされていません。幾つかの動画機能は使用できません。</translation>
</message>
<message>
<location line="+5"/>
<source>Warning: You do not seem to have the base GStreamer plugins installed.
All audio and video support has been disabled</source>
- <translation type="unfinished"></translation>
+ <translation>警告: GStreamer plugin がインストールされていません。すべての音声、動画機能は使用できません</translation>
</message>
</context>
<context>
@@ -94,12 +95,14 @@
Check your Gstreamer installation and make sure you
have libgstreamer-plugins-base installed.</source>
- <translation type="unfinished"></translation>
+ <translation>再生できません。
+
+Gstreamer と libgstreamer-plugins-base が正しくインストールされているか確認してください。</translation>
</message>
<message>
<location line="+113"/>
<source>A required codec is missing. You need to install the following codec(s) to play this content: %0</source>
- <translation type="unfinished"></translation>
+ <translation>必要なコーデックがみつかりません。このコンテンツを再生するためには、以下のコーデックをインストールする必要があります: %0</translation>
</message>
<message>
<location line="+676"/>
@@ -111,27 +114,27 @@ have libgstreamer-plugins-base installed.</source>
<location line="+335"/>
<location line="+24"/>
<source>Could not open media source.</source>
- <translation type="unfinished"></translation>
+ <translation>メディアソースを開くことができません。</translation>
</message>
<message>
<location line="-403"/>
<source>Invalid source type.</source>
- <translation type="unfinished"></translation>
+ <translation>無効なソースの形式です。</translation>
</message>
<message>
<location line="+377"/>
<source>Could not locate media source.</source>
- <translation type="unfinished"></translation>
+ <translation>メディアソースがみつかりません。</translation>
</message>
<message>
<location line="+10"/>
<source>Could not open audio device. The device is already in use.</source>
- <translation type="unfinished"></translation>
+ <translation>オーディオデバイスを開くことができません。デバイスは既に他のプロセスにより使用されています。</translation>
</message>
<message>
<location line="+13"/>
<source>Could not decode media source.</source>
- <translation type="unfinished"></translation>
+ <translation>メディアソースを開くことができません。見つからないか、未知の形式です。</translation>
</message>
</context>
<context>
@@ -139,15 +142,22 @@ have libgstreamer-plugins-base installed.</source>
<message>
<location filename="../src/3rdparty/phonon/phonon/volumeslider.cpp" line="+42"/>
<location line="+18"/>
+ <location line="+129"/>
+ <location line="+15"/>
<source>Volume: %1%</source>
- <translation type="unfinished"></translation>
+ <translation>音量: %1%</translation>
</message>
<message>
- <location line="-15"/>
+ <location line="-159"/>
<location line="+18"/>
<location line="+54"/>
<source>Use this slider to adjust the volume. The leftmost position is 0%, the rightmost is %1%</source>
- <translation type="unfinished"></translation>
+ <translation>スライダを用いて音量を指定してください。左端が0%、右端が%1%になります</translation>
+ </message>
+ <message>
+ <location line="+67"/>
+ <source>Muted</source>
+ <translation>ミュート</translation>
</message>
</context>
<context>
@@ -168,12 +178,12 @@ have libgstreamer-plugins-base installed.</source>
<message>
<location filename="../src/qt3support/sql/q3datatable.cpp" line="+285"/>
<source>True</source>
- <translation>True</translation>
+ <translation>真</translation>
</message>
<message>
<location line="+1"/>
<source>False</source>
- <translation>False</translation>
+ <translation>偽</translation>
</message>
<message>
<location line="+505"/>
@@ -209,7 +219,7 @@ have libgstreamer-plugins-base installed.</source>
<translation>ディレクトリを選択</translation>
</message>
<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>ファイルをコピーまたは移動</translation>
</message>
@@ -226,7 +236,7 @@ have libgstreamer-plugins-base installed.</source>
</message>
<message>
<location line="-22"/>
- <location line="+1575"/>
+ <location line="+1579"/>
<source>Cancel</source>
<translation>キャンセル</translation>
</message>
@@ -344,17 +354,17 @@ have libgstreamer-plugins-base installed.</source>
<message>
<location line="+2"/>
<source>Symlink to File</source>
- <translation>ファイルへのSymlink</translation>
+ <translation>ファイルへのシンボリックリンク</translation>
</message>
<message>
<location line="+1"/>
<source>Symlink to Directory</source>
- <translation>ディレクトリへのSymlink</translation>
+ <translation>ディレクトリへのシンボリックリンク</translation>
</message>
<message>
<location line="+1"/>
<source>Symlink to Special</source>
- <translation>スペシャルへのSymlink</translation>
+ <translation>スペシャルファイルへのシンボリックリンク</translation>
</message>
<message>
<location line="+1"/>
@@ -455,7 +465,7 @@ have libgstreamer-plugins-base installed.</source>
<message>
<location line="+2"/>
<source>the symlink</source>
- <translation>Symlink</translation>
+ <translation>シンボリックリンク</translation>
</message>
<message>
<location line="+3"/>
@@ -465,7 +475,7 @@ have libgstreamer-plugins-base installed.</source>
<message>
<location line="+1"/>
<source>&lt;qt&gt;Are you sure you wish to delete %1 &quot;%2&quot;?&lt;/qt&gt;</source>
- <translation>&lt;qt&gt;%1「%2」を削除しますか?&lt;/qt&gt;</translation>
+ <translation>&lt;qt&gt;%1 &quot;%2&quot; を削除しますか?&lt;/qt&gt;</translation>
</message>
<message>
<location line="+2"/>
@@ -556,8 +566,9 @@ to
%2</source>
<translation>名前を変更できませんでした
%1
-へ
-%2</translation>
+を
+%2
+へ</translation>
</message>
<message>
<location line="+25"/>
@@ -607,13 +618,13 @@ to
<context>
<name>Q3TabDialog</name>
<message>
- <location filename="../src/qt3support/dialogs/q3tabdialog.cpp" line="+189"/>
- <location line="+814"/>
+ <location filename="../src/qt3support/dialogs/q3tabdialog.cpp" line="+190"/>
+ <location line="+824"/>
<source>OK</source>
<translation>OK</translation>
</message>
<message>
- <location line="-356"/>
+ <location line="-366"/>
<source>Apply</source>
<translation>適用</translation>
</message>
@@ -737,7 +748,7 @@ to
<message>
<location line="+2"/>
<source>Displays the name of the window and contains controls to manipulate it</source>
- <translation>ウィンドウの名前を表示し、ウィンドウを操作するコントロールを含みます</translation>
+ <translation>ウィンドウの名前と、ウィンドウを操作するコントロールを表示します</translation>
</message>
</context>
<context>
@@ -755,43 +766,43 @@ to
<location line="+260"/>
<location line="+4"/>
<source>The protocol `%1&apos; is not supported</source>
- <translation>プロトコル「%1」はサポートされていません</translation>
+ <translation>プロトコル &apos;%1&apos; はサポートされていません</translation>
</message>
<message>
<location line="-260"/>
<source>The protocol `%1&apos; does not support listing directories</source>
- <translation>プロトコル「%1」ではディレクトリのリストをサポートしていません</translation>
+ <translation>プロトコル &apos;%1&apos; はディレクトリのリスティングをサポートしていません</translation>
</message>
<message>
<location line="+3"/>
<source>The protocol `%1&apos; does not support creating new directories</source>
- <translation>プロトコル「%1」では新しいディレクトリの作成をサポートしていません</translation>
+ <translation>プロトコル &apos;%1&apos; は新しいディレクトリの作成をサポートしていません</translation>
</message>
<message>
<location line="+3"/>
<source>The protocol `%1&apos; does not support removing files or directories</source>
- <translation>プロトコル「%1」ではファイルまたはディレクトリの削除をサポートしていません</translation>
+ <translation>プロトコル &apos;%1&apos; はファイルまたはディレクトリの削除をサポートしていません</translation>
</message>
<message>
<location line="+3"/>
<source>The protocol `%1&apos; does not support renaming files or directories</source>
- <translation>プロトコル「%1」ではファイルまたはディレクトリの名前の変更をサポートしていません</translation>
+ <translation>プロトコル &apos;%1&apos; はファイルまたはディレクトリの名前の変更をサポートしていません</translation>
</message>
<message>
<location line="+3"/>
<source>The protocol `%1&apos; does not support getting files</source>
- <translation>プロトコル「%1」ではファイルの取得をサポートしていません</translation>
+ <translation>プロトコル &apos;%1&apos; はファイルの取得をサポートしていません</translation>
</message>
<message>
<location line="+3"/>
<source>The protocol `%1&apos; does not support putting files</source>
- <translation>プロトコル「%1」ではファイルの送信をサポートしていません</translation>
+ <translation>プロトコル &apos;%1&apos; はファイルの送信をサポートしていません</translation>
</message>
<message>
<location line="+243"/>
<location line="+4"/>
<source>The protocol `%1&apos; does not support copying or moving files or directories</source>
- <translation>プロトコル「%1」ではファイルまたはディレクトリのコピーまたは移動をサポートしていません</translation>
+ <translation>プロトコル &apos;%1&apos; はファイルまたはディレクトリのコピーまたは移動をサポートしていません</translation>
</message>
<message>
<location line="+237"/>
@@ -848,14 +859,15 @@ to
<message>
<location line="+141"/>
<source>Connection timed out</source>
- <translation type="unfinished">接続がタイムアウトしました</translation>
+ <translation>接続がタイムアウトしました</translation>
</message>
<message>
<location line="-547"/>
<location line="+787"/>
<location line="+208"/>
<source>Operation on socket is not supported</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>抽象ソケットクラスでのソケットのエラー</translatorcomment>
+ <translation>このソケットへのこの操作はサポートされていません</translation>
</message>
<message>
<location line="+137"/>
@@ -870,13 +882,13 @@ to
<message>
<location filename="../src/network/socket/qsocks5socketengine.cpp" line="-8"/>
<source>Network unreachable</source>
- <translation type="unfinished">ネットワークへ到達できません</translation>
+ <translation>ネットワークへ到達できません</translation>
</message>
</context>
<context>
<name>QAbstractSpinBox</name>
<message>
- <location filename="../src/gui/widgets/qabstractspinbox.cpp" line="+1199"/>
+ <location filename="../src/gui/widgets/qabstractspinbox.cpp" line="+1200"/>
<source>&amp;Step up</source>
<translation>上(&amp;S)</translation>
</message>
@@ -888,7 +900,7 @@ to
<message>
<location line="-8"/>
<source>&amp;Select All</source>
- <translation type="unfinished"></translation>
+ <translation>すべてを選択(&amp;S)</translation>
</message>
</context>
<context>
@@ -914,7 +926,7 @@ to
<translation>互換性のないQtライブラリエラー</translation>
</message>
<message>
- <location filename="../src/gui/kernel/qapplication.cpp" line="+2248"/>
+ <location filename="../src/gui/kernel/qapplication.cpp" line="+2238"/>
<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>
@@ -940,7 +952,7 @@ to
<message>
<location/>
<source>COM &amp;Object:</source>
- <translation>COM オブジェクト(&amp;O)</translation>
+ <translation>COM オブジェクト(&amp;O):</translation>
</message>
</context>
<context>
@@ -1001,7 +1013,7 @@ to
<message>
<location line="+101"/>
<source>Select Color</source>
- <translation type="unfinished"></translation>
+ <translation>色</translation>
</message>
<message>
<location line="+137"/>
@@ -1046,17 +1058,17 @@ to
<message>
<location filename="../src/gui/itemviews/qitemeditorfactory.cpp" line="+544"/>
<source>False</source>
- <translation type="unfinished">False</translation>
+ <translation>偽</translation>
</message>
<message>
<location line="+1"/>
<source>True</source>
- <translation type="unfinished">True</translation>
+ <translation>真</translation>
</message>
<message>
<location filename="../src/plugins/accessible/widgets/complexwidgets.cpp" line="+0"/>
<source>Close</source>
- <translation type="unfinished">閉じる</translation>
+ <translation>閉じる</translation>
</message>
</context>
<context>
@@ -1065,19 +1077,19 @@ to
<location filename="../src/corelib/kernel/qsystemsemaphore_unix.cpp" line="+119"/>
<source>%1: key is empty</source>
<comment>QSystemSemaphore</comment>
- <translation type="unfinished"></translation>
+ <translation>%1: キーが空です</translation>
</message>
<message>
<location line="+12"/>
<source>%1: unable to make key</source>
<comment>QSystemSemaphore</comment>
- <translation type="unfinished"></translation>
+ <translation>%1: キーを作成できません</translation>
</message>
<message>
<location line="+9"/>
<source>%1: ftok failed</source>
<comment>QSystemSemaphore</comment>
- <translation type="unfinished"></translation>
+ <translation>%1: fork に失敗しました</translation>
</message>
</context>
<context>
@@ -1165,17 +1177,17 @@ to
<message>
<location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="+951"/>
<source>QDial</source>
- <translation type="unfinished"></translation>
+ <translation>ダイヤル</translation>
</message>
<message>
<location line="+2"/>
<source>SpeedoMeter</source>
- <translation type="unfinished"></translation>
+ <translation>スピードメータ</translation>
</message>
<message>
<location line="+2"/>
<source>SliderHandle</source>
- <translation type="unfinished"></translation>
+ <translation>スライダハンドル</translation>
</message>
</context>
<context>
@@ -1183,12 +1195,12 @@ to
<message>
<location filename="../src/gui/dialogs/qdialog.cpp" line="+597"/>
<source>What&apos;s This?</source>
- <translation>ヒント</translation>
+ <translation>ヒント?</translation>
</message>
<message>
<location line="-115"/>
<source>Done</source>
- <translation type="unfinished"></translation>
+ <translation>終了</translation>
</message>
</context>
<context>
@@ -1203,7 +1215,7 @@ to
<message>
<location filename="../src/gui/widgets/qdialogbuttonbox.cpp" line="+9"/>
<source>Cancel</source>
- <translation type="unfinished">キャンセル</translation>
+ <translation>キャンセル</translation>
</message>
<message>
<location line="+6"/>
@@ -1233,12 +1245,12 @@ to
<message>
<location line="-18"/>
<source>Save</source>
- <translation type="unfinished">保存</translation>
+ <translation>保存</translation>
</message>
<message>
<location line="+0"/>
<source>&amp;Save</source>
- <translation type="unfinished">保存(&amp;S)</translation>
+ <translation>保存(&amp;S)</translation>
</message>
<message>
<location line="+3"/>
@@ -1248,17 +1260,17 @@ to
<message>
<location line="+3"/>
<source>&amp;Cancel</source>
- <translation type="unfinished">キャンセル(&amp;C)</translation>
+ <translation>キャンセル(&amp;C)</translation>
</message>
<message>
<location line="+3"/>
<source>Close</source>
- <translation type="unfinished">閉じる</translation>
+ <translation>閉じる</translation>
</message>
<message>
<location line="+0"/>
<source>&amp;Close</source>
- <translation type="unfinished">閉じる(&amp;C)</translation>
+ <translation>閉じる(&amp;C)</translation>
</message>
<message>
<location line="+6"/>
@@ -1313,13 +1325,13 @@ to
<message>
<location line="-56"/>
<source>&amp;OK</source>
- <translation type="unfinished">OK(&amp;O)</translation>
+ <translation>OK(&amp;O)</translation>
</message>
</context>
<context>
<name>QDirModel</name>
<message>
- <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+453"/>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+454"/>
<source>Name</source>
<translation>名前</translation>
</message>
@@ -1351,17 +1363,17 @@ to
<message>
<location filename="../src/plugins/accessible/widgets/qaccessiblewidgets.cpp" line="+1239"/>
<source>Close</source>
- <translation type="unfinished">閉じる</translation>
+ <translation>閉じる</translation>
</message>
<message>
<location line="+2"/>
<source>Dock</source>
- <translation type="unfinished"></translation>
+ <translation>ドック</translation>
</message>
<message>
<location line="+1"/>
<source>Float</source>
- <translation type="unfinished"></translation>
+ <translation>フロート</translation>
</message>
</context>
<context>
@@ -1369,12 +1381,12 @@ to
<message>
<location filename="../src/plugins/accessible/widgets/rangecontrols.cpp" line="-537"/>
<source>More</source>
- <translation type="unfinished">増やす</translation>
+ <translation>増やす</translation>
</message>
<message>
<location line="+2"/>
<source>Less</source>
- <translation type="unfinished">減らす</translation>
+ <translation>減らす</translation>
</message>
</context>
<context>
@@ -1392,7 +1404,7 @@ to
<message>
<location line="+3"/>
<source>Fatal Error:</source>
- <translation>致命的エラー:</translation>
+ <translation>致命的なエラー:</translation>
</message>
<message>
<location line="+193"/>
@@ -1409,41 +1421,41 @@ to
<name>QFile</name>
<message>
<location filename="../src/corelib/io/qfile.cpp" line="+708"/>
- <location line="+141"/>
+ <location line="+142"/>
<source>Destination file exists</source>
- <translation type="unfinished"></translation>
+ <translation>新しい名前のファイルは既に存在します</translation>
</message>
<message>
<location line="-108"/>
<source>Cannot remove source file</source>
- <translation type="unfinished"></translation>
+ <translation>元のファイルを削除できません</translation>
</message>
<message>
- <location line="+120"/>
+ <location line="+121"/>
<source>Cannot open %1 for input</source>
- <translation type="unfinished"></translation>
+ <translation>コピー元ファイル %1 を読めません</translation>
</message>
<message>
<location line="+17"/>
<source>Cannot open for output</source>
- <translation type="unfinished"></translation>
+ <translation>コピー先のファイルをオープンできません</translation>
</message>
<message>
<location line="+10"/>
<source>Failure to write block</source>
- <translation type="unfinished"></translation>
+ <translation>書き込みに失敗しました</translation>
</message>
<message>
<location line="+13"/>
<source>Cannot create %1 for output</source>
- <translation type="unfinished"></translation>
+ <translation>コピー先として %1 を作成できません</translation>
</message>
</context>
<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>すべてのファイル(*)</translation>
</message>
@@ -1453,33 +1465,33 @@ to
<translation>ディレクトリ</translation>
</message>
<message>
- <location line="-644"/>
- <location line="+648"/>
+ <location line="-647"/>
+ <location line="+651"/>
<source>Directory:</source>
<translation>ディレクトリ:</translation>
</message>
<message>
- <location line="-646"/>
- <location line="+652"/>
+ <location line="-649"/>
+ <location line="+655"/>
<source>File &amp;name:</source>
- <translation>ファイル名:</translation>
+ <translation>ファイル名(&amp;N):</translation>
</message>
<message>
<location line="-13"/>
<location line="+50"/>
- <location line="+1471"/>
+ <location line="+1467"/>
<location line="+75"/>
<source>&amp;Open</source>
<translation>オープン(&amp;O)</translation>
</message>
<message>
- <location line="-1596"/>
+ <location line="-1592"/>
<location line="+50"/>
<source>&amp;Save</source>
<translation>保存(&amp;S)</translation>
</message>
<message>
- <location line="-730"/>
+ <location line="-733"/>
<source>Open</source>
<translation>オープン</translation>
</message>
@@ -1499,7 +1511,7 @@ Please verify the correct file name was given</source>
<location line="+1515"/>
<source>%1 already exists.
Do you want to replace it?</source>
- <translation>%1はすでに存在します。
+ <translation>%1 はすでに存在します。
置き換えますか?</translation>
</message>
<message>
@@ -1518,7 +1530,7 @@ Please verify the correct file name was given.</source>
</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>
@@ -1531,7 +1543,7 @@ Please verify the correct directory name was given.</source>
<translation type="obsolete">ソート</translation>
</message>
<message>
- <location line="-2312"/>
+ <location line="-2311"/>
<source>&amp;Rename</source>
<translation>名前の変更(&amp;R)</translation>
</message>
@@ -1619,14 +1631,38 @@ Please verify the correct directory name was given.</source>
<translation>ファイル</translation>
</message>
<message>
- <location line="+29"/>
+ <location line="+5"/>
+ <source>File Folder</source>
+ <comment>Match Windows Explorer</comment>
+ <translation>ファイルフォルダ</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Folder</source>
+ <comment>All other platforms</comment>
+ <translation>フォルダ</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Alias</source>
+ <comment>Mac OS X Finder</comment>
+ <translation>エイリアス</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>Shortcut</source>
+ <comment>All other platforms</comment>
+ <translation>ショートカット</translation>
+ </message>
+ <message>
+ <location line="+7"/>
<source>Unknown</source>
<translation>不明</translation>
</message>
<message>
<location filename="../src/gui/dialogs/qfiledialog_win.cpp" line="+160"/>
<source>All Files (*.*)</source>
- <translation type="unfinished">すべてのファイル(*.*)</translation>
+ <translation>すべてのファイル(*.*)</translation>
</message>
<message>
<location filename="../src/gui/dialogs/qfiledialog.cpp" line="-31"/>
@@ -1642,16 +1678,16 @@ Please verify the correct directory name was given.</source>
<translation type="obsolete">ディレクトリを選択</translation>
</message>
<message>
- <location line="+2123"/>
+ <location line="+2122"/>
<source>&apos;%1&apos; is write protected.
Do you want to delete it anyway?</source>
<translation>&apos;%1&apos; は書き込みが禁止されています。
-本当に削除しますか?</translation>
+本当に削除しますか?</translation>
</message>
<message>
<location line="+5"/>
<source>Are sure you want to delete &apos;%1&apos;?</source>
- <translation>&apos;%1&apos; を本当に削除しますか?</translation>
+ <translation>&apos;%1&apos; を本当に削除しますか?</translation>
</message>
<message>
<location line="+15"/>
@@ -1659,46 +1695,46 @@ Do you want to delete it anyway?</source>
<translation>ディレクトリを削除できませんでした。</translation>
</message>
<message>
- <location line="-2147"/>
+ <location line="-2146"/>
<source>Find Directory</source>
- <translation type="unfinished">ディレクトリの検索</translation>
+ <translation>ディレクトリの検索</translation>
</message>
<message>
<location line="+29"/>
<source>Show </source>
- <translation type="unfinished"></translation>
+ <translation>表示</translation>
</message>
<message>
<location line="+7"/>
<source>&amp;New Folder</source>
- <translation type="unfinished"></translation>
+ <translation>新しいフォルダ(&amp;N)</translation>
</message>
<message>
- <location line="+656"/>
+ <location line="+659"/>
<location line="+38"/>
<source>&amp;Choose</source>
- <translation type="unfinished"></translation>
+ <translation>選択(&amp;C)</translation>
</message>
<message>
- <location line="+1269"/>
+ <location line="+1265"/>
<source>New Folder</source>
- <translation type="unfinished">新しいフォルダ</translation>
+ <translation>新しいフォルダ</translation>
</message>
<message>
<location line="+555"/>
<source>Recent Places</source>
- <translation type="unfinished"></translation>
+ <translation>履歴</translation>
</message>
<message>
<location filename="../src/gui/dialogs/qfiledialog.ui"/>
<location filename="../src/gui/dialogs/qfiledialog_wince.ui"/>
<source>Forward</source>
- <translation type="unfinished">進む</translation>
+ <translation>進む</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 type="unfinished"></translation>
+ <translation>削除</translation>
</message>
</context>
<context>
@@ -1732,48 +1768,53 @@ Do you want to delete it anyway?</source>
</message>
<message>
<location line="-156"/>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+471"/>
<source>%1 TB</source>
- <translation type="unfinished"></translation>
+ <translation>%1 TB</translation>
</message>
<message>
<location line="+2"/>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+2"/>
<source>%1 GB</source>
- <translation type="unfinished"></translation>
+ <translation>%1 GB</translation>
</message>
<message>
<location line="+2"/>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+2"/>
<source>%1 MB</source>
- <translation type="unfinished"></translation>
+ <translation>%1 MB</translation>
</message>
<message>
<location line="+2"/>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+2"/>
<source>%1 KB</source>
- <translation type="unfinished"></translation>
+ <translation>%1 KB</translation>
</message>
<message>
<location line="+1"/>
+ <location filename="../src/gui/itemviews/qdirmodel.cpp" line="+1"/>
<source>%1 bytes</source>
- <translation type="unfinished"></translation>
+ <translation>%1 バイト</translation>
</message>
<message>
<location line="+77"/>
<source>Invalid filename</source>
- <translation type="unfinished"></translation>
+ <translation>無効なファイル名</translation>
</message>
<message>
<location line="+1"/>
<source>&lt;b&gt;The name &quot;%1&quot; can not be used.&lt;/b&gt;&lt;p&gt;Try using another name, with fewer characters or no punctuations marks.</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;b&gt;ファイル名 &quot;%1&quot; は使用できません。&lt;/b&gt;&lt;p&gt;名前を短くしたり、アクセント記号などを削除して再度試してください。</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qfilesystemmodel_p.h" line="+234"/>
+ <location filename="../src/gui/dialogs/qfilesystemmodel_p.h" line="+248"/>
<source>My Computer</source>
- <translation type="unfinished">マイ コンピュータ</translation>
+ <translation>マイ コンピュータ</translation>
</message>
<message>
<location line="+2"/>
<source>Computer</source>
- <translation type="unfinished"></translation>
+ <translation>コンピュータ</translation>
</message>
</context>
<context>
@@ -1782,215 +1823,216 @@ Do you want to delete it anyway?</source>
<location filename="../src/gui/text/qfontdatabase.cpp" line="+90"/>
<location line="+1176"/>
<source>Normal</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>ここはどう訳すべきか...</translatorcomment>
+ <translation>明朝</translation>
</message>
<message>
<location line="-1173"/>
<location line="+12"/>
<location line="+1149"/>
<source>Bold</source>
- <translation type="unfinished"></translation>
+ <translation>ゴシック</translation>
</message>
<message>
<location line="-1158"/>
<location line="+1160"/>
<source>Demi Bold</source>
- <translation type="unfinished"></translation>
+ <translation>Demi Bold</translation>
</message>
<message>
<location line="-1157"/>
<location line="+18"/>
<location line="+1135"/>
<source>Black</source>
- <translation type="unfinished"></translation>
+ <translation>太字</translation>
</message>
<message>
<location line="-1145"/>
<source>Demi</source>
- <translation type="unfinished"></translation>
+ <translation>Demi</translation>
</message>
<message>
<location line="+6"/>
<location line="+1145"/>
<source>Light</source>
- <translation type="unfinished"></translation>
+ <translation>細字</translation>
</message>
<message>
<location line="-1004"/>
<location line="+1007"/>
<source>Italic</source>
- <translation type="unfinished"></translation>
+ <translation>イタリック</translation>
</message>
<message>
<location line="-1004"/>
<location line="+1006"/>
<source>Oblique</source>
- <translation type="unfinished"></translation>
+ <translation>斜体</translation>
</message>
<message>
<location line="+705"/>
<source>Any</source>
- <translation type="unfinished"></translation>
+ <translation>すべて</translation>
</message>
<message>
<location line="+3"/>
<source>Latin</source>
- <translation type="unfinished"></translation>
+ <translation>ラテン</translation>
</message>
<message>
<location line="+3"/>
<source>Greek</source>
- <translation type="unfinished"></translation>
+ <translation>ギリシャ</translation>
</message>
<message>
<location line="+3"/>
<source>Cyrillic</source>
- <translation type="unfinished"></translation>
+ <translation>キリル</translation>
</message>
<message>
<location line="+3"/>
<source>Armenian</source>
- <translation type="unfinished"></translation>
+ <translation>アルメニア</translation>
</message>
<message>
<location line="+3"/>
<source>Hebrew</source>
- <translation type="unfinished"></translation>
+ <translation>ヘブライ</translation>
</message>
<message>
<location line="+3"/>
<source>Arabic</source>
- <translation type="unfinished"></translation>
+ <translation>アラビア</translation>
</message>
<message>
<location line="+3"/>
<source>Syriac</source>
- <translation type="unfinished"></translation>
+ <translation>シリア</translation>
</message>
<message>
<location line="+3"/>
<source>Thaana</source>
- <translation type="unfinished"></translation>
+ <translation>ターナ</translation>
</message>
<message>
<location line="+3"/>
<source>Devanagari</source>
- <translation type="unfinished"></translation>
+ <translation>デーヴァナーガリー</translation>
</message>
<message>
<location line="+3"/>
<source>Bengali</source>
- <translation type="unfinished"></translation>
+ <translation>ベンガル</translation>
</message>
<message>
<location line="+3"/>
<source>Gurmukhi</source>
- <translation type="unfinished"></translation>
+ <translation>グルムキー</translation>
</message>
<message>
<location line="+3"/>
<source>Gujarati</source>
- <translation type="unfinished"></translation>
+ <translation>グジャラート</translation>
</message>
<message>
<location line="+3"/>
<source>Oriya</source>
- <translation type="unfinished"></translation>
+ <translation>オリヤー</translation>
</message>
<message>
<location line="+3"/>
<source>Tamil</source>
- <translation type="unfinished"></translation>
+ <translation>タミル</translation>
</message>
<message>
<location line="+3"/>
<source>Telugu</source>
- <translation type="unfinished"></translation>
+ <translation>テルグ</translation>
</message>
<message>
<location line="+3"/>
<source>Kannada</source>
- <translation type="unfinished"></translation>
+ <translation>カンナダ</translation>
</message>
<message>
<location line="+3"/>
<source>Malayalam</source>
- <translation type="unfinished"></translation>
+ <translation>マラヤーラム</translation>
</message>
<message>
<location line="+3"/>
<source>Sinhala</source>
- <translation type="unfinished"></translation>
+ <translation>シンハラ</translation>
</message>
<message>
<location line="+3"/>
<source>Thai</source>
- <translation type="unfinished"></translation>
+ <translation>タイ</translation>
</message>
<message>
<location line="+3"/>
<source>Lao</source>
- <translation type="unfinished"></translation>
+ <translation>ラーオ</translation>
</message>
<message>
<location line="+3"/>
<source>Tibetan</source>
- <translation type="unfinished"></translation>
+ <translation>チベット</translation>
</message>
<message>
<location line="+3"/>
<source>Myanmar</source>
- <translation type="unfinished"></translation>
+ <translation>ビルマ</translation>
</message>
<message>
<location line="+3"/>
<source>Georgian</source>
- <translation type="unfinished"></translation>
+ <translation>グルジア</translation>
</message>
<message>
<location line="+3"/>
<source>Khmer</source>
- <translation type="unfinished"></translation>
+ <translation>クメール</translation>
</message>
<message>
<location line="+3"/>
<source>Simplified Chinese</source>
- <translation type="unfinished"></translation>
+ <translation>簡体中国</translation>
</message>
<message>
<location line="+3"/>
<source>Traditional Chinese</source>
- <translation type="unfinished"></translation>
+ <translation>繁体中国</translation>
</message>
<message>
<location line="+3"/>
<source>Japanese</source>
- <translation type="unfinished"></translation>
+ <translation>日本</translation>
</message>
<message>
<location line="+3"/>
<source>Korean</source>
- <translation type="unfinished"></translation>
+ <translation>ハングル</translation>
</message>
<message>
<location line="+3"/>
<source>Vietnamese</source>
- <translation type="unfinished"></translation>
+ <translation>ベトナム</translation>
</message>
<message>
<location line="+3"/>
<source>Symbol</source>
- <translation type="unfinished"></translation>
+ <translation>記号</translation>
</message>
<message>
<location line="+3"/>
<source>Ogham</source>
- <translation type="unfinished"></translation>
+ <translation>オガム</translation>
</message>
<message>
<location line="+3"/>
<source>Runic</source>
- <translation type="unfinished"></translation>
+ <translation>ルーン</translation>
</message>
</context>
<context>
@@ -2065,7 +2107,7 @@ Do you want to delete it anyway?</source>
<message>
<location line="+4"/>
<source>Connection timed out to host %1</source>
- <translation type="unfinished"></translation>
+ <translation>ホスト %1 への接続がタイムアウトしました</translation>
</message>
<message>
<location line="+104"/>
@@ -2231,7 +2273,7 @@ Do you want to delete it anyway?</source>
<message>
<location filename="../src/network/access/qhttp.cpp" line="+365"/>
<source>HTTPS connection requested but SSL support not compiled in</source>
- <translation type="unfinished"></translation>
+ <translation>HTTPSによる接続が要求されましたが、SSLのサポートがコンパイル時に組み込まれていないため、接続できません</translation>
</message>
<message>
<location line="+1209"/>
@@ -2268,15 +2310,15 @@ Do you want to delete it anyway?</source>
<message>
<location line="+179"/>
<source>Unknown authentication method</source>
- <translation type="unfinished"></translation>
+ <translation>非対応の認証方法が要求されました</translation>
</message>
<message>
<location line="+183"/>
<source>Error writing response to device</source>
- <translation type="unfinished"></translation>
+ <translation>デバイスへの書き込み時にエラーが発生しました</translation>
</message>
<message>
- <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+876"/>
+ <location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+968"/>
<location filename="../src/qt3support/network/q3http.cpp" line="+38"/>
<source>Connection refused</source>
<translation>接続が拒否されました</translation>
@@ -2344,42 +2386,42 @@ Do you want to delete it anyway?</source>
<message>
<location filename="../src/network/access/qhttp.cpp" line="-135"/>
<source>Proxy authentication required</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーの認証が必要です</translation>
</message>
<message>
<location line="+4"/>
<source>Authentication required</source>
- <translation type="unfinished"></translation>
+ <translation>認証が必要です</translation>
</message>
<message>
<location line="-138"/>
<source>Connection refused (or timed out)</source>
- <translation type="unfinished"></translation>
+ <translation>接続が拒否されたか、タイムアウトしました</translation>
</message>
<message>
<location filename="../src/network/access/qhttpnetworkconnection.cpp" line="+6"/>
<source>Proxy requires authentication</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーの認証が必要です</translation>
</message>
<message>
<location line="+3"/>
<source>Host requires authentication</source>
- <translation type="unfinished"></translation>
+ <translation>ホストの認証が必要です</translation>
</message>
<message>
<location line="+3"/>
<source>Data corrupted</source>
- <translation type="unfinished"></translation>
+ <translation>データが破損しています</translation>
</message>
<message>
<location line="+3"/>
<source>Unknown protocol specified</source>
- <translation type="unfinished"></translation>
+ <translation>未対応のプロトコルです</translation>
</message>
<message>
<location line="+3"/>
<source>SSL handshake failed</source>
- <translation type="unfinished"></translation>
+ <translation>SSLのハンドシェークに失敗しました</translation>
</message>
</context>
<context>
@@ -2387,53 +2429,53 @@ Do you want to delete it anyway?</source>
<message>
<location filename="../src/network/socket/qhttpsocketengine.cpp" line="-89"/>
<source>Did not receive HTTP response from proxy</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーからHTTPレスポンスを受信できませんでした</translation>
</message>
<message>
<location line="+25"/>
<source>Error parsing authentication request from proxy</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーからの認証要求のパースに失敗しました</translation>
</message>
<message>
<location line="+31"/>
<source>Authentication required</source>
- <translation type="unfinished"></translation>
+ <translation>認証が必要です</translation>
</message>
<message>
<location line="+27"/>
<source>Proxy denied connection</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーが接続を拒否しました</translation>
</message>
<message>
<location line="+10"/>
<source>Error communicating with HTTP proxy</source>
- <translation type="unfinished"></translation>
+ <translation>HTTP プロキシーとの通信にて、エラーが発生しました</translation>
</message>
<message>
<location line="+23"/>
<source>Proxy server not found</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーサーバが見つかりません</translation>
</message>
<message>
<location line="+2"/>
<source>Proxy connection refused</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーが接続を拒否しました</translation>
</message>
<message>
<location line="+2"/>
<source>Proxy server connection timed out</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーとの接続がタイムアウトしました</translation>
</message>
<message>
<location line="+2"/>
<source>Proxy connection closed prematurely</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーの接続が通信の終了前に切断されました</translation>
</message>
</context>
<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>データベースのオープンでエラーが発生しました</translation>
</message>
@@ -2566,7 +2608,7 @@ Do you want to delete it anyway?</source>
<translation>デバイスの残り容量がありません</translation>
</message>
<message>
- <location filename="../src/corelib/io/qiodevice.cpp" line="+1536"/>
+ <location filename="../src/corelib/io/qiodevice.cpp" line="+1540"/>
<source>Unknown error</source>
<translation>不明なエラー</translation>
</message>
@@ -2599,7 +2641,7 @@ Do you want to delete it anyway?</source>
<message>
<location filename="../src/gui/dialogs/qinputdialog.cpp" line="+223"/>
<source>Enter a value:</source>
- <translation type="unfinished"></translation>
+ <translation>数値を入力:</translation>
</message>
</context>
<context>
@@ -2650,35 +2692,35 @@ Do you want to delete it anyway?</source>
<location line="-377"/>
<location filename="../src/corelib/plugin/qpluginloader.cpp" line="+280"/>
<source>The shared library was not found.</source>
- <translation type="unfinished"></translation>
+ <translation>共有ライブラリがみつかりません。</translation>
</message>
<message>
<location line="+2"/>
<source>The file &apos;%1&apos; is not a valid Qt plugin.</source>
- <translation type="unfinished"></translation>
+ <translation>ファイル &apos;%1&apos; は Qt プラグインではありません。</translation>
</message>
<message>
<location line="+43"/>
<source>The plugin &apos;%1&apos; uses incompatible Qt library. (Cannot mix debug and release libraries.)</source>
- <translation type="unfinished"></translation>
+ <translation>プラグイン &apos;%1&apos; はこの Qt と互換性のないライブラリを使用しています。 (デバック版とリリース版のライブラリを同時に使用することはできません)</translation>
</message>
<message>
<location filename="../src/corelib/plugin/qlibrary_unix.cpp" line="+209"/>
<location filename="../src/corelib/plugin/qlibrary_win.cpp" line="+99"/>
<source>Cannot load library %1: %2</source>
- <translation type="unfinished"></translation>
+ <translation>ライブラリ &apos;%1&apos; を読み込むことができません: %2</translation>
</message>
<message>
<location line="+16"/>
<location filename="../src/corelib/plugin/qlibrary_win.cpp" line="+26"/>
<source>Cannot unload library %1: %2</source>
- <translation type="unfinished"></translation>
+ <translation>ライブラリ %1 を解放することができません: %2</translation>
</message>
<message>
<location line="+31"/>
<location filename="../src/corelib/plugin/qlibrary_win.cpp" line="+15"/>
<source>Cannot resolve symbol &quot;%1&quot; in %2: %3</source>
- <translation type="unfinished"></translation>
+ <translation>&apos;%2&apos;に含まれる識別子 &quot;%1&quot; を解決できません: %3</translation>
</message>
</context>
<context>
@@ -2723,25 +2765,24 @@ Do you want to delete it anyway?</source>
<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 type="unfinished"></translation>
+ <translation>%1: 名前の解決に失敗</translation>
</message>
<message>
<location filename="../src/network/socket/qlocalserver_unix.cpp" line="-8"/>
<source>%1: Permission denied</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 許可されていません</translation>
</message>
<message>
<location line="+12"/>
<source>%1: Address in use</source>
- <translation type="unfinished"></translation>
+ <translation>%1: アドレスは既に使用されています</translation>
</message>
<message>
<location line="+5"/>
- <location filename="../src/network/socket/qlocalserver_win.cpp" line="+158"/>
<source>%1: Unknown error %2</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 未知のエラー %2</translation>
</message>
</context>
<context>
@@ -2750,13 +2791,13 @@ Do you want to delete it anyway?</source>
<location filename="../src/network/socket/qlocalsocket_tcp.cpp" line="+132"/>
<location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+134"/>
<source>%1: Connection refused</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 接続が拒否されました</translation>
</message>
<message>
<location line="+3"/>
<location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
<source>%1: Remote closed</source>
- <translation type="unfinished"></translation>
+ <translation>%1: リモートにより接続が閉じられました</translation>
</message>
<message>
<location line="+3"/>
@@ -2764,61 +2805,61 @@ Do you want to delete it anyway?</source>
<location filename="../src/network/socket/qlocalsocket_win.cpp" line="+80"/>
<location line="+43"/>
<source>%1: Invalid name</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 無効な名前です</translation>
</message>
<message>
<location line="+3"/>
<location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
<source>%1: Socket access error</source>
- <translation type="unfinished"></translation>
+ <translation>%1: ソケットアクセスのエラーです</translation>
</message>
<message>
<location line="+3"/>
<location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
<source>%1: Socket resource error</source>
- <translation type="unfinished"></translation>
+ <translation>%1: ソケットリソースのエラーです</translation>
</message>
<message>
<location line="+3"/>
<location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
<source>%1: Socket operation timed out</source>
- <translation type="unfinished"></translation>
+ <translation>%1: ソケット操作がタイムアウトしました</translation>
</message>
<message>
<location line="+3"/>
<location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
<source>%1: Datagram too large</source>
- <translation type="unfinished"></translation>
+ <translation>%1: データグラムが大きすぎます</translation>
</message>
<message>
<location line="+3"/>
<location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
<location filename="../src/network/socket/qlocalsocket_win.cpp" line="-48"/>
<source>%1: Connection error</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 接続のエラーが発生しました</translation>
</message>
<message>
<location line="+3"/>
<location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+3"/>
<source>%1: The socket operation is not supported</source>
- <translation type="unfinished"></translation>
+ <translation>%1: そのソケット操作はサポートされていません</translation>
</message>
<message>
<location line="+4"/>
<source>%1: Unknown error</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 未知のエラーです</translation>
</message>
<message>
<location filename="../src/network/socket/qlocalsocket_unix.cpp" line="+4"/>
<location filename="../src/network/socket/qlocalsocket_win.cpp" line="+10"/>
<source>%1: Unknown error %2</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 未知のエラー %2</translation>
</message>
</context>
<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>データベースをオープンできません &apos;</translation>
</message>
@@ -2846,12 +2887,12 @@ Do you want to delete it anyway?</source>
<context>
<name>QMYSQLResult</name>
<message>
- <location line="-922"/>
+ <location line="-935"/>
<source>Unable to fetch data</source>
<translation>データをフェッチできません</translation>
</message>
<message>
- <location line="+176"/>
+ <location line="+183"/>
<source>Unable to execute query</source>
<translation>クエリーを実行できません</translation>
</message>
@@ -2861,13 +2902,13 @@ Do you want to delete it anyway?</source>
<translation>実行結果を記録できません</translation>
</message>
<message>
- <location line="+190"/>
+ <location line="+194"/>
<location line="+8"/>
<source>Unable to prepare statement</source>
<translation>プリペアステートメントを使えません</translation>
</message>
<message>
- <location line="+34"/>
+ <location line="+36"/>
<source>Unable to reset statement</source>
<translation>ステートメントをリセットできません</translation>
</message>
@@ -2893,14 +2934,14 @@ Do you want to delete it anyway?</source>
<translation>ステートメントの実行結果を記録できません</translation>
</message>
<message>
- <location line="-253"/>
+ <location line="-257"/>
<source>Unable to execute next query</source>
- <translation type="unfinished"></translation>
+ <translation>次のクエリーを実行できません</translation>
</message>
<message>
<location line="+10"/>
<source>Unable to store next result</source>
- <translation type="unfinished"></translation>
+ <translation>次の結果を記録できません</translation>
</message>
</context>
<context>
@@ -2908,7 +2949,7 @@ Do you want to delete it anyway?</source>
<message>
<location filename="../src/gui/widgets/qmdiarea.cpp" line="+290"/>
<source>(Untitled)</source>
- <translation type="unfinished"></translation>
+ <translation>(タイトルなし)</translation>
</message>
</context>
<context>
@@ -2916,92 +2957,93 @@ Do you want to delete it anyway?</source>
<message>
<location filename="../src/gui/widgets/qmdisubwindow.cpp" line="+280"/>
<source>%1 - [%2]</source>
- <translation type="unfinished">%1 - [%2]</translation>
+ <translation>%1 - [%2]</translation>
</message>
<message>
<location line="+72"/>
<source>Close</source>
- <translation type="unfinished">閉じる</translation>
+ <translation>閉じる</translation>
</message>
<message>
<location line="-18"/>
<source>Minimize</source>
- <translation type="unfinished">最小化</translation>
+ <translation>最小化</translation>
</message>
<message>
<location line="+13"/>
<source>Restore Down</source>
- <translation type="unfinished">元に戻す</translation>
+ <translation>元に戻す</translation>
</message>
<message>
<location line="+707"/>
<source>&amp;Restore</source>
- <translation type="unfinished">元に戻す(&amp;R)</translation>
+ <translation>元に戻す(&amp;R)</translation>
</message>
<message>
<location line="+3"/>
<source>&amp;Move</source>
- <translation type="unfinished">移動(&amp;M)</translation>
+ <translation>移動(&amp;M)</translation>
</message>
<message>
<location line="+1"/>
<source>&amp;Size</source>
- <translation type="unfinished"></translation>
+ <translation>サイズ(&amp;S)</translation>
</message>
<message>
<location line="+1"/>
<source>Mi&amp;nimize</source>
- <translation type="unfinished">最小化(&amp;N)</translation>
+ <translation>最小化(&amp;N)</translation>
</message>
<message>
<location line="+2"/>
<source>Ma&amp;ximize</source>
- <translation type="unfinished">最大化(&amp;X)</translation>
+ <translation>最大化(&amp;X)</translation>
</message>
<message>
<location line="+2"/>
<source>Stay on &amp;Top</source>
- <translation type="unfinished">常に手前に表示(&amp;T)</translation>
+ <translation>常に手前に表示(&amp;T)</translation>
</message>
<message>
<location line="+3"/>
<source>&amp;Close</source>
- <translation type="unfinished">閉じる(&amp;C)</translation>
+ <translation>閉じる(&amp;C)</translation>
</message>
<message>
<location line="-787"/>
<source>- [%1]</source>
- <translation type="unfinished"></translation>
+ <translation>- [%1]</translation>
</message>
<message>
<location line="+58"/>
<source>Maximize</source>
- <translation type="unfinished">最大化</translation>
+ <translation>最大化</translation>
</message>
<message>
<location line="+3"/>
<source>Unshade</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>たぶん選択・非選択状態のウィンドウのことだと思うけど。fvwmなどのx11で使われている用語</translatorcomment>
+ <translation>非選択</translation>
</message>
<message>
<location line="+3"/>
<source>Shade</source>
- <translation type="unfinished"></translation>
+ <translation>選択</translation>
</message>
<message>
<location line="+6"/>
<source>Restore</source>
- <translation type="unfinished"></translation>
+ <translation>元に戻す</translation>
</message>
<message>
<location line="+6"/>
<source>Help</source>
- <translation type="unfinished">ヘルプ</translation>
+ <translation>ヘルプ</translation>
</message>
<message>
<location line="+3"/>
<source>Menu</source>
- <translation type="unfinished">メニュー</translation>
+ <translation>メニュー</translation>
</message>
</context>
<context>
@@ -3082,7 +3124,32 @@ Do you want to delete it anyway?</source>
<message>
<location line="+1570"/>
<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>
+ <translation>&lt;h3&gt;Qtについて&lt;/h3&gt;
+&lt;p&gt;このプログラムは Qt バージョン %1 を使用しています。&lt;/p&gt;
+&lt;p&gt;Qt は、クロスプラットホームのアプリケーション開発に使用される C++ のツールキットです。&lt;/p&gt;
+&lt;p&gt;Qt は、 MS&amp;nbsp;Windows, Mac&amp;nbsp;OS&amp;nbsp;X, Linux, そして多数の Unix 系OS環境に対して、単一のソースからバイナリを生成します。
+また、 Linux および Windows CE を元とした組み込み環境にも対応しています。&lt;/p&gt;
+&lt;p&gt;Qt は様々なユーザの要望に応じるために、3つの異なるライセンスで提供されています。&lt;/p&gt;
+&lt;p&gt;
+Qt 商用ライセンスは、プロプライエタリまたは商用ソフトウェアに適用できます。
+この場合は、他者とのソースコードの共有を拒否し、 GNU LGP バージョン 2.1 または GNU GPL バージョン 3.0 を許容できないソフトウェアにおいて Qt を使用できます。
+&lt;/p&gt;
+&lt;p&gt;
+Qt GNU LGPL バージョン 2.1 ライセンスは、プロプライエタリまたはオープンソースソフトウェアに適用できます。
+この場合は、 GNU LGPL バージョン 2.1 に従う必要があります。
+&lt;/p&gt;
+&lt;p&gt;
+Qt GNU General Public License バージョン 3.0 ライセンスは、GNU GPL バージョン 3.0 または GPL 3.0 と互換性のあるライセンスを採用しているソフトウェアに適用されます。
+この場合は、GNU GPL バージョン 3.0 に従う必要があります。
+&lt;/p&gt;
+&lt;p&gt;
+ライセンスの詳細については、&lt;a href=&quot;http://www.qtsoftware.com/products/licensing&quot;&gt;www.qtsoftware.com/products/licensing&lt;/a&gt;
+を参照してください。&lt;/p&gt;
+&lt;p&gt;Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).&lt;/p&gt;
+&lt;p&gt;Qt は Nokia の製品です。詳細については&lt;a href=&quot;http://www.qtsoftware.com/qt/&quot;&gt;www.qtsoftware.com/qt&lt;/a&gt; を参照してください。&lt;/p&gt;
+&lt;p&gt;
+訳注: ライセンスはここにある翻訳は参考のためのものであり、オリジナルの(英語の)ものが正式なものとなります。
+&lt;/p&gt;</translation>
</message>
</context>
<context>
@@ -3090,7 +3157,7 @@ Do you want to delete it anyway?</source>
<message>
<location filename="../src/plugins/inputmethods/imsw-multi/qmultiinputcontext.cpp" line="+88"/>
<source>Select IM</source>
- <translation>入力メソッドを選択</translation>
+ <translation>インプットメソッドを選択</translation>
</message>
</context>
<context>
@@ -3098,12 +3165,12 @@ Do you want to delete it anyway?</source>
<message>
<location filename="../src/plugins/inputmethods/imsw-multi/qmultiinputcontextplugin.cpp" line="+95"/>
<source>Multiple input method switcher</source>
- <translation>複数の入力メソッドを切り替え</translation>
+ <translation>複数のインプットメソッドを切り替え</translation>
</message>
<message>
<location line="+7"/>
<source>Multiple input method switcher that uses the context menu of the text widgets</source>
- <translation>テキストウィジェットのコンテキストメニューを使った複数の入力メソッドの切り替えです</translation>
+ <translation>テキストウィジェットのコンテキストメニューを使った複数のインプットメソッドの切り替えです</translation>
</message>
</context>
<context>
@@ -3111,7 +3178,7 @@ Do you want to delete it anyway?</source>
<message>
<location filename="../src/network/socket/qnativesocketengine.cpp" line="+197"/>
<source>Unable to initialize non-blocking socket</source>
- <translation>ノンブロッキングソケットを初期化できません</translation>
+ <translation>非ブロック型ソケットを初期化できません</translation>
</message>
<message>
<location line="+3"/>
@@ -3236,7 +3303,7 @@ Do you want to delete it anyway?</source>
<message>
<location line="-3"/>
<source>The proxy type is invalid for this operation</source>
- <translation type="unfinished"></translation>
+ <translation>このプロキシーは、この操作に対応していません</translation>
</message>
</context>
<context>
@@ -3244,93 +3311,101 @@ Do you want to delete it anyway?</source>
<message>
<location filename="../src/network/access/qnetworkaccesscachebackend.cpp" line="+65"/>
<source>Error opening %1</source>
- <translation type="unfinished"></translation>
+ <translation>オープンのエラー %1</translation>
+ </message>
+</context>
+<context>
+ <name>QNetworkAccessDebugPipeBackend</name>
+ <message>
+ <location filename="../src/network/access/qnetworkaccessdebugpipebackend.cpp" line="+191"/>
+ <source>Write error writing to %1: %2</source>
+ <translation>%1 への書き込み時にエラーが発生しました: %2</translation>
</message>
</context>
<context>
<name>QNetworkAccessFileBackend</name>
<message>
- <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+99"/>
+ <location filename="../src/network/access/qnetworkaccessfilebackend.cpp" line="+100"/>
<source>Request for opening non-local file %1</source>
- <translation type="unfinished"></translation>
+ <translation>非ローカルファイル %1 をオープンするよう要求されましたが、ローカルファイルのみオープンできます</translation>
</message>
<message>
- <location line="+42"/>
+ <location line="+45"/>
<source>Error opening %1: %2</source>
- <translation type="unfinished"></translation>
+ <translation>%1 をオープンする時にエラーが発生しました: %2</translation>
</message>
<message>
- <location line="+56"/>
+ <location line="+38"/>
<source>Write error writing to %1: %2</source>
- <translation type="unfinished"></translation>
+ <translation>%1 への書き込み時にエラーが発生しました: %2</translation>
</message>
<message>
- <location line="+33"/>
+ <location line="+48"/>
<source>Cannot open %1: Path is a directory</source>
- <translation type="unfinished"></translation>
+ <translation>%1 をオープンできません。指定されたパスはディレクトリです</translation>
</message>
<message>
<location line="+21"/>
<source>Read error reading from %1: %2</source>
- <translation type="unfinished"></translation>
+ <translation>%1 を読み込み時にエラーが発生しました: %2</translation>
</message>
</context>
<context>
<name>QNetworkAccessFtpBackend</name>
<message>
- <location filename="../src/network/access/qnetworkaccessftpbackend.cpp" line="+165"/>
+ <location filename="../src/network/access/qnetworkaccessftpbackend.cpp" line="+131"/>
<source>No suitable proxy found</source>
- <translation type="unfinished"></translation>
+ <translation>適切なプロキシーがみつかりません</translation>
</message>
<message>
<location line="+14"/>
<source>Cannot open %1: is a directory</source>
- <translation type="unfinished"></translation>
+ <translation>%1 をオープンできません。指定されたパスはディレクトリです</translation>
</message>
<message>
- <location line="+130"/>
+ <location line="+112"/>
<source>Logging in to %1 failed: authentication required</source>
- <translation type="unfinished"></translation>
+ <translation>%1 へのログインに失敗しました。認証が必要です</translation>
</message>
<message>
<location line="+39"/>
<source>Error while downloading %1: %2</source>
- <translation type="unfinished"></translation>
+ <translation>%1 をダウンロード中にエラーが発生しました: %2</translation>
</message>
<message>
<location line="+2"/>
<source>Error while uploading %1: %2</source>
- <translation type="unfinished"></translation>
+ <translation>%1 をアップロード中にエラーが発生しました: %2</translation>
</message>
</context>
<context>
<name>QNetworkAccessHttpBackend</name>
<message>
- <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+597"/>
+ <location filename="../src/network/access/qnetworkaccesshttpbackend.cpp" line="+567"/>
<source>No suitable proxy found</source>
- <translation type="unfinished"></translation>
+ <translation>適切なプロキシーがみつかりません</translation>
</message>
</context>
<context>
<name>QNetworkReply</name>
<message>
- <location line="+128"/>
+ <location line="+88"/>
<source>Error downloading %1 - server replied: %2</source>
- <translation type="unfinished"></translation>
+ <translation>%1 をダウンロード中にエラーが発生しました。サーバの返答: %2</translation>
</message>
<message>
- <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="+68"/>
+ <location filename="../src/network/access/qnetworkreplyimpl.cpp" line="+75"/>
<source>Protocol &quot;%1&quot; is unknown</source>
- <translation type="unfinished"></translation>
+ <translation>プロトコル &quot;%1&quot; はサポートされていません</translation>
</message>
</context>
<context>
<name>QNetworkReplyImpl</name>
<message>
- <location line="+432"/>
+ <location line="+459"/>
<location line="+22"/>
<source>Operation canceled</source>
- <translation type="unfinished"></translation>
+ <translation>操作はキャンセルされました</translation>
</message>
</context>
<context>
@@ -3349,17 +3424,17 @@ Do you want to delete it anyway?</source>
<message>
<location line="+71"/>
<source>Unable to begin transaction</source>
- <translation type="unfinished">トランザクションを開始できません</translation>
+ <translation>トランザクションを開始できません</translation>
</message>
<message>
<location line="+19"/>
<source>Unable to commit transaction</source>
- <translation type="unfinished">トランザクションをコミットできません</translation>
+ <translation>トランザクションをコミットできません</translation>
</message>
<message>
<location line="+19"/>
<source>Unable to rollback transaction</source>
- <translation type="unfinished">トランザクションをロールバックできません</translation>
+ <translation>トランザクションをロールバックできません</translation>
</message>
</context>
<context>
@@ -3409,7 +3484,7 @@ Do you want to delete it anyway?</source>
<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>接続できません</translation>
</message>
@@ -3466,29 +3541,29 @@ Do you want to delete it anyway?</source>
<location line="-635"/>
<location line="+349"/>
<source>QODBCResult::reset: Unable to set &apos;SQL_CURSOR_STATIC&apos; as statement attribute. Please check your ODBC driver configuration</source>
- <translation>QODBCResult::reset: ステートメントの属性として &apos;SQL_CURSOR_STATUS&apos; を設定できません。ODBC ドライバの構成をチェックしてください。</translation>
+ <translation>QODBCResult::reset: ステートメントの属性として &apos;SQL_CURSOR_STATUS&apos; を設定できません。ODBC ドライバの構成をチェックしてください</translation>
</message>
<message>
<location filename="../src/sql/drivers/db2/qsql_db2.cpp" line="+194"/>
<location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-189"/>
<location line="+578"/>
<source>Unable to fetch last</source>
- <translation type="unfinished"></translation>
+ <translation>リストを取得できません</translation>
</message>
<message>
<location filename="../src/sql/drivers/odbc/qsql_odbc.cpp" line="-672"/>
<source>Unable to fetch</source>
- <translation type="unfinished"></translation>
+ <translation>フェッチできません</translation>
</message>
<message>
<location line="+44"/>
<source>Unable to fetch first</source>
- <translation type="unfinished">最初のレコードをフェッチできません</translation>
+ <translation>最初のレコードをフェッチできません</translation>
</message>
<message>
<location line="+19"/>
<source>Unable to fetch previous</source>
- <translation type="unfinished"></translation>
+ <translation>前のレコードをフェッチできません</translation>
</message>
</context>
<context>
@@ -3509,56 +3584,41 @@ Do you want to delete it anyway?</source>
<message>
<location filename="../src/network/access/qnetworkaccessdatabackend.cpp" line="+74"/>
<source>Operation not supported on %1</source>
- <translation type="unfinished"></translation>
+ <translation>%1 ではこの操作はサポートされていません</translation>
</message>
<message>
<location line="+53"/>
<source>Invalid URI: %1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/network/access/qnetworkaccessdebugpipebackend.cpp" line="+175"/>
- <source>Write error writing to %1: %2</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+57"/>
- <source>Read error reading from %1: %2</source>
- <translation type="unfinished"></translation>
+ <translation>無効なURIです: %1</translation>
</message>
<message>
- <location line="+31"/>
+ <location filename="../src/network/access/qnetworkaccessdebugpipebackend.cpp" line="+60"/>
<source>Socket error on %1: %2</source>
- <translation type="unfinished"></translation>
+ <translation>%1 のソケットにおいてエラーが発生しました: %2</translation>
</message>
<message>
<location line="+15"/>
<source>Remote host closed the connection prematurely on %1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+53"/>
- <source>Protocol error: packet of size 0 received</source>
- <translation type="unfinished"></translation>
+ <translation>リモートホスト %1 との接続が通信の終了前に切断されました</translation>
</message>
<message>
<location filename="../src/network/kernel/qhostinfo.cpp" line="+177"/>
<location line="+57"/>
<source>No host name given</source>
- <translation type="unfinished"></translation>
+ <translation>ホストネームが与えられていません</translation>
</message>
</context>
<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 type="unfinished">名前</translation>
+ <translation>名前</translation>
</message>
<message>
<location line="+2"/>
<source>Value</source>
- <translation type="unfinished">値</translation>
+ <translation>値</translation>
</message>
</context>
<context>
@@ -3586,12 +3646,12 @@ Do you want to delete it anyway?</source>
<message>
<location line="+358"/>
<source>Unable to subscribe</source>
- <translation type="unfinished"></translation>
+ <translation>subscribe できません</translation>
</message>
<message>
<location line="+32"/>
<source>Unable to unsubscribe</source>
- <translation type="unfinished"></translation>
+ <translation>unsubscribe できません</translation>
</message>
</context>
<context>
@@ -3604,7 +3664,7 @@ Do you want to delete it anyway?</source>
<message>
<location line="+374"/>
<source>Unable to prepare statement</source>
- <translation type="unfinished">プリペアステートメントを使えません</translation>
+ <translation>プリペアステートメントを使えません</translation>
</message>
</context>
<context>
@@ -3612,102 +3672,1151 @@ Do you want to delete it anyway?</source>
<message>
<location filename="../src/gui/dialogs/qpagesetupdialog_unix.cpp" line="+304"/>
<source>Centimeters (cm)</source>
- <translation type="unfinished"></translation>
+ <translation>センチメートル (cm)</translation>
</message>
<message>
<location line="+0"/>
<source>Millimeters (mm)</source>
- <translation type="unfinished"></translation>
+ <translation>ミリメートル (mm)</translation>
</message>
<message>
<location line="+0"/>
<source>Inches (in)</source>
- <translation type="unfinished"></translation>
+ <translation>インチ (in)</translation>
</message>
<message>
<location line="+0"/>
<source>Points (pt)</source>
- <translation type="unfinished"></translation>
+ <translation>ポイント (pt)</translation>
</message>
<message>
<location filename="../src/gui/dialogs/qpagesetupwidget.ui"/>
<source>Form</source>
- <translation type="unfinished"></translation>
+ <translation>書式設定</translation>
</message>
<message>
<location/>
<source>Paper</source>
- <translation type="unfinished"></translation>
+ <translation>用紙</translation>
</message>
<message>
<location/>
<source>Page size:</source>
- <translation type="unfinished">ページサイズ:</translation>
+ <translation>ページサイズ:</translation>
</message>
<message>
<location/>
<source>Width:</source>
- <translation type="unfinished"></translation>
+ <translation>幅:</translation>
</message>
<message>
<location/>
<source>Height:</source>
- <translation type="unfinished"></translation>
+ <translation>高さ:</translation>
</message>
<message>
<location/>
<source>Paper source:</source>
- <translation type="unfinished">給紙装置:</translation>
+ <translation>給紙装置:</translation>
</message>
<message>
<location/>
<source>Orientation</source>
- <translation type="unfinished"></translation>
+ <translation>印刷方向</translation>
</message>
<message>
<location/>
<source>Portrait</source>
- <translation type="unfinished">縦</translation>
+ <translation>縦 (ポートレート)</translation>
</message>
<message>
<location/>
<source>Landscape</source>
- <translation type="unfinished">横</translation>
+ <translation>横 (ランドスケープ)</translation>
</message>
<message>
<location/>
<source>Reverse landscape</source>
- <translation type="unfinished"></translation>
+ <translation>横 反転 (リバースランドスケープ)</translation>
</message>
<message>
<location/>
<source>Reverse portrait</source>
- <translation type="unfinished"></translation>
+ <translation>縦 反転 (リバースポートレート)</translation>
</message>
<message>
<location/>
<source>Margins</source>
- <translation type="unfinished"></translation>
+ <translation>余白</translation>
</message>
<message>
<location/>
<source>top margin</source>
- <translation type="unfinished"></translation>
+ <translation>上端余白</translation>
</message>
<message>
<location/>
<source>left margin</source>
- <translation type="unfinished"></translation>
+ <translation>左端余白</translation>
</message>
<message>
<location/>
<source>right margin</source>
- <translation type="unfinished"></translation>
+ <translation>右端余白</translation>
</message>
<message>
<location/>
<source>bottom margin</source>
- <translation type="unfinished"></translation>
+ <translation>下端余白</translation>
+ </message>
+</context>
+<context>
+ <name>QPatternist::QtXmlPatterns</name>
+ <message>
+ <location filename="../src/xmlpatterns/acceltree/qacceltreebuilder.cpp" line="+205"/>
+ <source>An %1-attribute with value %2 has already been declared.</source>
+ <translation type="unfinished">属性 %1 の値 %2 は既に宣言されています。</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>An %1-attribute must have a valid %2 as value, which %3 isn&apos;t.</source>
+ <translation type="unfinished">属性 %1 の値は %2 の型でなければなりませんが、 %3 が指定されました。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp" line="+314"/>
+ <source>%1 is an unsupported encoding.</source>
+ <translation type="unfinished">%1 はサポートされていないエンコーディングです。</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>%1 contains octets which are disallowed in the requested encoding %2.</source>
+ <translation type="unfinished">エンコーディング %2 では許可されていないオクテットが %1 に含まれています。</translation>
+ </message>
+ <message>
+ <location line="+18"/>
+ <source>The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character.</source>
+ <translation type="unfinished">%2 で使用されているエンコード %3 では、コードポイント %1 は有効な XML 表現ではありません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/api/qiodevicedelegate.cpp" line="+84"/>
+ <source>Network timeout.</source>
+ <translation type="unfinished">ネットワーク接続がタイムアウトしました。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/api/qxmlserializer.cpp" line="+320"/>
+ <source>Element %1 can&apos;t be serialized because it appears outside the document element.</source>
+ <translation type="unfinished">エレメント %1 はシリアライズできません。このドキュメントの範囲を越えるエレメントを含んでいます。</translation>
+ </message>
+ <message>
+ <location line="+60"/>
+ <source>Attribute %1 can&apos;t be serialized because it appears at the top level.</source>
+ <translation type="unfinished">属性 %1 はシリアライズできません。トップレベルに現れているためです。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qabstractdatetime.cpp" line="+80"/>
+ <source>Year %1 is invalid because it begins with %2.</source>
+ <translation type="unfinished">%1 年はむこうです。%2 で始まっています。</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>Day %1 is outside the range %2..%3.</source>
+ <translation type="unfinished">%1 日は、有効な範囲 %2..%3 を逸脱しています。</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Month %1 is outside the range %2..%3.</source>
+ <translation type="unfinished">%1 月は、有効な範囲 %2..%3 を逸脱しています。</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Overflow: Can&apos;t represent date %1.</source>
+ <translation type="unfinished">オーバーフロー: 日付 %1 を再現できません。</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Day %1 is invalid for month %2.</source>
+ <translation type="unfinished">%2 月には、%1 日は存在しません。</translation>
+ </message>
+ <message>
+ <location line="+49"/>
+ <source>Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; </source>
+ <translation type="unfinished">24:%1:%2.%3 は無効です。24時0分0秒のみ使用できます</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Time %1:%2:%3.%4 is invalid.</source>
+ <translation type="unfinished">時刻 %1時%2分%3.%4秒は無効です。</translation>
+ </message>
+ <message>
+ <location line="+115"/>
+ <source>Overflow: Date can&apos;t be represented.</source>
+ <translation type="unfinished">オーバーフロー: 日付を再現できません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qabstractduration.cpp" line="+99"/>
+ <location line="+15"/>
+ <source>At least one component must be present.</source>
+ <translation type="unfinished">年、月、日のうちいずれかを指定しなければなりません。</translation>
+ </message>
+ <message>
+ <location line="-7"/>
+ <source>At least one time component must appear after the %1-delimiter.</source>
+ <translation type="unfinished">%1 の後には、時刻を指定しなければなりません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qabstractfloatmathematician.cpp" line="+64"/>
+ <source>No operand in an integer division, %1, can be %2.</source>
+ <translatorcomment>ゼロ除算? NaN?</translatorcomment>
+ <translation type="unfinished">整数の除算のためのオペランドが不足しています。%1 は %2 でなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>The first operand in an integer division, %1, cannot be infinity (%2).</source>
+ <translation type="unfinished">整数の除算における最初のオペランド %1 を認識できません (%2)。</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>The second operand in a division, %1, cannot be zero (%2).</source>
+ <translation type="unfinished">整数の除算における二つ目のオペランド %1 はゼロであってはいけまん(%2)。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qanyuri_p.h" line="+132"/>
+ <source>%1 is not a valid value of type %2.</source>
+ <translation type="unfinished">%1 は、%2 の型に対して有効な値ではありません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qatomiccasters_p.h" line="+223"/>
+ <source>When casting to %1 from %2, the source value cannot be %3.</source>
+ <translation type="unfinished">%2 から %1 への型変換に際しては、値 %3 は有効な値ではありません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qatomicmathematicians.cpp" line="+65"/>
+ <source>Integer division (%1) by zero (%2) is undefined.</source>
+ <translation type="unfinished">整数の除算において %1 をゼロ (%2) で割った結果は定義されていません。</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Division (%1) by zero (%2) is undefined.</source>
+ <translation type="unfinished">除算において %1 をゼロ (%2) で割った結果は定義されていません。</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Modulus division (%1) by zero (%2) is undefined.</source>
+ <translation type="unfinished">剰余を求めるに際し、%1 をゼロ (%2) で除した結果は定義されていません。</translation>
+ </message>
+ <message>
+ <location line="+122"/>
+ <location line="+32"/>
+ <source>Dividing a value of type %1 by %2 (not-a-number) is not allowed.</source>
+ <translation type="unfinished">型 %1 を非数 %2 (NaN) で除すことはできません。</translation>
+ </message>
+ <message>
+ <location line="-20"/>
+ <source>Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.</source>
+ <translation type="unfinished">型 %1 を%2 または %3 (正または負のゼロ) で除することはできません。</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.</source>
+ <translation type="unfinished">型 %1 を %2 または %3 (正または負のゼロ)で乗ずることはできません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qatomicvalue.cpp" line="+79"/>
+ <source>A value of type %1 cannot have an Effective Boolean Value.</source>
+ <translation type="unfinished">型 %1 は有効な論理型(bool)ではありません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qboolean.cpp" line="+78"/>
+ <source>Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.</source>
+ <translatorcomment>??</translatorcomment>
+ <translation type="unfinished">論理型は、論理型以外の複数の値からなる計算によって求めることはできません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qderivedinteger_p.h" line="+402"/>
+ <source>Value %1 of type %2 exceeds maximum (%3).</source>
+ <translation type="unfinished">型 %2 の値 %1 は、上限 (%3) を越えています。</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Value %1 of type %2 is below minimum (%3).</source>
+ <translation type="unfinished">型 %2 の値 %1 は、下限 (%3) を越えています。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/data/qhexbinary.cpp" line="+91"/>
+ <source>A value of type %1 must contain an even number of digits. The value %2 does not.</source>
+ <translation type="unfinished">型 %1 の値は偶数個の十進数文字を必要とします。しかし、%2 はそうではありません。</translation>
+ </message>
+ <message>
+ <location line="+19"/>
+ <source>%1 is not valid as a value of type %2.</source>
+ <translation type="unfinished">型 %2 に対して、値 %1 は有効ではありません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qapplytemplate.cpp" line="+119"/>
+ <source>Ambiguous rule match.</source>
+ <translation type="unfinished">曖昧なルールにマッチしました。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qarithmeticexpression.cpp" line="+207"/>
+ <source>Operator %1 cannot be used on type %2.</source>
+ <translation type="unfinished">型 %2 に対して、オペレータ %1 は使用できません。</translation>
+ </message>
+ <message>
+ <location line="+17"/>
+ <source>Operator %1 cannot be used on atomic values of type %2 and %3.</source>
+ <translation type="unfinished">アトミックな型 %2 と %3 に対して、オペレータ %1 は使用できません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qattributenamevalidator.cpp" line="+66"/>
+ <source>The namespace URI in the name for a computed attribute cannot be %1.</source>
+ <translatorcomment>computed attrib. ってなんてやくすのが適当かな。</translatorcomment>
+ <translation type="unfinished">結合された属性に対する名前空間のURIとして、%1 を使用することはできません。</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>The name for a computed attribute cannot have the namespace URI %1 with the local name %2.</source>
+ <translation type="unfinished">結合された属性の名前空間URI %1 は、ローカルな名前である %2 と併用できません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qcastas.cpp" line="+88"/>
+ <source>Type error in cast, expected %1, received %2.</source>
+ <translation type="unfinished">型変換時のエラーです。望んでいた %1 ではなく、%2 になりました。</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.</source>
+ <translation type="unfinished">%1 またはそれを継承している型への型変換においては、元の値の型は同じ型か、リテラルな文字列である必要があります。型 %2 は許可されていません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qcastingplatform.cpp" line="+134"/>
+ <source>No casting is possible with %1 as the target type.</source>
+ <translation type="unfinished">目標とする型に %1 を型変換することはできません。</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>It is not possible to cast from %1 to %2.</source>
+ <translation type="unfinished">型 %1 を型 %2 に型変換することはできません。</translation>
+ </message>
+ <message>
+ <location line="+27"/>
+ <source>Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated.</source>
+ <translation type="unfinished">型 %1 への型変換はできません。抽象型であり、インスタンス化することができないからです。</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>It&apos;s not possible to cast the value %1 of type %2 to %3</source>
+ <translation type="unfinished">型 %2 の値 %1 を、型 %3 に型変換することはできません</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Failure when casting from %1 to %2: %3</source>
+ <translation type="unfinished">%1 を %2 に型変換することができません: %3</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qcommentconstructor.cpp" line="+67"/>
+ <source>A comment cannot contain %1</source>
+ <translation type="unfinished">コメントが %1 を含むことはできません</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>A comment cannot end with a %1.</source>
+ <translation type="unfinished">コメントは %1 で終了することはできません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qcomparisonplatform.cpp" line="+167"/>
+ <source>No comparisons can be done involving the type %1.</source>
+ <translation type="unfinished">型 %1 に対して比較を行うことはできません。</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>Operator %1 is not available between atomic values of type %2 and %3.</source>
+ <translation type="unfinished">オペレータ %1 は、アトミックな型である %2 と %3 には適用できません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qcomputednamespaceconstructor.cpp" line="+69"/>
+ <source>In a namespace constructor, the value for a namespace cannot be an empty string.</source>
+ <translation type="unfinished">名前空間のスントラクトにおいて、空白の文字列を名前空間の値として使用することはできません。</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>The prefix must be a valid %1, which %2 is not.</source>
+ <translation type="unfinished">プレフィックスは %1 でなければなりません。%2 は無効です。</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>The prefix %1 cannot be bound.</source>
+ <translation type="unfinished">プレフィックス %1 はバウンドできません。</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Only the prefix %1 can be bound to %2 and vice versa.</source>
+ <translation type="unfinished">プレフィックス %1 は、%2 にのみバウンドできます。逆も同じです。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qdocumentcontentvalidator.cpp" line="+86"/>
+ <source>An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.</source>
+ <translation type="unfinished">ドキュメントノードの子として属性ノードを指定することはできません。属性 %1 は誤った場所にあります。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qevaluationcache.cpp" line="+117"/>
+ <source>Circularity detected</source>
+ <translation type="unfinished">循環を検出しました</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qexpressionfactory.cpp" line="+169"/>
+ <source>A library module cannot be evaluated directly. It must be imported from a main module.</source>
+ <translation type="unfinished">ライブラリモジュールを直接評価することはできません。メインモジュールからインポートする必要があります。</translation>
+ </message>
+ <message>
+ <location line="+40"/>
+ <source>No template by name %1 exists.</source>
+ <translation type="unfinished">テンプレート名 %1 は存在しません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qgenericpredicate.cpp" line="+106"/>
+ <source>A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.</source>
+ <translation type="unfinished">型 %1 は述部として使用できません。数値型か、論理型である必要があります。</translation>
+ </message>
+ <message>
+ <location line="+32"/>
+ <source>A positional predicate must evaluate to a single numeric value.</source>
+ <translatorcomment>positional?</translatorcomment>
+ <translation type="unfinished">述部は評価されたとき、単一の数値になるようにしなければなりません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qncnameconstructor_p.h" line="+113"/>
+ <source>The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid.</source>
+ <translation type="unfinished">ターゲットとしている名前は、%1 であってはなりません。%2 は無効です。</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>%1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.</source>
+ <translation type="unfinished">%1 はターゲットとして無効です。%2 である必要があります。例えば &quot;%3&quot; のようにです。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qpath.cpp" line="+109"/>
+ <source>The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.</source>
+ <translation type="unfinished">バスの末端であるリーフは、単一のノードかアトミックな値である必要があります。複数の型の組み合わせであってはいけません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qprocessinginstructionconstructor.cpp" line="+84"/>
+ <source>The data of a processing instruction cannot contain the string %1</source>
+ <translation type="unfinished">処理中のデータは、以下の文字列を含んでいてはなりません: %1</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qqnameconstructor.cpp" line="+82"/>
+ <source>No namespace binding exists for the prefix %1</source>
+ <translation type="unfinished">プレフィックス %1 にバインドされたネームスペースがありません</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qqnameconstructor_p.h" line="+156"/>
+ <source>No namespace binding exists for the prefix %1 in %2</source>
+ <translation type="unfinished">%2 におけるプレフィックス %1 にバインディングされたネームスペースが存在しません</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <location filename="../src/xmlpatterns/functions/qqnamefns.cpp" line="+69"/>
+ <source>%1 is an invalid %2</source>
+ <translation type="unfinished">型 %2 に対し、値 %1 は無効です</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/expr/qtemplate.cpp" line="+74"/>
+ <source>The parameter %1 is passed, but no corresponding %2 exists.</source>
+ <translation type="unfinished">パラメータ %1 を処理しました。しかし、対応する %2 が存在しません。</translation>
+ </message>
+ <message>
+ <location line="+71"/>
+ <source>The parameter %1 is required, but no corresponding %2 is supplied.</source>
+ <translation type="unfinished">パメータ %1 が必要です。しかし、対応する %2 がありません。</translation>
+ </message>
+ <message numerus="yes">
+ <location filename="../src/xmlpatterns/functions/qabstractfunctionfactory.cpp" line="+77"/>
+ <source>%1 takes at most %n argument(s). %2 is therefore invalid.</source>
+ <translation type="unfinished">
+ <numerusform>%1 は、最大で %n 個の引数をとることができます。%2 は無効です。</numerusform>
+ </translation>
+ </message>
+ <message numerus="yes">
+ <location line="+11"/>
+ <source>%1 requires at least %n argument(s). %2 is therefore invalid.</source>
+ <translation type="unfinished">
+ <numerusform>%1 は、少くとも %n 個の引数を必要とします。%2 は無効です。</numerusform>
+ </translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qaggregatefns.cpp" line="+120"/>
+ <source>The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.</source>
+ <translation type="unfinished">%1 への最初の引数は、型 %2 であってはなりません。数値型、xs:yerMonthDuration、xs:dayTimeDurationである必要があります。</translation>
+ </message>
+ <message>
+ <location line="+74"/>
+ <source>The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.</source>
+ <translation type="unfinished">%1 への最初の引数は、型 %2 であってはなりません。%3, %4, %5 のいずれかである必要があります。</translation>
+ </message>
+ <message>
+ <location line="+91"/>
+ <source>The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.</source>
+ <translation type="unfinished">%1 への二つ目の引数は、型 %2 であってはなりません。%3, %4, %5 のいずれかである必要があります。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qassemblestringfns.cpp" line="+88"/>
+ <source>%1 is not a valid XML 1.0 character.</source>
+ <translation type="unfinished">%1 は XML 1.0 において有効な文字ではありません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qcomparingaggregator.cpp" line="+197"/>
+ <source>The first argument to %1 cannot be of type %2.</source>
+ <translation type="unfinished">%1 への最初の引数は、型 %2 であってはなりません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qcontextnodechecker.cpp" line="+54"/>
+ <source>The root node of the second argument to function %1 must be a document node. %2 is not a document node.</source>
+ <translation type="unfinished">%1 への二つ目の引数のルートノードは、ドキュメントノードでなければなりません。しかし、%2 はドキュメントノードではありません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qdatetimefn.cpp" line="+86"/>
+ <source>If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.</source>
+ <translatorcomment>ゾーンオフセットってなに? xmlにそんなのあったっけ?</translatorcomment>
+ <translation type="unfinished">もし二つの値がゾーンオフセットをもつ場合、両者は同じゾーンオフセットでなければなりません。%1 と %2 は同一ではありません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qerrorfn.cpp" line="+61"/>
+ <source>%1 was called.</source>
+ <translation type="unfinished">%1 が呼ばれました。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qpatternmatchingfns.cpp" line="+94"/>
+ <source>%1 must be followed by %2 or %3, not at the end of the replacement string.</source>
+ <translation type="unfinished">%1 の後には、%2 か %3 が続かなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>In the replacement string, %1 must be followed by at least one digit when not escaped.</source>
+ <translation type="unfinished">置換操作において、%1 には少くとも一文字以上の数値が続く必要があります(エスケープされている場合を除く)。</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>In the replacement string, %1 can only be used to escape itself or %2, not %3</source>
+ <translation type="unfinished">置換操作において、%1 はそれ自身または %2 をエスケープする為にのみ使用できます。%3 に対しては使用できません</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qpatternplatform.cpp" line="+92"/>
+ <source>%1 matches newline characters</source>
+ <translation type="unfinished">%1 は改行文字(列)にマッチしました</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>%1 and %2 match the start and end of a line.</source>
+ <translation type="unfinished">%1 と %2 は、行の先頭と末尾にマッチしました。</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Matches are case insensitive</source>
+ <translation type="unfinished">マッチは大文字小文字を区別しません</translation>
+ </message>
+ <message>
+ <location line="+4"/>
+ <source>Whitespace characters are removed, except when they appear in character classes</source>
+ <translatorcomment>CDATA?</translatorcomment>
+ <translation type="unfinished">空白文字は削除されました。ただし、キャラクタークラスに属するものは除きます</translation>
+ </message>
+ <message>
+ <location line="+99"/>
+ <source>%1 is an invalid regular expression pattern: %2</source>
+ <translation type="unfinished">%1 は有効な正規表現ではありません。: %2</translation>
+ </message>
+ <message>
+ <location line="+30"/>
+ <source>%1 is an invalid flag for regular expressions. Valid flags are:</source>
+ <translation type="unfinished">%1 は正規表現において無効なフラグです。使用可能なフラグは次の通りです:</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qqnamefns.cpp" line="+17"/>
+ <source>If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.</source>
+ <translation type="unfinished">もし、最初の引数が空白からなる文字列か、長さが0 (名前空間をともなわない)である場合、プレフィックスを指定することはできません。しかし、プレフィックスとして %1 が指定されています。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qsequencefns.cpp" line="+346"/>
+ <source>It will not be possible to retrieve %1.</source>
+ <translation type="unfinished">%1 を取得することはできないかもしれません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qsequencegeneratingfns.cpp" line="+279"/>
+ <source>The default collection is undefined</source>
+ <translation type="unfinished">デフォルトのコレクションが定義されていません</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>%1 cannot be retrieved</source>
+ <translation type="unfinished">%1 を取得できません</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qstringvaluefns.cpp" line="+252"/>
+ <source>The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).</source>
+ <translatorcomment>つまり、空白の文字です、はどうでもいいよね。</translatorcomment>
+ <translation type="unfinished">正規化された表現 %1 はサポートされていません。サポートされている表現は、%2, %3, %4, %5 のみです。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qtimezonefns.cpp" line="+87"/>
+ <source>A zone offset must be in the range %1..%2 inclusive. %3 is out of range.</source>
+ <translation type="unfinished">ゾーンオフセットは、%1 から %2 の範囲である必要があります(境界を含む)。%3 は範囲外です。</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>%1 is not a whole number of minutes.</source>
+ <translation type="unfinished">%1 は、分を現す値ではありません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/functions/qunparsedtextfn.cpp" line="+65"/>
+ <source>The URI cannot have a fragment</source>
+ <translation type="unfinished">この URI はフラグメントをもつことはできません</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/janitors/qcardinalityverifier.cpp" line="+58"/>
+ <source>Required cardinality is %1; got cardinality %2.</source>
+ <translation type="unfinished">カーディナリティ %1 が必要です。%2 ではありません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/janitors/qitemverifier.cpp" line="+67"/>
+ <source>The item %1 did not match the required type %2.</source>
+ <translation type="unfinished">アイテム %1 は、要求された型 %2 にマッチしません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/parser/qmaintainingreader.cpp" line="+183"/>
+ <source>Attribute %1 cannot appear on the element %2. Only the standard attributes can appear.</source>
+ <translation type="unfinished">エレメント %2 に属性 %1 を指定することはできません。標準の属性のみが許可されています。</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes.</source>
+ <translation type="unfinished">エレメント %2 に属性 %1 を指定することはできません。%3 と標準の属性のみが許可されています。</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes.</source>
+ <translation type="unfinished">エレメント %2 に属性 %1 を指定することはできません。%3, %4 と標準の属性のみが許可されています。</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes.</source>
+ <translation type="unfinished">エレメント %2 に %1 は指定できません。%3 と標準の属性のみが指定できます。</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is.</source>
+ <translation type="unfinished">XSLT エレメントに対するXSLT属性は、名前空間がnullでなければなりません。%1 は使用できません。</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>The attribute %1 must appear on element %2.</source>
+ <translation type="unfinished">属性 %1 は、エレメント %2 にのみ記述できます。</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>The element with local name %1 does not exist in XSL-T.</source>
+ <translation type="unfinished">ローカル名 %1 のエレメントは、XSLTに存在しません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/parser/qparsercontext.cpp" line="+93"/>
+ <source>The variable %1 is unused</source>
+ <translation type="unfinished">値 %1 は使用されませんでした</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/parser/qquerytransformparser.cpp" line="+330"/>
+ <source>A construct was encountered which only is allowed in XQuery.</source>
+ <translation type="unfinished">XQuery でのみ許可されている construct に遭遇しました。</translation>
+ </message>
+ <message>
+ <location line="+49"/>
+ <location line="+7253"/>
+ <source>%1 is an unknown schema type.</source>
+ <translation type="unfinished">%1 はサポートされていないスキーマのタイプです。</translation>
+ </message>
+ <message>
+ <location line="-7184"/>
+ <source>A template by name %1 has already been declared.</source>
+ <translation type="unfinished">テンプレート名 &apos;%1&apos; は、既に宣言されています。</translation>
+ </message>
+ <message>
+ <location line="+26"/>
+ <source>%1 is not a valid numeric literal.</source>
+ <translation type="unfinished">%1 は数値リテラルとして無効です。</translation>
+ </message>
+ <message>
+ <location line="+187"/>
+ <source>Only one %1 declaration can occur in the query prolog.</source>
+ <translation type="unfinished">クェリーのプロローグでは、%1 は一回のみ宣言できます。</translation>
+ </message>
+ <message>
+ <location line="+188"/>
+ <source>The initialization of variable %1 depends on itself</source>
+ <translatorcomment>再帰?</translatorcomment>
+ <translation type="unfinished">値 %1 の初期化は、それ自身に依存しています</translation>
+ </message>
+ <message>
+ <location line="+63"/>
+ <source>No variable by name %1 exists</source>
+ <translation type="unfinished">変数 %1 は存在しません</translation>
+ </message>
+ <message>
+ <location line="+2841"/>
+ <source>Version %1 is not supported. The supported XQuery version is 1.0.</source>
+ <translation type="unfinished">バージョン %1 はサポートされていません。XQuery バージョン 1.0 のみサポートされています。</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.</source>
+ <translation type="unfinished">エンコーディング &apos;%1&apos; は無効です。ラテン文字 (空白を除く) からなるもので、正規表現 &apos;%2&apos; にマッチするもののみ使用できます。</translation>
+ </message>
+ <message>
+ <location line="+55"/>
+ <source>No function with signature %1 is available</source>
+ <translation type="unfinished">シグネチャ %1 をもつ関数がみつかりません</translation>
+ </message>
+ <message>
+ <location line="+72"/>
+ <location line="+10"/>
+ <source>A default namespace declaration must occur before function, variable, and option declarations.</source>
+ <translation type="unfinished">標準の名前空間の宣言は、関数、変数、オプションの宣言の前にしなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>Namespace declarations must occur before function, variable, and option declarations.</source>
+ <translation type="unfinished">名前空間の宣言は、関数、変数、オプションの宣言の前にしなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>Module imports must occur before function, variable, and option declarations.</source>
+ <translation type="unfinished">モジュールのインポートは、関数、変数、オプションの宣言の前にしなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+102"/>
+ <source>The keyword %1 cannot occur with any other mode name.</source>
+ <translation type="unfinished">キーワード %1 は、他の名をともなって使用することはできません。</translation>
+ </message>
+ <message>
+ <location line="+29"/>
+ <source>The value of attribute %1 must of type %2, which %3 isn&apos;t.</source>
+ <translation type="unfinished">属性 &apos;%1&apos; の値として &apos;%3&apos; が指定されましたが、型 &apos;%2&apos; でなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+69"/>
+ <source>It is not possible to redeclare prefix %1.</source>
+ <translation type="unfinished">プレフィックス &apos;%1&apos; を再定義することはできません。</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>The prefix %1 can not be bound. By default, it is already bound to the namespace %2.</source>
+ <translation type="unfinished">プレフィックス &apos;%1&apos; はバウンドできません。デフォルトでは、それは既に名前空間 &apos;%2&apos; にバウンドされています。</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>Prefix %1 is already declared in the prolog.</source>
+ <translation type="unfinished">プロローグ部において、プレフィックス &apos;%1&apos; はすでに宣言されています。</translation>
+ </message>
+ <message>
+ <location line="+95"/>
+ <source>The name of an option must have a prefix. There is no default namespace for options.</source>
+ <translation type="unfinished">オプションの名前はプレフィックスをもたなければなりません。このオプションに対するデフォルトの名前空間は存在しません。</translation>
+ </message>
+ <message>
+ <location line="+171"/>
+ <source>The Schema Import feature is not supported, and therefore %1 declarations cannot occur.</source>
+ <translation type="unfinished">このスキーマのインポート機能は使用できません。また、&apos;%1&apos; 宣言も使用できません。</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>The target namespace of a %1 cannot be empty.</source>
+ <translation type="unfinished">名前空間 &apos;%1&apos; は、空であってはなりません。</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>The module import feature is not supported</source>
+ <translation type="unfinished">モジュールインポートの機能はサポートされていません</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>A variable by name %1 has already been declared.</source>
+ <translation type="unfinished">名前 &apos;%1&apos; の変数は、すでに宣言されています。</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>No value is available for the external variable by name %1.</source>
+ <translation type="unfinished">外部変数 &apos;%1&apos; の値がみつかりません。</translation>
+ </message>
+ <message>
+ <location line="+96"/>
+ <source>A stylesheet function must have a prefixed name.</source>
+ <translation type="unfinished">スタイルシート関数は、プレフィックス名を持たなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)</source>
+ <translation type="unfinished">ユーザ定義の関数の名前空間は、空であってはなりません。(すでに定義されているプレフィックス &apos;%1&apos; が使用できます)</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.</source>
+ <translation type="unfinished">名前空間 &apos;%1&apos; は予約済です。ユーザ定義の関数では使用することはできません。プレフィックス &apos;%2&apos; が使用できます。</translation>
+ </message>
+ <message>
+ <location line="+12"/>
+ <source>The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2</source>
+ <translation type="unfinished">ライブラリモジュールで使用されている名前空間は、モジュールの名前空間と同一でなければなりません。つまり、&apos;%2&apos; ではなく、&apos;%1&apos; でなければなりません</translation>
+ </message>
+ <message>
+ <location line="+34"/>
+ <source>A function already exists with the signature %1.</source>
+ <translation type="unfinished">シグネチャー &apos;%1&apos; の関数はすでに存在しています。</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>No external functions are supported. All supported functions can be used directly, without first declaring them as external</source>
+ <translation type="unfinished">外部関数はサポートされていません。すべてのサポートされている関数は、外部宣言をすることなく、直接使用することができます</translation>
+ </message>
+ <message>
+ <location line="+37"/>
+ <source>An argument by name %1 has already been declared. Every argument name must be unique.</source>
+ <translation type="unfinished">引数名 &apos;%1&apos; は既に宣言されています。すべての引数名はユニークである必要があります。</translation>
+ </message>
+ <message>
+ <location line="+179"/>
+ <source>When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.</source>
+ <translation type="unfinished">パターン一致の内側で関数 &apos;%1&apos; を使用する場合、引数はリテラルな文字列を参照する値でなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+11"/>
+ <source>In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.</source>
+ <translation type="unfinished">XSL-T パターンマッチングにおいて、関数 &apos;%1&apos; の最初の引数は、リテラルな文字列でなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+14"/>
+ <source>In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.</source>
+ <translatorcomment>variable ref?</translatorcomment>
+ <translation type="unfinished">XSL-T パターンマッチングにおいて、関数 &apos;%1&apos; への最初の引数は、リテラルか変数でなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>In an XSL-T pattern, function %1 cannot have a third argument.</source>
+ <translation type="unfinished">XSL-T パターンにおいて、関数 &apos;%1&apos; は三つの引数をもつことはできません。</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching.</source>
+ <translation type="unfinished">XSL-T パターンマッチングにおいて、関数 &apos;%1&apos; と &apos;%2&apos; のみ使用できます。&apos;%3&apos; は使用できません。</translation>
+ </message>
+ <message>
+ <location line="+63"/>
+ <source>In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can.</source>
+ <translation type="unfinished">XSL-T パターンにおいて、axis %1 は使用できません。%2 または %3 のみ使用できます。</translation>
+ </message>
+ <message>
+ <location line="+126"/>
+ <source>%1 is an invalid template mode name.</source>
+ <translation type="unfinished">%1 はテンプレートモジュール名として無効です。</translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.</source>
+ <translation type="unfinished">for 構文において使用する変数は、場所に関する変数とは異なる必要があります。つまり、&apos;%1&apos; が重複して使用されています。</translation>
+ </message>
+ <message>
+ <location line="+758"/>
+ <source>The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.</source>
+ <translation type="unfinished">スキーマの検証機能はサポートされていません。よって、&apos;%1&apos; 構文は使用できません。</translation>
+ </message>
+ <message>
+ <location line="+39"/>
+ <source>None of the pragma expressions are supported. Therefore, a fallback expression must be present</source>
+ <translation type="unfinished">pragma 構文はサポートされていません。fallback 構文でなければなりません</translation>
+ </message>
+ <message>
+ <location line="+267"/>
+ <source>Each name of a template parameter must be unique; %1 is duplicated.</source>
+ <translation type="unfinished">テンプレートパラメータ名はユニークである必要があります。&apos;%1&apos; は重複しています。</translation>
+ </message>
+ <message>
+ <location line="+129"/>
+ <source>The %1-axis is unsupported in XQuery</source>
+ <translation type="unfinished">XQuery において、%1 axis はサポートされていません</translation>
+ </message>
+ <message>
+ <location line="+286"/>
+ <source>No function by name %1 is available.</source>
+ <translation type="unfinished">関数名 &apos;%1&apos; はみつかりません。</translation>
+ </message>
+ <message>
+ <location line="+102"/>
+ <source>The namespace URI cannot be the empty string when binding to a prefix, %1.</source>
+ <translation type="unfinished">プレフィックス &apos;%1&apos; にバインディングする名前空間の URI は、空であってはなりません。</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>%1 is an invalid namespace URI.</source>
+ <translation type="unfinished">%1 は名前空間 URI として無効です。</translation>
+ </message>
+ <message>
+ <location line="+6"/>
+ <source>It is not possible to bind to the prefix %1</source>
+ <translation type="unfinished">プレフィックス %1 にバインドすることはできません</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).</source>
+ <translatorcomment>?</translatorcomment>
+ <translation type="unfinished">名前空間 %1 は %2 にのみバウンドできます。</translation>
+ </message>
+ <message>
+ <location line="+8"/>
+ <source>Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).</source>
+ <translation type="unfinished">プリフィックス %1 は %2 にのみバウンドできます。</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>Two namespace declaration attributes have the same name: %1.</source>
+ <translation type="unfinished">二つの名前空間宣言の属性が、同じ名前 &apos;%1&apos; をもっています。</translation>
+ </message>
+ <message>
+ <location line="+89"/>
+ <source>The namespace URI must be a constant and cannot use enclosed expressions.</source>
+ <translation type="unfinished">名前空間 URI は、constantでなければなりません。式を含むことはできません。</translation>
+ </message>
+ <message>
+ <location line="+16"/>
+ <source>An attribute by name %1 has already appeared on this element.</source>
+ <translation type="unfinished">属性名 &apos;%1&apos; は、すでにこのエレメントで使用されています。</translation>
+ </message>
+ <message>
+ <location line="+61"/>
+ <source>A direct element constructor is not well-formed. %1 is ended with %2.</source>
+ <translation type="unfinished">直積的な指定のエレメントがwell formedではありません。&apos;%1&apos; が、&apos;%2&apos; で終わっています。</translation>
+ </message>
+ <message>
+ <location line="+458"/>
+ <source>The name %1 does not refer to any schema type.</source>
+ <translation type="unfinished">名前 &apos;%1&apos; は、なんのスキーマタイプも参照していません。</translation>
+ </message>
+ <message>
+ <location line="+10"/>
+ <source>%1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.</source>
+ <translation type="unfinished">&apos;%1&apos; は complex 型です。complex 型への型変換はできません。しかし、アトミックな型である &apos;%2&apos; への変換はできます。</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>%1 is not an atomic type. Casting is only possible to atomic types.</source>
+ <translation type="unfinished">&apos;%1&apos; はアトミックな型ではありません。型変換はアトミックな型に対してのみ可能です。</translation>
+ </message>
+ <message>
+ <location line="+76"/>
+ <source>%1 is not a valid name for a processing-instruction.</source>
+ <translation type="unfinished">処理指定において、&apos;%1&apos; は無効です。</translation>
+ </message>
+ <message>
+ <location line="+69"/>
+ <location line="+71"/>
+ <source>%1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.</source>
+ <translation type="unfinished">&apos;%1&apos; は、スコープ属性宣言ではありません。スキーマインポート機能はサポートされていません。</translation>
+ </message>
+ <message>
+ <location line="+48"/>
+ <source>The name of an extension expression must be in a namespace.</source>
+ <translation type="unfinished">拡張式 (extension expression) の名前は、名前空間の中になければなりません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/parser/qxslttokenizer.cpp" line="+519"/>
+ <source>Element %1 is not allowed at this location.</source>
+ <translation type="unfinished">この場所にエレメント &apos;%1&apos; をおくことは許されていません。</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Text nodes are not allowed at this location.</source>
+ <translation type="unfinished">この場所にテキストノードをおくことは許されていません。</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Parse error: %1</source>
+ <translation type="unfinished">パースエラー: %1</translation>
+ </message>
+ <message>
+ <location line="+62"/>
+ <source>The value of the XSL-T version attribute must be a value of type %1, which %2 isn&apos;t.</source>
+ <translation type="unfinished">XSL-T バージョン属性の値は、&apos;%1&apos; 型でなければなりません。&apos;%2&apos; はそうではありません。</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Running an XSL-T 1.0 stylesheet with a 2.0 processor.</source>
+ <translation type="unfinished">XSL-T 1.0 のスタイルシートを 2.0 のプロセッサで使用します。</translation>
+ </message>
+ <message>
+ <location line="+108"/>
+ <source>Unknown XSL-T attribute %1.</source>
+ <translation type="unfinished">未知の XSL-T 属性 %1 があります。</translation>
+ </message>
+ <message>
+ <location line="+23"/>
+ <source>Attribute %1 and %2 are mutually exclusive.</source>
+ <translation type="unfinished">属性 &apos;%1&apos; と &apos;%2&apos; は排他的にのみ使用できます。</translation>
+ </message>
+ <message>
+ <location line="+166"/>
+ <source>In a simplified stylesheet module, attribute %1 must be present.</source>
+ <translation type="unfinished">simplified stylesheet モジュールにおいては、属性 &apos;%1&apos; を指定されなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+72"/>
+ <source>If element %1 has no attribute %2, it cannot have attribute %3 or %4.</source>
+ <translation type="unfinished">エレメント &apos;%1&apos; が属性 &apos;%2&apos; を持たない場合は、属性 &apos;%3&apos; や &apos;%4&apos; を使用することはできません。</translation>
+ </message>
+ <message>
+ <location line="+9"/>
+ <source>Element %1 must have at least one of the attributes %2 or %3.</source>
+ <translation type="unfinished">エレメント &apos;%1&apos; は、属性 &apos;%2&apos; か &apos;%3&apos; のいずれかを持たなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+28"/>
+ <source>At least one mode must be specified in the %1-attribute on element %2.</source>
+ <translation type="unfinished">エレメント &apos;%2&apos; において、&apos;%1&apos; 属性は少くとも一つのモードを指定しなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+123"/>
+ <source>Element %1 must come last.</source>
+ <translation type="unfinished">エレメント %1 は最後になければなりません。</translation>
+ </message>
+ <message>
+ <location line="+24"/>
+ <source>At least one %1-element must occur before %2.</source>
+ <translation type="unfinished">%2 の前に、少くとも一つは %1 エレメントが存在しなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>Only one %1-element can appear.</source>
+ <translation type="unfinished">%1 エレメントは一つのみ存在しなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+31"/>
+ <source>At least one %1-element must occur inside %2.</source>
+ <translation type="unfinished">%2 の内側には、少くとも一つの &apos;%1&apos; エレメントが存在しなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+58"/>
+ <source>When attribute %1 is present on %2, a sequence constructor cannot be used.</source>
+ <translation type="unfinished">%2 に属性 %1 がある場合、sequence constructor は使用できません。</translation>
+ </message>
+ <message>
+ <location line="+13"/>
+ <source>Element %1 must have either a %2-attribute or a sequence constructor.</source>
+ <translation type="unfinished">エレメント %1 には、%2 属性またはsequence constructorがなければなりません。</translation>
+ </message>
+ <message>
+ <location line="+125"/>
+ <source>When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor.</source>
+ <translation type="unfinished">パラメータが要求されているときには、デフォルトの値は、%1 属性または sequence constructor によって指定されていてはなりません。</translation>
+ </message>
+ <message>
+ <location line="+270"/>
+ <source>Element %1 cannot have children.</source>
+ <translation type="unfinished">エレメント %1 は、子要素を持つことができません。</translation>
+ </message>
+ <message>
+ <location line="+434"/>
+ <source>Element %1 cannot have a sequence constructor.</source>
+ <translation type="unfinished">エレメント %1 は、sequence constructor を含むことができません。</translation>
+ </message>
+ <message>
+ <location line="+86"/>
+ <location line="+9"/>
+ <source>The attribute %1 cannot appear on %2, when it is a child of %3.</source>
+ <translation type="unfinished">%2 が %3 の子要素であるときは、属性 %1 を使用してはなりません。</translation>
+ </message>
+ <message>
+ <location line="+15"/>
+ <source>A parameter in a function cannot be declared to be a tunnel.</source>
+ <translation type="unfinished">関数へのパラメータは、トンネルであってはなりません。</translation>
+ </message>
+ <message>
+ <location line="+149"/>
+ <source>This processor is not Schema-aware and therefore %1 cannot be used.</source>
+ <translation type="unfinished">この処理系は、Schema-aware ではありません。よって、%1 は使用できません。</translation>
+ </message>
+ <message>
+ <location line="+57"/>
+ <source>Top level stylesheet elements must be in a non-null namespace, which %1 isn&apos;t.</source>
+ <translation type="unfinished">トップレベルのスタイルシートのエレメントは、non-nullな名前空間を持っていなければなりません。しかし、%1 はそうではありません。</translation>
+ </message>
+ <message>
+ <location line="+48"/>
+ <source>The value for attribute %1 on element %2 must either be %3 or %4, not %5.</source>
+ <translation type="unfinished">エレメント %2 の属性 %1 の値は、%3 または %4 でなければなりません。%5 は異なります。</translation>
+ </message>
+ <message>
+ <location line="+20"/>
+ <source>Attribute %1 cannot have the value %2.</source>
+ <translation type="unfinished">属性 %1 に、値 %2 を指定することはできません。</translation>
+ </message>
+ <message>
+ <location line="+58"/>
+ <source>The attribute %1 can only appear on the first %2 element.</source>
+ <translation type="unfinished">属性 %1 は、最初の %2 エレメントにのみ指定できます。</translation>
+ </message>
+ <message>
+ <location line="+99"/>
+ <source>At least one %1 element must appear as child of %2.</source>
+ <translation type="unfinished">%2 の子要素としては、少くとも一つは %1 エレメントがなければなりません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/type/qcardinality.cpp" line="+55"/>
+ <source>empty</source>
+ <translation type="unfinished">空</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>zero or one</source>
+ <translation type="unfinished">ゼロまたは一つ</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>exactly one</source>
+ <translation type="unfinished">厳密に一つ</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>one or more</source>
+ <translation type="unfinished">一つまたは複数</translation>
+ </message>
+ <message>
+ <location line="+2"/>
+ <source>zero or more</source>
+ <translation type="unfinished">ゼロまたはそれ以上</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/type/qtypechecker.cpp" line="+63"/>
+ <source>Required type is %1, but %2 was found.</source>
+ <translation type="unfinished">要求されている型は %1 ですが、 %2 があります。</translation>
+ </message>
+ <message>
+ <location line="+44"/>
+ <source>Promoting %1 to %2 may cause loss of precision.</source>
+ <translation type="unfinished">%1 を %2 に変換する際に、精度のロスが生じます。</translation>
+ </message>
+ <message>
+ <location line="+49"/>
+ <source>The focus is undefined.</source>
+ <translation type="unfinished">フォーカスが定義されていません。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/utils/qoutputvalidator.cpp" line="+86"/>
+ <source>It&apos;s not possible to add attributes after any other kind of node.</source>
+ <translation type="unfinished">他の種類のノードの中では、属性を追加することはできません。</translation>
+ </message>
+ <message>
+ <location line="+7"/>
+ <source>An attribute by name %1 has already been created.</source>
+ <translation type="unfinished">名前 &apos;%1&apos; の属性は、すでに生成されています。</translation>
+ </message>
+ <message>
+ <location filename="../src/xmlpatterns/utils/qxpathhelper_p.h" line="+120"/>
+ <source>Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.</source>
+ <translation type="unfinished">UNICODE Codepoint Collection のみ使用できます(%1)。 %2 はサポートされていません。</translation>
</message>
</context>
<context>
@@ -3720,7 +4829,7 @@ Do you want to delete it anyway?</source>
<message>
<location line="-68"/>
<source>The plugin was not loaded.</source>
- <translation type="unfinished"></translation>
+ <translation>そのプラグインはロードされていません。</translation>
</message>
</context>
<context>
@@ -4036,219 +5145,221 @@ Do you want to overwrite it?</source>
<message>
<location filename="../src/gui/dialogs/qprintdialog_qws.cpp" line="-210"/>
<source>File exists</source>
- <translation type="unfinished"></translation>
+ <translation>ファイルは既に存在しています</translation>
</message>
<message>
<location line="+1"/>
<source>&lt;qt&gt;Do you want to overwrite it?&lt;/qt&gt;</source>
- <translation type="unfinished"></translation>
+ <translation>&lt;qt&gt;ファイルを上書きしてもよろしいですか?&lt;/qt&gt;</translation>
</message>
<message>
<location line="+227"/>
<source>Print selection</source>
- <translation type="unfinished"></translation>
+ <translation>選択された範囲を印刷</translation>
</message>
<message>
<location filename="../src/gui/dialogs/qprintdialog_unix.cpp" line="-8"/>
<source>%1 is a directory.
Please choose a different file name.</source>
- <translation type="unfinished"></translation>
+ <translation>%1 はディレクトリです。
+ファイル名を指定してください。</translation>
</message>
<message>
<location filename="../src/gui/dialogs/qpagesetupdialog_unix.cpp" line="-232"/>
<source>A0</source>
- <translation type="unfinished"></translation>
+ <translation>A0</translation>
</message>
<message>
<location line="+1"/>
<source>A1</source>
- <translation type="unfinished"></translation>
+ <translation>A1</translation>
</message>
<message>
<location line="+1"/>
<source>A2</source>
- <translation type="unfinished"></translation>
+ <translation>A2</translation>
</message>
<message>
<location line="+1"/>
<source>A3</source>
- <translation type="unfinished"></translation>
+ <translation>A3</translation>
</message>
<message>
<location line="+1"/>
<source>A4</source>
- <translation type="unfinished"></translation>
+ <translation>A4</translation>
</message>
<message>
<location line="+1"/>
<source>A5</source>
- <translation type="unfinished"></translation>
+ <translation>A5</translation>
</message>
<message>
<location line="+1"/>
<source>A6</source>
- <translation type="unfinished"></translation>
+ <translation>A6</translation>
</message>
<message>
<location line="+1"/>
<source>A7</source>
- <translation type="unfinished"></translation>
+ <translation>A7</translation>
</message>
<message>
<location line="+1"/>
<source>A8</source>
- <translation type="unfinished"></translation>
+ <translation>A8</translation>
</message>
<message>
<location line="+1"/>
<source>A9</source>
- <translation type="unfinished"></translation>
+ <translation>A9</translation>
</message>
<message>
<location line="+1"/>
<source>B0</source>
- <translation type="unfinished"></translation>
+ <translation>B0</translation>
</message>
<message>
<location line="+1"/>
<source>B1</source>
- <translation type="unfinished"></translation>
+ <translation>B1</translation>
</message>
<message>
<location line="+1"/>
<source>B2</source>
- <translation type="unfinished"></translation>
+ <translation>B2</translation>
</message>
<message>
<location line="+1"/>
<source>B3</source>
- <translation type="unfinished"></translation>
+ <translation>B3</translation>
</message>
<message>
<location line="+1"/>
<source>B4</source>
- <translation type="unfinished"></translation>
+ <translation>B4</translation>
</message>
<message>
<location line="+1"/>
<source>B5</source>
- <translation type="unfinished"></translation>
+ <translation>B5</translation>
</message>
<message>
<location line="+1"/>
<source>B6</source>
- <translation type="unfinished"></translation>
+ <translation>B6</translation>
</message>
<message>
<location line="+1"/>
<source>B7</source>
- <translation type="unfinished"></translation>
+ <translation>B7</translation>
</message>
<message>
<location line="+1"/>
<source>B8</source>
- <translation type="unfinished"></translation>
+ <translation>B8</translation>
</message>
<message>
<location line="+1"/>
<source>B9</source>
- <translation type="unfinished"></translation>
+ <translation>B9</translation>
</message>
<message>
<location line="+1"/>
<source>B10</source>
- <translation type="unfinished"></translation>
+ <translation>B10</translation>
</message>
<message>
<location line="+1"/>
<source>C5E</source>
- <translation type="unfinished"></translation>
+ <translation>C5E</translation>
</message>
<message>
<location line="+1"/>
<source>DLE</source>
- <translation type="unfinished"></translation>
+ <translation>DLE</translation>
</message>
<message>
<location line="+1"/>
<source>Executive</source>
- <translation type="unfinished"></translation>
+ <translation>Exclusive</translation>
</message>
<message>
<location line="+1"/>
<source>Folio</source>
- <translation type="unfinished"></translation>
+ <translation>Folio</translation>
</message>
<message>
<location line="+1"/>
<source>Ledger</source>
- <translation type="unfinished"></translation>
+ <translation>Ledger</translation>
</message>
<message>
<location line="+1"/>
<source>Legal</source>
- <translation type="unfinished"></translation>
+ <translation>リーガルサイズ</translation>
</message>
<message>
<location line="+1"/>
<source>Letter</source>
- <translation type="unfinished"></translation>
+ <translation>レターサイズ</translation>
</message>
<message>
<location line="+1"/>
<source>Tabloid</source>
- <translation type="unfinished"></translation>
+ <translation>タブロイドサイズ</translation>
</message>
<message>
<location line="+1"/>
<source>US Common #10 Envelope</source>
- <translation type="unfinished"></translation>
+ <translation>US標準#10封筒</translation>
</message>
<message>
<location line="+1"/>
<source>Custom</source>
- <translation type="unfinished"></translation>
+ <translation>カスタム</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 type="unfinished"></translation>
+ <translation>オプション(&amp;O) &gt;&gt;</translation>
</message>
<message>
<location line="-63"/>
<source>&amp;Print</source>
- <translation type="unfinished"></translation>
+ <translation>印刷(&amp;P)</translation>
</message>
<message>
<location line="+67"/>
<source>&amp;Options &lt;&lt;</source>
- <translation type="unfinished"></translation>
+ <translation>オプション(&amp;O) &lt;&lt;</translation>
</message>
<message>
<location line="+253"/>
<source>Print to File (PDF)</source>
- <translation type="unfinished"></translation>
+ <translation>PDFファイルに出力</translation>
</message>
<message>
<location line="+1"/>
<source>Print to File (Postscript)</source>
- <translation type="unfinished"></translation>
+ <translation>Postscriptファイルに出力</translation>
</message>
<message>
- <location line="+45"/>
+ <location line="+47"/>
<source>Local file</source>
- <translation type="unfinished"></translation>
+ <translation>ローカルファイル</translation>
</message>
<message>
<location line="+1"/>
<source>Write %1 file</source>
- <translation type="unfinished"></translation>
+ <translation>ファイル %1 に書き込みました</translation>
</message>
<message>
<location filename="../src/gui/dialogs/qprintdialog_win.cpp" line="+1"/>
<source>The &apos;From&apos; value cannot be greater than the &apos;To&apos; value.</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>QPrintPropertiesWidgetにFromとToがあってそれを指している</translatorcomment>
+ <translation>印刷開始ページ番号は、印刷終了ページ番号より小さくなければなりません。</translation>
</message>
</context>
<context>
@@ -4257,107 +5368,106 @@ Please choose a different file name.</source>
<location filename="../src/gui/dialogs/qabstractpagesetupdialog.cpp" line="+68"/>
<location line="+12"/>
<source>Page Setup</source>
- <translation type="unfinished"></translation>
+ <translation>ページの設定</translation>
</message>
<message>
- <location filename="../src/gui/dialogs/qprintpreviewdialog.cpp" line="+252"/>
+ <location filename="../src/gui/dialogs/qprintpreviewdialog.cpp" line="+246"/>
<source>%1%</source>
- <translation type="unfinished"></translation>
+ <translation>%1%</translation>
</message>
<message>
- <location line="+79"/>
+ <location line="+68"/>
<source>Print Preview</source>
- <translation type="unfinished"></translation>
+ <translation>印刷のプレビュー</translation>
</message>
<message>
- <location line="+29"/>
+ <location line="+30"/>
<source>Next page</source>
- <translation type="unfinished"></translation>
+ <translation>次のページ</translation>
</message>
<message>
<location line="+1"/>
<source>Previous page</source>
- <translation type="unfinished"></translation>
+ <translation>前のページ</translation>
</message>
<message>
<location line="+1"/>
<source>First page</source>
- <translation type="unfinished"></translation>
+ <translation>最初のページ</translation>
</message>
<message>
<location line="+1"/>
<source>Last page</source>
- <translation type="unfinished"></translation>
+ <translation>最後のページ</translation>
</message>
<message>
<location line="+9"/>
<source>Fit width</source>
- <translation type="unfinished"></translation>
+ <translation>幅をあわせる</translation>
</message>
<message>
<location line="+1"/>
<source>Fit page</source>
- <translation type="unfinished"></translation>
+ <translation>高さをあわせる</translation>
</message>
<message>
<location line="+11"/>
<source>Zoom in</source>
- <translation type="unfinished"></translation>
+ <translation>拡大</translation>
</message>
<message>
<location line="+1"/>
<source>Zoom out</source>
- <translation type="unfinished"></translation>
+ <translation>縮小</translation>
</message>
<message>
<location line="+6"/>
<source>Portrait</source>
- <translation type="unfinished">縦</translation>
+ <translation>縦</translation>
</message>
<message>
<location line="+1"/>
<source>Landscape</source>
- <translation type="unfinished">横</translation>
+ <translation>横</translation>
</message>
<message>
<location line="+10"/>
<source>Show single page</source>
- <translation type="unfinished"></translation>
+ <translation>一枚のページを表示する</translation>
</message>
<message>
<location line="+1"/>
<source>Show facing pages</source>
- <translation type="unfinished"></translation>
+ <translation>見開きのページを表示する</translation>
</message>
<message>
<location line="+1"/>
<source>Show overview of all pages</source>
- <translation type="unfinished"></translation>
+ <translation>すべてのページを表示する</translation>
</message>
<message>
<location line="+15"/>
<source>Print</source>
- <translation type="unfinished"></translation>
+ <translation>印刷</translation>
</message>
<message>
<location line="+1"/>
<source>Page setup</source>
- <translation type="unfinished"></translation>
+ <translation>ページの設定</translation>
</message>
<message>
- <location line="+1"/>
<source>Close</source>
- <translation type="unfinished">閉じる</translation>
+ <translation type="obsolete">閉じる</translation>
</message>
<message>
- <location line="+151"/>
+ <location line="+150"/>
<source>Export to PDF</source>
- <translation type="unfinished"></translation>
+ <translation>PDFに出力</translation>
</message>
<message>
<location line="+3"/>
<source>Export to PostScript</source>
- <translation type="unfinished"></translation>
+ <translation>Postscriptに出力</translation>
</message>
</context>
<context>
@@ -4380,17 +5490,17 @@ Please choose a different file name.</source>
<message>
<location filename="../src/gui/dialogs/qprintpropertieswidget.ui"/>
<source>Form</source>
- <translation type="unfinished"></translation>
+ <translation>書式</translation>
</message>
<message>
<location/>
<source>Page</source>
- <translation type="unfinished"></translation>
+ <translation>ページ</translation>
</message>
<message>
<location/>
<source>Advanced</source>
- <translation type="unfinished"></translation>
+ <translation>高度な設定</translation>
</message>
</context>
<context>
@@ -4398,97 +5508,97 @@ Please choose a different file name.</source>
<message>
<location filename="../src/gui/dialogs/qprintsettingsoutput.ui"/>
<source>Form</source>
- <translation type="unfinished"></translation>
+ <translation>書式</translation>
</message>
<message>
<location/>
<source>Copies</source>
- <translation type="unfinished">印刷部数</translation>
+ <translation>印刷部数</translation>
</message>
<message>
<location/>
<source>Print range</source>
- <translation type="unfinished">印刷範囲</translation>
+ <translation>印刷範囲</translation>
</message>
<message>
<location/>
<source>Print all</source>
- <translation type="unfinished">すべて印刷</translation>
+ <translation>すべて印刷</translation>
</message>
<message>
<location/>
<source>Pages from</source>
- <translation type="unfinished">先頭のページ:</translation>
+ <translation>先頭のページ</translation>
</message>
<message>
<location/>
<source>to</source>
- <translation type="unfinished">末尾のページ:</translation>
+ <translation>末尾のページ</translation>
</message>
<message>
<location/>
<source>Selection</source>
- <translation type="unfinished">選択した部分を印刷</translation>
+ <translation>選択した部分を印刷</translation>
</message>
<message>
<location/>
<source>Output Settings</source>
- <translation type="unfinished"></translation>
+ <translation>出力設定</translation>
</message>
<message>
<location/>
<source>Copies:</source>
- <translation type="unfinished"></translation>
+ <translation>印刷部数:</translation>
</message>
<message>
<location/>
<source>Collate</source>
- <translation type="unfinished">丁合い</translation>
+ <translation>丁合い</translation>
</message>
<message>
<location/>
<source>Reverse</source>
- <translation type="unfinished"></translation>
+ <translation>逆順</translation>
</message>
<message>
<location/>
<source>Options</source>
- <translation type="unfinished"></translation>
+ <translation>オプション</translation>
</message>
<message>
<location/>
<source>Color Mode</source>
- <translation type="unfinished"></translation>
+ <translation>色</translation>
</message>
<message>
<location/>
<source>Color</source>
- <translation type="unfinished"></translation>
+ <translation>カラー</translation>
</message>
<message>
<location/>
<source>Grayscale</source>
- <translation type="unfinished"></translation>
+ <translation>グレースケール</translation>
</message>
<message>
<location/>
<source>Duplex Printing</source>
- <translation type="unfinished"></translation>
+ <translation>両面印刷</translation>
</message>
<message>
<location/>
<source>None</source>
- <translation type="unfinished"></translation>
+ <translation>なし</translation>
</message>
<message>
<location/>
<source>Long side</source>
- <translation type="unfinished"></translation>
+ <translation>長辺綴じ</translation>
</message>
<message>
<location/>
<source>Short side</source>
- <translation type="unfinished"></translation>
+ <translation>短辺綴じ</translation>
</message>
</context>
<context>
@@ -4496,47 +5606,47 @@ Please choose a different file name.</source>
<message>
<location filename="../src/gui/dialogs/qprintwidget.ui"/>
<source>Form</source>
- <translation type="unfinished"></translation>
+ <translation>書式</translation>
</message>
<message>
<location/>
<source>Printer</source>
- <translation type="unfinished">プリンタ</translation>
+ <translation>プリンタ</translation>
</message>
<message>
<location/>
<source>&amp;Name:</source>
- <translation type="unfinished"></translation>
+ <translation>名前(&amp;N):</translation>
</message>
<message>
<location/>
<source>P&amp;roperties</source>
- <translation type="unfinished"></translation>
+ <translation>プロパティ(&amp;r)</translation>
</message>
<message>
<location/>
<source>Location:</source>
- <translation type="unfinished"></translation>
+ <translation>設置場所:</translation>
</message>
<message>
<location/>
<source>Preview</source>
- <translation type="unfinished"></translation>
+ <translation>プレビュー</translation>
</message>
<message>
<location/>
<source>Type:</source>
- <translation type="unfinished"></translation>
+ <translation>タイプ:</translation>
</message>
<message>
<location/>
<source>Output &amp;file:</source>
- <translation type="unfinished"></translation>
+ <translation>出力ファイル名(&amp;f):</translation>
</message>
<message>
<location/>
<source>...</source>
- <translation type="unfinished"></translation>
+ <translation>...</translation>
</message>
</context>
<context>
@@ -4545,61 +5655,61 @@ Please choose a different file name.</source>
<location filename="../src/corelib/io/qprocess_unix.cpp" line="+475"/>
<location filename="../src/corelib/io/qprocess_win.cpp" line="+147"/>
<source>Could not open input redirection for reading</source>
- <translation type="unfinished"></translation>
+ <translation>標準入力リダイレクトを読み込みのためにオープンすることができません</translation>
</message>
<message>
<location line="+12"/>
<location filename="../src/corelib/io/qprocess_win.cpp" line="+36"/>
<source>Could not open output redirection for writing</source>
- <translation type="unfinished"></translation>
+ <translation>標準出力リダイレクトを書き込みのためにオープンすることができません</translation>
</message>
<message>
- <location line="+235"/>
+ <location line="+241"/>
<source>Resource error (fork failure): %1</source>
- <translation type="unfinished"></translation>
+ <translation>リソースエラー (fork に失敗しました): %1</translation>
</message>
<message>
<location line="+259"/>
<location line="+53"/>
<location line="+74"/>
<location line="+67"/>
- <location filename="../src/corelib/io/qprocess_win.cpp" line="+422"/>
+ <location filename="../src/corelib/io/qprocess_win.cpp" line="+447"/>
<location line="+50"/>
<location line="+75"/>
<location line="+42"/>
<location line="+54"/>
<source>Process operation timed out</source>
- <translation type="unfinished"></translation>
+ <translation>プロセス処理がタイムアウトしました</translation>
</message>
<message>
- <location filename="../src/corelib/io/qprocess.cpp" line="+533"/>
+ <location filename="../src/corelib/io/qprocess.cpp" line="+558"/>
<location line="+52"/>
<location filename="../src/corelib/io/qprocess_win.cpp" line="-211"/>
<location line="+50"/>
<source>Error reading from process</source>
- <translation type="unfinished"></translation>
+ <translation>プロセスからの読み込みにおいてエラーが発生しました</translation>
</message>
<message>
<location line="+47"/>
- <location line="+779"/>
+ <location line="+833"/>
<location filename="../src/corelib/io/qprocess_win.cpp" line="+140"/>
<source>Error writing to process</source>
- <translation type="unfinished"></translation>
+ <translation>プロセスへの書き込みにおいてエラーが発生しました</translation>
</message>
<message>
- <location line="-709"/>
+ <location line="-763"/>
<source>Process crashed</source>
- <translation type="unfinished"></translation>
+ <translation>プロセスがクラッシュしました</translation>
</message>
<message>
- <location line="+912"/>
+ <location line="+966"/>
<source>No program defined</source>
- <translation type="unfinished"></translation>
+ <translation>プログラム名が指定されていません</translation>
</message>
<message>
<location filename="../src/corelib/io/qprocess_win.cpp" line="-341"/>
<source>Process failed to start</source>
- <translation type="unfinished"></translation>
+ <translation>プロセスのスタートに失敗しました</translation>
</message>
</context>
<context>
@@ -4739,7 +5849,7 @@ Please choose a different file name.</source>
<message>
<location line="+15"/>
<source>Unable to rollback transaction</source>
- <translation type="unfinished">トランザクションをロールバックできません</translation>
+ <translation>トランザクションをロールバックできません</translation>
</message>
</context>
<context>
@@ -4774,7 +5884,7 @@ Please choose a different file name.</source>
<message>
<location line="-208"/>
<source>No query</source>
- <translation type="unfinished"></translation>
+ <translation>クェリーがありません</translation>
</message>
</context>
<context>
@@ -4867,105 +5977,109 @@ Please choose a different file name.</source>
<message>
<location filename="../src/corelib/kernel/qsharedmemory.cpp" line="+207"/>
<source>%1: unable to set key on lock</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>共有メモリ関連</translatorcomment>
+ <translation>%1: ロックするためのキーを設定できません</translation>
</message>
<message>
<location line="+81"/>
<source>%1: create size is less then 0</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 0より小さいサイズの共有メモリは作成できません</translation>
</message>
<message>
<location line="+168"/>
<location filename="../src/corelib/kernel/qsharedmemory_p.h" line="+148"/>
<source>%1: unable to lock</source>
- <translation type="unfinished"></translation>
+ <translation>%1: ロックできません</translation>
</message>
<message>
<location line="+22"/>
<source>%1: unable to unlock</source>
- <translation type="unfinished"></translation>
+ <translation>%1: アンロックできません</translation>
</message>
<message>
- <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+78"/>
+ <location filename="../src/corelib/kernel/qsharedmemory_unix.cpp" line="+77"/>
<location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+87"/>
<source>%1: permission denied</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 許可されていません</translation>
</message>
<message>
<location line="+4"/>
<location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="-22"/>
<source>%1: already exists</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 既に存在します</translation>
</message>
<message>
<location line="+4"/>
<location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+9"/>
<source>%1: doesn&apos;t exists</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 存在しません</translation>
</message>
<message>
<location line="+6"/>
<location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+9"/>
<source>%1: out of resources</source>
- <translation type="unfinished"></translation>
+ <translation>%1: リソース不足です</translation>
</message>
<message>
<location line="+4"/>
<location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+7"/>
<source>%1: unknown error %2</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 未知のエラー %2</translation>
</message>
<message>
<location line="+21"/>
<source>%1: key is empty</source>
- <translation type="unfinished"></translation>
+ <translation>%1: キーが空です</translation>
</message>
<message>
<location line="+8"/>
<source>%1: unix key file doesn&apos;t exists</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>?</translatorcomment>
+ <translation>%1: UNIX key file が存在しません</translation>
</message>
<message>
<location line="+7"/>
<source>%1: ftok failed</source>
- <translation type="unfinished"></translation>
+ <translation>%1: fork に失敗しました</translation>
</message>
<message>
<location line="+51"/>
<location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="+15"/>
<source>%1: unable to make key</source>
- <translation type="unfinished"></translation>
+ <translation>%1: キーを作成できません</translation>
</message>
<message>
<location line="+20"/>
<source>%1: system-imposed size restrictions</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>EINVAL</translatorcomment>
+ <translation>%1: 指定されたサイズはシステムにより拒否されました</translation>
</message>
<message>
<location line="+53"/>
<source>%1: not attached</source>
- <translation type="unfinished"></translation>
+ <translation>%1: アタッチしていません</translation>
</message>
<message>
<location filename="../src/corelib/kernel/qsharedmemory_win.cpp" line="-27"/>
<source>%1: invalid size</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 無効なサイズです</translation>
</message>
<message>
<location line="+68"/>
<source>%1: key error</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>safekey.isEmpty()==true</translatorcomment>
+ <translation>%1: キーかありません</translation>
</message>
<message>
<location line="+38"/>
<source>%1: size query failed</source>
- <translation type="unfinished"></translation>
+ <translation>%1: サイズのクェリーに失敗しました</translation>
</message>
</context>
<context>
<name>QShortcut</name>
<message>
- <location filename="../src/gui/kernel/qkeysequence.cpp" line="+373"/>
+ <location filename="../src/gui/kernel/qkeysequence.cpp" line="+394"/>
<source>Space</source>
<translation>Space</translation>
</message>
@@ -5395,36 +6509,36 @@ Please choose a different file name.</source>
<translation>Flip</translation>
</message>
<message>
- <location line="+527"/>
- <location line="+122"/>
+ <location line="+559"/>
+ <location line="+135"/>
<source>Ctrl</source>
<translation>Ctrl</translation>
</message>
<message>
- <location line="-121"/>
- <location line="+125"/>
+ <location line="-134"/>
+ <location line="+138"/>
<source>Shift</source>
<translation>Shift</translation>
</message>
<message>
- <location line="-124"/>
- <location line="+122"/>
+ <location line="-137"/>
+ <location line="+135"/>
<source>Alt</source>
<translation>Alt</translation>
</message>
<message>
- <location line="-121"/>
- <location line="+117"/>
+ <location line="-134"/>
+ <location line="+130"/>
<source>Meta</source>
<translation>Meta</translation>
</message>
<message>
- <location line="-25"/>
+ <location line="-40"/>
<source>+</source>
<translation>+</translation>
</message>
<message>
- <location line="+46"/>
+ <location line="+61"/>
<source>F%1</source>
<translation>F%1</translation>
</message>
@@ -5449,8 +6563,7 @@ Please choose a different file name.</source>
<message>
<location line="+3"/>
<source>Page right</source>
- <translation>1ページ右へスクロール
-</translation>
+ <translation>1ページ右へスクロール</translation>
</message>
<message>
<location line="+0"/>
@@ -5463,67 +6576,68 @@ Please choose a different file name.</source>
<message>
<location filename="../src/network/socket/qsocks5socketengine.cpp" line="-67"/>
<source>Connection to proxy refused</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーへの接続が拒否されました</translation>
</message>
<message>
<location line="+4"/>
<source>Connection to proxy closed prematurely</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーの接続が通信の終了前に切断されました</translation>
</message>
<message>
<location line="+4"/>
<source>Proxy host not found</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーホストが見つかりません</translation>
</message>
<message>
<location line="+5"/>
<source>Connection to proxy timed out</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーとの接続がタイムアウトしました</translation>
</message>
<message>
<location line="+17"/>
<source>Proxy authentication failed</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーの認証に失敗しました</translation>
</message>
<message>
<location line="+1"/>
<source>Proxy authentication failed: %1</source>
- <translation type="unfinished"></translation>
+ <translation>プロキシーの認証に失敗しました: %1</translation>
</message>
<message>
<location line="+9"/>
<source>SOCKS version 5 protocol error</source>
- <translation type="unfinished"></translation>
+ <translation>SOCKS バージョン 5 プロトコルのエラーです</translation>
</message>
<message>
<location line="+19"/>
<source>General SOCKSv5 server failure</source>
- <translation type="unfinished"></translation>
+ <translation>SOCKS バージョン 5 サーバのエラーです</translation>
</message>
<message>
<location line="+4"/>
<source>Connection not allowed by SOCKSv5 server</source>
- <translation type="unfinished"></translation>
+ <translation>SOCKSv5 サーバより接続を拒否されました</translation>
</message>
<message>
<location line="+16"/>
<source>TTL expired</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>実際はホップ数です</translatorcomment>
+ <translation>有効期限(TTL)がきれました</translation>
</message>
<message>
<location line="+4"/>
<source>SOCKSv5 command not supported</source>
- <translation type="unfinished"></translation>
+ <translation>この SOCKSv5 コマンドはサポートされていません</translation>
</message>
<message>
<location line="+4"/>
<source>Address type not supported</source>
- <translation type="unfinished"></translation>
+ <translation>指定されたアドレスタイプはサポートされていません</translation>
</message>
<message>
<location line="+5"/>
<source>Unknown SOCKSv5 proxy error code 0x%1</source>
- <translation type="unfinished"></translation>
+ <translation>未知の SOCKSv5 プロキシーエラーです: 0x%1</translation>
</message>
<message>
<source>Socks5 timeout error connecting to socks server</source>
@@ -5532,7 +6646,7 @@ Please choose a different file name.</source>
<message>
<location line="+685"/>
<source>Network operation timed out</source>
- <translation type="unfinished">ネットワーク操作がタイムアウトしました</translation>
+ <translation>ネットワーク操作がタイムアウトしました</translation>
</message>
</context>
<context>
@@ -5610,57 +6724,57 @@ Please choose a different file name.</source>
<message>
<location filename="../src/network/ssl/qsslsocket_openssl.cpp" line="+260"/>
<source>Error creating SSL context (%1)</source>
- <translation type="unfinished"></translation>
+ <translation>SSL content の作成に失敗しました (%1)</translation>
</message>
<message>
<location line="+25"/>
<source>Invalid or empty cipher list (%1)</source>
- <translation type="unfinished"></translation>
+ <translation>暗号方式リストが無効または空です (%1)</translation>
</message>
<message>
<location line="+16"/>
<source>Cannot provide a certificate with no key, %1</source>
- <translation type="unfinished"></translation>
+ <translation>鍵が指定されていないため、証明書を扱えません。 %1</translation>
</message>
<message>
<location line="+7"/>
<source>Error loading local certificate, %1</source>
- <translation type="unfinished"></translation>
+ <translation>ローカルの証明書をロードできません。 %1</translation>
</message>
<message>
<location line="+12"/>
<source>Error loading private key, %1</source>
- <translation type="unfinished"></translation>
+ <translation>プライベートキーをロードできません。 %1</translation>
</message>
<message>
<location line="+7"/>
<source>Private key does not certificate public key, %1</source>
- <translation type="unfinished"></translation>
+ <translation>プライベートキーが、パブリックキーの証明書となっていません %1</translation>
</message>
<message>
<location line="+20"/>
<source>Error creating SSL session, %1</source>
- <translation type="unfinished"></translation>
+ <translation>SSL セッションを作成できません。 %1</translation>
</message>
<message>
<location line="+15"/>
<source>Error creating SSL session: %1</source>
- <translation type="unfinished"></translation>
+ <translation>SSL セッションを作成できません: %1</translation>
</message>
<message>
<location line="+207"/>
<source>Unable to write data: %1</source>
- <translation type="unfinished"></translation>
+ <translation>書き込みできません: %1</translation>
</message>
<message>
<location line="+119"/>
<source>Error while reading: %1</source>
- <translation type="unfinished"></translation>
+ <translation>読み込み時にエラーが発生しました: %1</translation>
</message>
<message>
<location line="+96"/>
<source>Error during SSL handshake: %1</source>
- <translation type="unfinished"></translation>
+ <translation>SSL ハンドシェーク時にエラーが発生しました: %1</translation>
</message>
</context>
<context>
@@ -5669,29 +6783,29 @@ Please choose a different file name.</source>
<location filename="../src/corelib/kernel/qsystemsemaphore_unix.cpp" line="-41"/>
<location filename="../src/corelib/kernel/qsystemsemaphore_win.cpp" line="+66"/>
<source>%1: out of resources</source>
- <translation type="unfinished"></translation>
+ <translation>%1: リソース不足です</translation>
</message>
<message>
<location line="-13"/>
<location filename="../src/corelib/kernel/qsystemsemaphore_win.cpp" line="+4"/>
<source>%1: permission denied</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 許可されていません</translation>
</message>
<message>
<location line="+4"/>
<source>%1: already exists</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 既に存在します</translation>
</message>
<message>
<location line="+4"/>
<source>%1: does not exist</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 存在しません</translation>
</message>
<message>
<location line="+9"/>
<location filename="../src/corelib/kernel/qsystemsemaphore_win.cpp" line="+3"/>
<source>%1: unknown error %2</source>
- <translation type="unfinished"></translation>
+ <translation>%1: 未知のエラーです %2</translation>
</message>
</context>
<context>
@@ -5729,7 +6843,7 @@ Please choose a different file name.</source>
<message>
<location filename="../src/network/socket/qtcpserver.cpp" line="+282"/>
<source>Operation on socket is not supported</source>
- <translation type="unfinished"></translation>
+ <translation>このソケットへの操作はサポートされていません</translation>
</message>
</context>
<context>
@@ -5837,52 +6951,52 @@ Please choose a different file name.</source>
<message>
<location filename="../src/gui/text/qtextcontrol.cpp" line="+884"/>
<source>LRM Left-to-right mark</source>
- <translation type="unfinished"></translation>
+ <translation>LRM (左横書き指定)</translation>
</message>
<message>
<location line="+1"/>
<source>RLM Right-to-left mark</source>
- <translation type="unfinished"></translation>
+ <translation>RLM (右横書き指定)</translation>
</message>
<message>
<location line="+1"/>
<source>ZWJ Zero width joiner</source>
- <translation type="unfinished"></translation>
+ <translation>ZWJ (幅のない接続文字)</translation>
</message>
<message>
<location line="+1"/>
<source>ZWNJ Zero width non-joiner</source>
- <translation type="unfinished"></translation>
+ <translation>ZWNJ (幅のない非接続文字)</translation>
</message>
<message>
<location line="+1"/>
<source>ZWSP Zero width space</source>
- <translation type="unfinished"></translation>
+ <translation>ZWSP (幅の無い空白)</translation>
</message>
<message>
<location line="+1"/>
<source>LRE Start of left-to-right embedding</source>
- <translation type="unfinished"></translation>
+ <translation>LRE (左横書き開始指定)</translation>
</message>
<message>
<location line="+1"/>
<source>RLE Start of right-to-left embedding</source>
- <translation type="unfinished"></translation>
+ <translation>RLE (右横書き開始指定)</translation>
</message>
<message>
<location line="+1"/>
<source>LRO Start of left-to-right override</source>
- <translation type="unfinished"></translation>
+ <translation>LRO (左横書き上書き開始指定)</translation>
</message>
<message>
<location line="+1"/>
<source>RLO Start of right-to-left override</source>
- <translation type="unfinished"></translation>
+ <translation>RLO (右横書き上書き開始指定)</translation>
</message>
<message>
<location line="+1"/>
<source>PDF Pop directional formatting</source>
- <translation type="unfinished"></translation>
+ <translation>PDF (方向上書きの終了指定)</translation>
</message>
<message>
<location line="+6"/>
@@ -5895,572 +7009,574 @@ Please choose a different file name.</source>
<message>
<location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp" line="+692"/>
<source>Request cancelled</source>
- <translation type="unfinished"></translation>
+ <translation>リクエストはキャンセルされました</translation>
</message>
<message>
<location line="+17"/>
<source>Request blocked</source>
- <translation type="unfinished"></translation>
+ <translation>リクエストはブロックされました</translation>
</message>
<message>
<location line="+7"/>
<source>Cannot show URL</source>
- <translation type="unfinished"></translation>
+ <translation>URL を表示できません</translation>
</message>
<message>
<location line="+6"/>
<source>Frame load interruped by policy change</source>
- <translation type="unfinished"></translation>
+ <translation>ポリシーの変更により、フレームのロードが中断しました</translation>
</message>
<message>
<location line="+6"/>
<source>Cannot show mimetype</source>
- <translation type="unfinished"></translation>
+ <translation>MIME Type を表示できません</translation>
</message>
<message>
<location line="+6"/>
<source>File does not exist</source>
- <translation type="unfinished"></translation>
+ <translation>ファイルが存在しません</translation>
</message>
</context>
<context>
<name>QWebPage</name>
<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 type="unfinished"></translation>
+ <translation>誤った HTTP のリクエストです</translation>
</message>
<message>
<location filename="../src/3rdparty/webkit/WebCore/platform/qt/Localizations.cpp" line="+42"/>
<source>Submit</source>
<comment>default label for Submit buttons in forms on web pages</comment>
- <translation type="unfinished"></translation>
+ <translation>送信</translation>
</message>
<message>
<location line="+5"/>
<source>Submit</source>
<comment>Submit (input element) alt text for &lt;input&gt; elements with no alt, title, or value</comment>
- <translation type="unfinished"></translation>
+ <translation>送信</translation>
</message>
<message>
<location line="+5"/>
<source>Reset</source>
<comment>default label for Reset buttons in forms on web pages</comment>
- <translation type="unfinished">リセット</translation>
+ <translation>リセット</translation>
</message>
<message>
<location line="+10"/>
<source>This is a searchable index. Enter search keywords: </source>
<comment>text that appears at the start of nearly-obsolete web pages in the form of a &apos;searchable index&apos;</comment>
- <translation type="unfinished"></translation>
+ <translation>検索が可能です。検索のためのキーワードを入力してください: </translation>
</message>
<message>
<location line="+5"/>
<source>Choose File</source>
<comment>title for file button used in HTML forms</comment>
- <translation type="unfinished"></translation>
+ <translation>ファイルを選ぶ</translation>
</message>
<message>
<location line="+5"/>
<source>No file selected</source>
<comment>text to display in file button used in HTML forms when no file is selected</comment>
- <translation type="unfinished"></translation>
+ <translation>ファイルが選択されていません</translation>
</message>
<message>
<location line="+5"/>
<source>Open in New Window</source>
<comment>Open in New Window context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>新しいウィンドウで開く</translation>
</message>
<message>
<location line="+5"/>
<source>Save Link...</source>
<comment>Download Linked File context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>リンク先を保存...</translation>
</message>
<message>
<location line="+5"/>
<source>Copy Link</source>
<comment>Copy Link context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>リンク先をコピー</translation>
</message>
<message>
<location line="+5"/>
<source>Open Image</source>
<comment>Open Image in New Window context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>イメージを開く</translation>
</message>
<message>
<location line="+5"/>
<source>Save Image</source>
<comment>Download Image context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>画像を保存</translation>
</message>
<message>
<location line="+5"/>
<source>Copy Image</source>
<comment>Copy Link context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>画像をコピー</translation>
</message>
<message>
<location line="+5"/>
<source>Open Frame</source>
<comment>Open Frame in New Window context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>フレームを新しいウィンドウで開く</translation>
</message>
<message>
<location line="+5"/>
<source>Copy</source>
<comment>Copy context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>コピー</translation>
</message>
<message>
<location line="+5"/>
<source>Go Back</source>
<comment>Back context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>戻る</translation>
</message>
<message>
<location line="+5"/>
<source>Go Forward</source>
<comment>Forward context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>進む</translation>
</message>
<message>
<location line="+5"/>
<source>Stop</source>
<comment>Stop context menu item</comment>
- <translation type="unfinished">停止</translation>
+ <translation>停止</translation>
</message>
<message>
<location line="+5"/>
<source>Reload</source>
<comment>Reload context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>リロード</translation>
</message>
<message>
<location line="+5"/>
<source>Cut</source>
<comment>Cut context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>切り取り</translation>
</message>
<message>
<location line="+5"/>
<source>Paste</source>
<comment>Paste context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>貼り付け</translation>
</message>
<message>
<location line="+5"/>
<source>No Guesses Found</source>
<comment>No Guesses Found context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>推測候補はありません</translation>
</message>
<message>
<location line="+5"/>
<source>Ignore</source>
<comment>Ignore Spelling context menu item</comment>
- <translation type="unfinished">無視</translation>
+ <translation>無視</translation>
</message>
<message>
<location line="+5"/>
<source>Add To Dictionary</source>
<comment>Learn Spelling context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>辞書に追加</translation>
</message>
<message>
<location line="+5"/>
<source>Search The Web</source>
<comment>Search The Web context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>Web を検索</translation>
</message>
<message>
<location line="+5"/>
<source>Look Up In Dictionary</source>
<comment>Look Up in Dictionary context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>辞書から探す</translation>
</message>
<message>
<location line="+5"/>
<source>Open Link</source>
<comment>Open Link context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>リンクを開く</translation>
</message>
<message>
<location line="+5"/>
<source>Ignore</source>
<comment>Ignore Grammar context menu item</comment>
- <translation type="unfinished">無視</translation>
+ <translation>無視</translation>
</message>
<message>
<location line="+5"/>
<source>Spelling</source>
<comment>Spelling and Grammar context sub-menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>スペル</translation>
</message>
<message>
<location line="+5"/>
<source>Show Spelling and Grammar</source>
<comment>menu item title</comment>
- <translation type="unfinished"></translation>
+ <translation>スペルと文法を表示</translation>
</message>
<message>
<location line="+1"/>
<source>Hide Spelling and Grammar</source>
<comment>menu item title</comment>
- <translation type="unfinished"></translation>
+ <translation>スペルと文法を隠す</translation>
</message>
<message>
<location line="+5"/>
<source>Check Spelling</source>
<comment>Check spelling context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>スペルをチェックする</translation>
</message>
<message>
<location line="+5"/>
<source>Check Spelling While Typing</source>
<comment>Check spelling while typing context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>入力中にスペルをチェックする</translation>
</message>
<message>
<location line="+5"/>
<source>Check Grammar With Spelling</source>
<comment>Check grammar with spelling context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>スペルおよび文法をチェックする</translation>
</message>
<message>
<location line="+5"/>
<source>Fonts</source>
<comment>Font context sub-menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>フォント</translation>
</message>
<message>
<location line="+5"/>
<source>Bold</source>
<comment>Bold context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>太字</translation>
</message>
<message>
<location line="+5"/>
<source>Italic</source>
<comment>Italic context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>イタリック</translation>
</message>
<message>
<location line="+5"/>
<source>Underline</source>
<comment>Underline context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>下線</translation>
</message>
<message>
<location line="+5"/>
<source>Outline</source>
<comment>Outline context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>アウトライン</translation>
</message>
<message>
<location line="+5"/>
<source>Direction</source>
<comment>Writing direction context sub-menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>方向</translation>
</message>
<message>
<location line="+5"/>
<source>Text Direction</source>
<comment>Text direction context sub-menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>テキストの方向</translation>
</message>
<message>
<location line="+5"/>
<source>Default</source>
<comment>Default writing direction context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>デフォルト</translation>
</message>
<message>
<location line="+5"/>
<source>LTR</source>
<comment>Left to Right context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>左横書き</translation>
</message>
<message>
<location line="+5"/>
<source>RTL</source>
<comment>Right to Left context menu item</comment>
- <translation type="unfinished"></translation>
+ <translation>右横書き</translation>
</message>
<message>
<location line="+5"/>
<source>Inspect</source>
<comment>Inspect Element context menu item</comment>
- <translation type="unfinished"></translation>
+ <translatorcomment>?</translatorcomment>
+ <translation>検査</translation>
</message>
<message>
<location line="+5"/>
<source>No recent searches</source>
<comment>Label for only item in menu that appears when clicking on the search field image, when no searches have been performed</comment>
- <translation type="unfinished"></translation>
+ <translation>検索の履歴はありません</translation>
</message>
<message>
<location line="+5"/>
<source>Recent searches</source>
<comment>label for first item in the menu that appears when clicking on the search field image, used as embedded menu title</comment>
- <translation type="unfinished"></translation>
+ <translation>検索の履歴</translation>
</message>
<message>
<location line="+5"/>
<source>Clear recent searches</source>
<comment>menu item in Recent Searches menu that empties menu&apos;s contents</comment>
- <translation type="unfinished"></translation>
+ <translation>検索の履歴をクリア</translation>
</message>
<message>
<location line="+75"/>
<source>Unknown</source>
<comment>Unknown filesize FTP directory listing item</comment>
- <translation type="unfinished">不明</translation>
+ <translation>不明</translation>
</message>
<message>
<location line="+5"/>
<source>%1 (%2x%3 pixels)</source>
<comment>Title string for images</comment>
- <translation type="unfinished"></translation>
+ <translation>%1 (%2x%3 ピクセル)</translation>
</message>
<message>
<location filename="../src/3rdparty/webkit/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp" line="+185"/>
<source>Web Inspector - %2</source>
- <translation type="unfinished"></translation>
+ <translation>Web の検査 - %2</translation>
</message>
<message>
<location filename="../src/3rdparty/webkit/WebCore/platform/qt/ScrollbarQt.cpp" line="+58"/>
<source>Scroll here</source>
- <translation type="unfinished">ここにスクロール</translation>
+ <translation>ここにスクロール</translation>
</message>
<message>
<location line="+3"/>
<source>Left edge</source>
- <translation type="unfinished">左端</translation>
+ <translation>左端</translation>
</message>
<message>
<location line="+0"/>
<source>Top</source>
- <translation type="unfinished">上端</translation>
+ <translation>上端</translation>
</message>
<message>
<location line="+1"/>
<source>Right edge</source>
- <translation type="unfinished">右端</translation>
+ <translation>右端</translation>
</message>
<message>
<location line="+0"/>
<source>Bottom</source>
- <translation type="unfinished">下端</translation>
+ <translation>下端</translation>
</message>
<message>
<location line="+3"/>
<source>Page left</source>
- <translation type="unfinished">1ページ左へスクロール</translation>
+ <translation>1ページ左へスクロール</translation>
</message>
<message>
<location line="+0"/>
<source>Page up</source>
- <translation type="unfinished">1ページ戻る</translation>
+ <translation>1ページ戻る</translation>
</message>
<message>
<location line="+1"/>
<source>Page right</source>
- <translation type="unfinished"></translation>
+ <translation>1ページ右へスクロール</translation>
</message>
<message>
<location line="+0"/>
<source>Page down</source>
- <translation type="unfinished">1ページ進む</translation>
+ <translation>1ページ進む</translation>
</message>
<message>
<location line="+3"/>
<source>Scroll left</source>
- <translation type="unfinished">左へスクロール</translation>
+ <translation>左へスクロール</translation>
</message>
<message>
<location line="+0"/>
<source>Scroll up</source>
- <translation type="unfinished">上へスクロール</translation>
+ <translation>上へスクロール</translation>
</message>
<message>
<location line="+1"/>
<source>Scroll right</source>
- <translation type="unfinished">右へスクロール</translation>
+ <translation>右へスクロール</translation>
</message>
<message>
<location line="+0"/>
<source>Scroll down</source>
- <translation type="unfinished">下へスクロール</translation>
+ <translation>下へスクロール</translation>
</message>
<message numerus="yes">
<location filename="../src/3rdparty/webkit/WebCore/platform/qt/FileChooserQt.cpp" line="+45"/>
<source>%n file(s)</source>
<comment>number of chosen file</comment>
- <translation type="unfinished">
- <numerusform></numerusform>
+ <translation>
+ <numerusform>%n 個のファイル</numerusform>
</translation>
</message>
<message>
<location filename="../src/3rdparty/webkit/WebKit/qt/Api/qwebpage.cpp" line="+1322"/>
<source>JavaScript Alert - %1</source>
- <translation type="unfinished"></translation>
+ <translation>JavaScript アラート - %1</translation>
</message>
<message>
<location line="+15"/>
<source>JavaScript Confirm - %1</source>
- <translation type="unfinished"></translation>
+ <translation>JavaScript 確認 - %1</translation>
</message>
<message>
<location line="+17"/>
<source>JavaScript Prompt - %1</source>
- <translation type="unfinished"></translation>
+ <translation>JavaScript 質問 - %1</translation>
</message>
<message>
- <location line="+333"/>
+ <location line="+340"/>
<source>Move the cursor to the next character</source>
- <translation type="unfinished"></translation>
+ <translation>次の文字へカーソルを移動</translation>
</message>
<message>
<location line="+3"/>
<source>Move the cursor to the previous character</source>
- <translation type="unfinished"></translation>
+ <translation>前の文字にカーソルを移動</translation>
</message>
<message>
<location line="+3"/>
<source>Move the cursor to the next word</source>
- <translation type="unfinished"></translation>
+ <translation>次の単語にカーソルを移動</translation>
</message>
<message>
<location line="+3"/>
<source>Move the cursor to the previous word</source>
- <translation type="unfinished"></translation>
+ <translation>前の単語にカーソルを移動</translation>
</message>
<message>
<location line="+3"/>
<source>Move the cursor to the next line</source>
- <translation type="unfinished"></translation>
+ <translation>次の行にカーソルを移動</translation>
</message>
<message>
<location line="+3"/>
<source>Move the cursor to the previous line</source>
- <translation type="unfinished"></translation>
+ <translation>前の行にカーソルを移動</translation>
</message>
<message>
<location line="+3"/>
<source>Move the cursor to the start of the line</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>文なのか行なのか</translatorcomment>
+ <translation>文頭にカーソルを移動</translation>
</message>
<message>
<location line="+3"/>
<source>Move the cursor to the end of the line</source>
- <translation type="unfinished"></translation>
+ <translation>文末にカーソルを移動</translation>
</message>
<message>
<location line="+3"/>
<source>Move the cursor to the start of the block</source>
- <translation type="unfinished"></translation>
+ <translation>ブロックの先頭にカーソルを移動</translation>
</message>
<message>
<location line="+3"/>
<source>Move the cursor to the end of the block</source>
- <translation type="unfinished"></translation>
+ <translation>ブロックの末尾にカーソルを移動</translation>
</message>
<message>
<location line="+3"/>
<source>Move the cursor to the start of the document</source>
- <translation type="unfinished"></translation>
+ <translation>文章の先頭にカーソルを移動</translation>
</message>
<message>
<location line="+3"/>
<source>Move the cursor to the end of the document</source>
- <translation type="unfinished"></translation>
+ <translation>文章の末尾にカーソルを移動</translation>
</message>
<message>
<location line="+3"/>
<source>Select all</source>
- <translation type="unfinished"></translation>
+ <translation>すべてを選択</translation>
</message>
<message>
<location line="+3"/>
<source>Select to the next character</source>
- <translation type="unfinished"></translation>
+ <translation>次の文字を選択</translation>
</message>
<message>
<location line="+3"/>
<source>Select to the previous character</source>
- <translation type="unfinished"></translation>
+ <translation>前の文字を選択</translation>
</message>
<message>
<location line="+3"/>
<source>Select to the next word</source>
- <translation type="unfinished"></translation>
+ <translation>次の単語を選択</translation>
</message>
<message>
<location line="+3"/>
<source>Select to the previous word</source>
- <translation type="unfinished"></translation>
+ <translation>前の単語を選択</translation>
</message>
<message>
<location line="+3"/>
<source>Select to the next line</source>
- <translation type="unfinished"></translation>
+ <translation>次の行を選択</translation>
</message>
<message>
<location line="+3"/>
<source>Select to the previous line</source>
- <translation type="unfinished"></translation>
+ <translation>前の行を選択</translation>
</message>
<message>
<location line="+3"/>
<source>Select to the start of the line</source>
- <translation type="unfinished"></translation>
+ <translation>文頭から選択</translation>
</message>
<message>
<location line="+3"/>
<source>Select to the end of the line</source>
- <translation type="unfinished"></translation>
+ <translation>文末まで選択</translation>
</message>
<message>
<location line="+3"/>
<source>Select to the start of the block</source>
- <translation type="unfinished"></translation>
+ <translation>ブロックの先頭から選択</translation>
</message>
<message>
<location line="+3"/>
<source>Select to the end of the block</source>
- <translation type="unfinished"></translation>
+ <translation>ブロックの末尾まで選択</translation>
</message>
<message>
<location line="+3"/>
<source>Select to the start of the document</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントの先頭から選択</translation>
</message>
<message>
<location line="+3"/>
<source>Select to the end of the document</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントの末尾まで選択</translation>
</message>
<message>
<location line="+3"/>
<source>Delete to the start of the word</source>
- <translation type="unfinished"></translation>
+ <translation>単語の先頭まで削除</translation>
</message>
<message>
<location line="+3"/>
<source>Delete to the end of the word</source>
- <translation type="unfinished"></translation>
+ <translation>単語の末尾まで削除</translation>
</message>
<message>
<location line="+33"/>
<source>Insert a new paragraph</source>
- <translation type="unfinished"></translation>
+ <translation>新しい段落を挿入</translation>
</message>
<message>
<location line="+3"/>
<source>Insert a new line</source>
- <translation type="unfinished"></translation>
+ <translation>新しい行を挿入</translation>
</message>
</context>
<context>
@@ -6468,13 +7584,13 @@ Please choose a different file name.</source>
<message>
<location filename="../src/gui/kernel/qwhatsthis.cpp" line="+522"/>
<source>What&apos;s This?</source>
- <translation>ヒント</translation>
+ <translation>ヒント?</translation>
</message>
</context>
<context>
<name>QWidget</name>
<message>
- <location filename="../src/gui/kernel/qwidget.cpp" line="+5326"/>
+ <location filename="../src/gui/kernel/qwidget.cpp" line="+5288"/>
<source>*</source>
<translation>*</translation>
</message>
@@ -6484,57 +7600,57 @@ Please choose a different file name.</source>
<message>
<location filename="../src/gui/dialogs/qwizard.cpp" line="+637"/>
<source>Go Back</source>
- <translation type="unfinished"></translation>
+ <translation>戻る</translation>
</message>
<message>
<location line="+3"/>
<source>Continue</source>
- <translation type="unfinished"></translation>
+ <translation>続き</translation>
</message>
<message>
<location line="+5"/>
<source>Commit</source>
- <translation type="unfinished"></translation>
+ <translation>適用</translation>
</message>
<message>
<location line="+2"/>
<source>Done</source>
- <translation type="unfinished"></translation>
+ <translation>終了</translation>
</message>
<message>
<location line="+4"/>
<source>Help</source>
- <translation type="unfinished">ヘルプ</translation>
+ <translation>ヘルプ</translation>
</message>
<message>
<location line="-14"/>
<source>&lt; &amp;Back</source>
- <translation type="unfinished">&lt; 戻る(&amp;B)</translation>
+ <translation>&lt; 戻る(&amp;B)</translation>
</message>
<message>
<location line="+10"/>
<source>&amp;Finish</source>
- <translation type="unfinished">完了(&amp;F)</translation>
+ <translation>完了(&amp;F)</translation>
</message>
<message>
<location line="+2"/>
<source>Cancel</source>
- <translation type="unfinished">キャンセル</translation>
+ <translation>キャンセル</translation>
</message>
<message>
<location line="+2"/>
<source>&amp;Help</source>
- <translation type="unfinished">ヘルプ(&amp;H)</translation>
+ <translation>ヘルプ(&amp;H)</translation>
</message>
<message>
<location line="-8"/>
<source>&amp;Next</source>
- <translation type="unfinished"></translation>
+ <translation>次へ(&amp;N)</translation>
</message>
<message>
<location line="+0"/>
<source>&amp;Next &gt;</source>
- <translation type="unfinished">次へ(&amp;N) &gt;</translation>
+ <translation>次へ(&amp;N) &gt;</translation>
</message>
</context>
<context>
@@ -6729,145 +7845,148 @@ Please choose a different file name.</source>
<name>QXmlStream</name>
<message>
<location filename="../src/corelib/xml/qxmlstream.cpp" line="+592"/>
- <location filename="../src/corelib/xml/qxmlstream_p.h" line="+1769"/>
+ <location filename="../src/corelib/xml/qxmlstream_p.h" line="+1770"/>
<source>Extra content at end of document.</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントの末尾に余計なものがついています。</translation>
</message>
<message>
<location line="+222"/>
<source>Invalid entity value.</source>
- <translation type="unfinished"></translation>
+ <translation>エンティティの値が無効です。</translation>
</message>
<message>
<location line="+107"/>
<source>Invalid XML character.</source>
- <translation type="unfinished"></translation>
+ <translation>無効な XML 文字です。</translation>
</message>
<message>
<location line="+259"/>
<source>Sequence &apos;]]&gt;&apos; not allowed in content.</source>
- <translation type="unfinished"></translation>
+ <translation>このコンテキストでは、&apos;]]&gt;&apos; は許可されていません。</translation>
</message>
<message>
<location line="+279"/>
<location filename="../src/corelib/xml/qxmlstream_p.h" line="-691"/>
<source>Encountered incorrectly encoded content.</source>
- <translation type="unfinished"></translation>
+ <translation>正しくないエンコードの文脈に遭遇しました。</translation>
</message>
<message>
<location line="+30"/>
<source>Namespace prefix &apos;%1&apos; not declared</source>
- <translation type="unfinished"></translation>
+ <translation>名前空間のブリフィックス &apos;%1&apos; は宣言されていません</translation>
</message>
<message>
<location line="+78"/>
<source>Attribute redefined.</source>
- <translation type="unfinished"></translation>
+ <translation>属性が再度指定されています。</translation>
</message>
<message>
<location line="+115"/>
<source>Unexpected character &apos;%1&apos; in public id literal.</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>DTD宣言の部分</translatorcomment>
+ <translation>公開 ID 指定に使用できない文字 &apos;%1&apos; が使用されています。</translation>
</message>
<message>
<location line="+28"/>
<source>Invalid XML version string.</source>
- <translation type="unfinished"></translation>
+ <translation>無効な XML バージョン指定です。</translation>
</message>
<message>
<location line="+2"/>
<source>Unsupported XML version.</source>
- <translation type="unfinished"></translation>
+ <translation>この XML のバージョンはサポートされていません。</translation>
</message>
<message>
<location line="+21"/>
<source>The standalone pseudo attribute must appear after the encoding.</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>&amp;ddd; は、エンコーディングを指定していないと使えないということかな。utf8だとおもうけど。</translatorcomment>
+ <translation>仮想属性指定は、エンコーディング指定の後にのみ使用できます。</translation>
</message>
<message>
<location line="+2"/>
<source>%1 is an invalid encoding name.</source>
- <translation type="unfinished"></translation>
+ <translation>%1 は無効なエンコーディングの名前です。</translation>
</message>
<message>
<location line="+7"/>
<source>Encoding %1 is unsupported</source>
- <translation type="unfinished"></translation>
+ <translation>エンコーディング &apos;%1&apos; はサポートされていません</translation>
</message>
<message>
<location line="+16"/>
<source>Standalone accepts only yes or no.</source>
- <translation type="unfinished"></translation>
+ <translation>standalone の指定は yes または no のみ指定できます。</translation>
</message>
<message>
<location line="+2"/>
<source>Invalid attribute in XML declaration.</source>
- <translation type="unfinished"></translation>
+ <translation>XML 宣言に無効な属性がついています。</translation>
</message>
<message>
<location line="+16"/>
<source>Premature end of document.</source>
- <translation type="unfinished"></translation>
+ <translation>ドキュメントが途中で終わっています。</translation>
</message>
<message>
<location line="+2"/>
<source>Invalid document.</source>
- <translation type="unfinished"></translation>
+ <translation>無効なドキュメントです。</translation>
</message>
<message>
<location line="+40"/>
<source>Expected </source>
- <translation type="unfinished"></translation>
+ <translation>予期していた表現は、</translation>
</message>
<message>
<location line="+11"/>
<source>, but got &apos;</source>
- <translation type="unfinished"></translation>
+ <translation>ですが、取得した表現は以下のものでした &apos;</translation>
</message>
<message>
<location line="+4"/>
<source>Unexpected &apos;</source>
- <translation type="unfinished"></translation>
+ <translation>予期していなかった表現 &apos;</translation>
</message>
<message>
<location line="+210"/>
<source>Expected character data.</source>
- <translation type="unfinished"></translation>
+ <translation>予期していた文字列。</translation>
</message>
<message>
<location filename="../src/corelib/xml/qxmlstream_p.h" line="-304"/>
<source>Recursive entity detected.</source>
- <translation type="unfinished"></translation>
+ <translation>再帰しているエンティティを発見しました。</translation>
</message>
<message>
<location line="+516"/>
<source>Start tag expected.</source>
- <translation type="unfinished"></translation>
+ <translation>開始タグをよきしていましたが、みつかりません。</translation>
</message>
<message>
<location line="+191"/>
<source>NDATA in parameter entity declaration.</source>
- <translation type="unfinished"></translation>
+ <translation>パラメータエンティティの宣言において NDATA があります。</translation>
</message>
<message>
<location line="+31"/>
<source>XML declaration not at start of document.</source>
- <translation type="unfinished"></translation>
+ <translation>XML 宣言がドキュメントの先頭にありません。</translation>
</message>
<message>
<location line="+3"/>
<source>%1 is an invalid processing instruction name.</source>
- <translation type="unfinished"></translation>
+ <translatorcomment>XMLにそんなのあったっけ?</translatorcomment>
+ <translation>%1 は無効な処理指定の名前です。</translation>
</message>
<message>
<location line="+11"/>
<source>Invalid processing instruction name.</source>
- <translation type="unfinished"></translation>
+ <translation>無効な処理命令です。</translation>
</message>
<message>
<location line="+114"/>
<source>%1 is an invalid PUBLIC identifier.</source>
- <translation type="unfinished"></translation>
+ <translation>%1 は、公開 (PUBLIC) 識別子として無効です。</translation>
</message>
<message>
<location filename="../src/corelib/xml/qxmlstream.cpp" line="-521"/>
@@ -6875,1092 +7994,39 @@ Please choose a different file name.</source>
<location filename="../src/corelib/xml/qxmlstream_p.h" line="+50"/>
<location line="+53"/>
<source>Illegal namespace declaration.</source>
- <translation type="unfinished"></translation>
+ <translation>無効な名前空間の指定です。</translation>
</message>
<message>
<location filename="../src/corelib/xml/qxmlstream_p.h" line="+15"/>
<source>Invalid XML name.</source>
- <translation type="unfinished"></translation>
+ <translation>無効な XML 名です。</translation>
</message>
<message>
<location line="+23"/>
<source>Opening and ending tag mismatch.</source>
- <translation type="unfinished"></translation>
+ <translation>開始タグと、終了タグがマッチしません。</translation>
</message>
<message>
<location line="+18"/>
<source>Reference to unparsed entity &apos;%1&apos;.</source>
- <translation type="unfinished"></translation>
+ <translation>まだパースしていないエンティティ &apos;%1&apos; を参照しています。</translation>
</message>
<message>
<location line="-13"/>
<location line="+61"/>
<location line="+40"/>
<source>Entity &apos;%1&apos; not declared.</source>
- <translation type="unfinished"></translation>
+ <translation>エンティティ &apos;%1&apos; は宣言されていません。</translation>
</message>
<message>
<location line="-26"/>
<source>Reference to external entity &apos;%1&apos; in attribute value.</source>
- <translation type="unfinished"></translation>
+ <translation>属性値として、外部エンティティ &apos;%1&apos; を再度指定しています。</translation>
</message>
<message>
<location line="+40"/>
<source>Invalid character reference.</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>QtXmlPatterns</name>
- <message>
- <location filename="../src/xmlpatterns/acceltree/qacceltreebuilder.cpp" line="+205"/>
- <source>An %1-attribute with value %2 has already been declared.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+13"/>
- <source>An %1-attribute must have a valid %2 as value, which %3 isn&apos;t.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/api/qiodevicedelegate.cpp" line="+84"/>
- <source>Network timeout.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/api/qxmlserializer.cpp" line="+320"/>
- <source>Element %1 can&apos;t be serialized because it appears outside the document element.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+60"/>
- <source>Attribute %1 can&apos;t be serialized because it appears at the top level.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/data/qabstractdatetime.cpp" line="+80"/>
- <source>Year %1 is invalid because it begins with %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+19"/>
- <source>Day %1 is outside the range %2..%3.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Month %1 is outside the range %2..%3.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+10"/>
- <source>Overflow: Can&apos;t represent date %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Day %1 is invalid for month %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+49"/>
- <source>Time 24:%1:%2.%3 is invalid. Hour is 24, but minutes, seconds, and milliseconds are not all 0; </source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+13"/>
- <source>Time %1:%2:%3.%4 is invalid.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+115"/>
- <source>Overflow: Date can&apos;t be represented.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/data/qabstractduration.cpp" line="+99"/>
- <location line="+15"/>
- <source>At least one component must be present.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-7"/>
- <source>At least one time component must appear after the %1-delimiter.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/data/qabstractfloatmathematician.cpp" line="+64"/>
- <source>No operand in an integer division, %1, can be %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+7"/>
- <source>The first operand in an integer division, %1, cannot be infinity (%2).</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+6"/>
- <source>The second operand in a division, %1, cannot be zero (%2).</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/data/qanyuri_p.h" line="+132"/>
- <source>%1 is not a valid value of type %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/data/qatomiccasters_p.h" line="+223"/>
- <source>When casting to %1 from %2, the source value cannot be %3.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/data/qatomicmathematicians.cpp" line="+65"/>
- <source>Integer division (%1) by zero (%2) is undefined.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Division (%1) by zero (%2) is undefined.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Modulus division (%1) by zero (%2) is undefined.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+122"/>
- <location line="+32"/>
- <source>Dividing a value of type %1 by %2 (not-a-number) is not allowed.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-20"/>
- <source>Dividing a value of type %1 by %2 or %3 (plus or minus zero) is not allowed.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+32"/>
- <source>Multiplication of a value of type %1 by %2 or %3 (plus or minus infinity) is not allowed.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/data/qatomicvalue.cpp" line="+79"/>
- <source>A value of type %1 cannot have an Effective Boolean Value.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/data/qboolean.cpp" line="+78"/>
- <source>Effective Boolean Value cannot be calculated for a sequence containing two or more atomic values.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/data/qderivedinteger_p.h" line="+402"/>
- <source>Value %1 of type %2 exceeds maximum (%3).</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Value %1 of type %2 is below minimum (%3).</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/data/qhexbinary.cpp" line="+91"/>
- <source>A value of type %1 must contain an even number of digits. The value %2 does not.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+19"/>
- <source>%1 is not valid as a value of type %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qarithmeticexpression.cpp" line="+207"/>
- <source>Operator %1 cannot be used on type %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+17"/>
- <source>Operator %1 cannot be used on atomic values of type %2 and %3.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qattributenamevalidator.cpp" line="+66"/>
- <source>The namespace URI in the name for a computed attribute cannot be %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The name for a computed attribute cannot have the namespace URI %1 with the local name %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qcastas.cpp" line="+88"/>
- <source>Type error in cast, expected %1, received %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+29"/>
- <source>When casting to %1 or types derived from it, the source value must be of the same type, or it must be a string literal. Type %2 is not allowed.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qcastingplatform.cpp" line="+134"/>
- <source>No casting is possible with %1 as the target type.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+15"/>
- <source>It is not possible to cast from %1 to %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+27"/>
- <source>Casting to %1 is not possible because it is an abstract type, and can therefore never be instantiated.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+23"/>
- <source>It&apos;s not possible to cast the value %1 of type %2 to %3</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Failure when casting from %1 to %2: %3</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qcommentconstructor.cpp" line="+67"/>
- <source>A comment cannot contain %1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+6"/>
- <source>A comment cannot end with a %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qcomparisonplatform.cpp" line="+167"/>
- <source>No comparisons can be done involving the type %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+14"/>
- <source>Operator %1 is not available between atomic values of type %2 and %3.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qdocumentcontentvalidator.cpp" line="+86"/>
- <source>An attribute node cannot be a child of a document node. Therefore, the attribute %1 is out of place.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qexpressionfactory.cpp" line="+169"/>
- <source>A library module cannot be evaluated directly. It must be imported from a main module.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+40"/>
- <source>No template by name %1 exists.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qgenericpredicate.cpp" line="+106"/>
- <source>A value of type %1 cannot be a predicate. A predicate must have either a numeric type or an Effective Boolean Value type.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+32"/>
- <source>A positional predicate must evaluate to a single numeric value.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qncnameconstructor_p.h" line="+113"/>
- <source>The target name in a processing instruction cannot be %1 in any combination of upper and lower case. Therefore, is %2 invalid.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+24"/>
- <source>%1 is not a valid target name in a processing instruction. It must be a %2 value, e.g. %3.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qpath.cpp" line="+109"/>
- <source>The last step in a path must contain either nodes or atomic values. It cannot be a mixture between the two.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qprocessinginstructionconstructor.cpp" line="+84"/>
- <source>The data of a processing instruction cannot contain the string %1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qqnameconstructor.cpp" line="+82"/>
- <source>No namespace binding exists for the prefix %1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qqnameconstructor_p.h" line="+156"/>
- <source>No namespace binding exists for the prefix %1 in %2</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+12"/>
- <location filename="../src/xmlpatterns/functions/qqnamefns.cpp" line="+69"/>
- <source>%1 is an invalid %2</source>
- <translation type="unfinished"></translation>
- </message>
- <message numerus="yes">
- <location filename="../src/xmlpatterns/functions/qabstractfunctionfactory.cpp" line="+77"/>
- <source>%1 takes at most %n argument(s). %2 is therefore invalid.</source>
- <translation type="unfinished">
- <numerusform></numerusform>
- </translation>
- </message>
- <message numerus="yes">
- <location line="+11"/>
- <source>%1 requires at least %n argument(s). %2 is therefore invalid.</source>
- <translation type="unfinished">
- <numerusform></numerusform>
- </translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qaggregatefns.cpp" line="+120"/>
- <source>The first argument to %1 cannot be of type %2. It must be a numeric type, xs:yearMonthDuration or xs:dayTimeDuration.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+74"/>
- <source>The first argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+91"/>
- <source>The second argument to %1 cannot be of type %2. It must be of type %3, %4, or %5.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qassemblestringfns.cpp" line="+88"/>
- <source>%1 is not a valid XML 1.0 character.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qcomparingaggregator.cpp" line="+197"/>
- <source>The first argument to %1 cannot be of type %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qdatetimefn.cpp" line="+86"/>
- <source>If both values have zone offsets, they must have the same zone offset. %1 and %2 are not the same.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qerrorfn.cpp" line="+61"/>
- <source>%1 was called.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qpatternmatchingfns.cpp" line="+94"/>
- <source>%1 must be followed by %2 or %3, not at the end of the replacement string.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+39"/>
- <source>In the replacement string, %1 must be followed by at least one digit when not escaped.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+26"/>
- <source>In the replacement string, %1 can only be used to escape itself or %2, not %3</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qpatternplatform.cpp" line="+92"/>
- <source>%1 matches newline characters</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+4"/>
- <source>%1 and %2 match the start and end of a line.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Matches are case insensitive</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+4"/>
- <source>Whitespace characters are removed, except when they appear in character classes</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+99"/>
- <source>%1 is an invalid regular expression pattern: %2</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+30"/>
- <source>%1 is an invalid flag for regular expressions. Valid flags are:</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qqnamefns.cpp" line="+17"/>
- <source>If the first argument is the empty sequence or a zero-length string (no namespace), a prefix cannot be specified. Prefix %1 was specified.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qsequencefns.cpp" line="+347"/>
- <source>It will not be possible to retrieve %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qcontextnodechecker.cpp" line="+54"/>
- <source>The root node of the second argument to function %1 must be a document node. %2 is not a document node.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qsequencegeneratingfns.cpp" line="+279"/>
- <source>The default collection is undefined</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+13"/>
- <source>%1 cannot be retrieved</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qstringvaluefns.cpp" line="+252"/>
- <source>The normalization form %1 is unsupported. The supported forms are %2, %3, %4, and %5, and none, i.e. the empty string (no normalization).</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qtimezonefns.cpp" line="+87"/>
- <source>A zone offset must be in the range %1..%2 inclusive. %3 is out of range.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+12"/>
- <source>%1 is not a whole number of minutes.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/janitors/qcardinalityverifier.cpp" line="+58"/>
- <source>Required cardinality is %1; got cardinality %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/janitors/qitemverifier.cpp" line="+67"/>
- <source>The item %1 did not match the required type %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/parser/qquerytransformparser.cpp" line="+379"/>
- <location line="+7253"/>
- <source>%1 is an unknown schema type.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-6971"/>
- <source>Only one %1 declaration can occur in the query prolog.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+188"/>
- <source>The initialization of variable %1 depends on itself</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+63"/>
- <source>No variable by name %1 exists</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/parser/qparsercontext.cpp" line="+93"/>
- <source>The variable %1 is unused</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/parser/qquerytransformparser.cpp" line="+2841"/>
- <source>Version %1 is not supported. The supported XQuery version is 1.0.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+16"/>
- <source>The encoding %1 is invalid. It must contain Latin characters only, must not contain whitespace, and must match the regular expression %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+55"/>
- <source>No function with signature %1 is available</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+72"/>
- <location line="+10"/>
- <source>A default namespace declaration must occur before function, variable, and option declarations.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+10"/>
- <source>Namespace declarations must occur before function, variable, and option declarations.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+11"/>
- <source>Module imports must occur before function, variable, and option declarations.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+200"/>
- <source>It is not possible to redeclare prefix %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+18"/>
- <source>Prefix %1 is already declared in the prolog.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+95"/>
- <source>The name of an option must have a prefix. There is no default namespace for options.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+171"/>
- <source>The Schema Import feature is not supported, and therefore %1 declarations cannot occur.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+13"/>
- <source>The target namespace of a %1 cannot be empty.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>The module import feature is not supported</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+52"/>
- <source>No value is available for the external variable by name %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-4154"/>
- <source>A construct was encountered which only is allowed in XQuery.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+118"/>
- <source>A template by name %1 has already been declared.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+3581"/>
- <source>The keyword %1 cannot occur with any other mode name.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+29"/>
- <source>The value of attribute %1 must of type %2, which %3 isn&apos;t.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+75"/>
- <source>The prefix %1 can not be bound. By default, it is already bound to the namespace %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+312"/>
- <source>A variable by name %1 has already been declared.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+135"/>
- <source>A stylesheet function must have a prefixed name.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The namespace for a user defined function cannot be empty (try the predefined prefix %1 which exists for cases like this)</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+9"/>
- <source>The namespace %1 is reserved; therefore user defined functions may not use it. Try the predefined prefix %2, which exists for these cases.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+12"/>
- <source>The namespace of a user defined function in a library module must be equivalent to the module namespace. In other words, it should be %1 instead of %2</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+34"/>
- <source>A function already exists with the signature %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+23"/>
- <source>No external functions are supported. All supported functions can be used directly, without first declaring them as external</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+37"/>
- <source>An argument by name %1 has already been declared. Every argument name must be unique.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+179"/>
- <source>When function %1 is used for matching inside a pattern, the argument must be a variable reference or a string literal.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+11"/>
- <source>In an XSL-T pattern, the first argument to function %1 must be a string literal, when used for matching.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+14"/>
- <source>In an XSL-T pattern, the first argument to function %1 must be a literal or a variable reference, when used for matching.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+9"/>
- <source>In an XSL-T pattern, function %1 cannot have a third argument.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+10"/>
- <source>In an XSL-T pattern, only function %1 and %2, not %3, can be used for matching.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+63"/>
- <source>In an XSL-T pattern, axis %1 cannot be used, only axis %2 or %3 can.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+126"/>
- <source>%1 is an invalid template mode name.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+44"/>
- <source>The name of a variable bound in a for-expression must be different from the positional variable. Hence, the two variables named %1 collide.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+758"/>
- <source>The Schema Validation Feature is not supported. Hence, %1-expressions may not be used.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+39"/>
- <source>None of the pragma expressions are supported. Therefore, a fallback expression must be present</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+267"/>
- <source>Each name of a template parameter must be unique; %1 is duplicated.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+129"/>
- <source>The %1-axis is unsupported in XQuery</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+1150"/>
- <source>%1 is not a valid name for a processing-instruction.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-7029"/>
- <source>%1 is not a valid numeric literal.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+6165"/>
- <source>No function by name %1 is available.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+102"/>
- <source>The namespace URI cannot be the empty string when binding to a prefix, %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+7"/>
- <source>%1 is an invalid namespace URI.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+6"/>
- <source>It is not possible to bind to the prefix %1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Namespace %1 can only be bound to %2 (and it is, in either case, pre-declared).</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Prefix %1 can only be bound to %2 (and it is, in either case, pre-declared).</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+15"/>
- <source>Two namespace declaration attributes have the same name: %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+89"/>
- <source>The namespace URI must be a constant and cannot use enclosed expressions.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+16"/>
- <source>An attribute by name %1 has already appeared on this element.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+61"/>
- <source>A direct element constructor is not well-formed. %1 is ended with %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+458"/>
- <source>The name %1 does not refer to any schema type.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+10"/>
- <source>%1 is an complex type. Casting to complex types is not possible. However, casting to atomic types such as %2 works.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+9"/>
- <source>%1 is not an atomic type. Casting is only possible to atomic types.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+145"/>
- <location line="+71"/>
- <source>%1 is not in the in-scope attribute declarations. Note that the schema import feature is not supported.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+48"/>
- <source>The name of an extension expression must be in a namespace.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/type/qcardinality.cpp" line="+55"/>
- <source>empty</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+2"/>
- <source>zero or one</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+2"/>
- <source>exactly one</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+2"/>
- <source>one or more</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+2"/>
- <source>zero or more</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/type/qtypechecker.cpp" line="+63"/>
- <source>Required type is %1, but %2 was found.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+44"/>
- <source>Promoting %1 to %2 may cause loss of precision.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+49"/>
- <source>The focus is undefined.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/utils/qoutputvalidator.cpp" line="+86"/>
- <source>It&apos;s not possible to add attributes after any other kind of node.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+7"/>
- <source>An attribute by name %1 has already been created.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/utils/qxpathhelper_p.h" line="+120"/>
- <source>Only the Unicode Codepoint Collation is supported(%1). %2 is unsupported.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/acceltree/qacceltreeresourceloader.cpp" line="+314"/>
- <source>%1 is an unsupported encoding.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+16"/>
- <source>%1 contains octets which are disallowed in the requested encoding %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+18"/>
- <source>The codepoint %1, occurring in %2 using encoding %3, is an invalid XML character.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qapplytemplate.cpp" line="+119"/>
- <source>Ambiguous rule match.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qcomputednamespaceconstructor.cpp" line="+69"/>
- <source>In a namespace constructor, the value for a namespace cannot be an empty string.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+11"/>
- <source>The prefix must be a valid %1, which %2 is not.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+14"/>
- <source>The prefix %1 cannot be bound.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+10"/>
- <source>Only the prefix %1 can be bound to %2 and vice versa.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qevaluationcache.cpp" line="+117"/>
- <source>Circularity detected</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/expr/qtemplate.cpp" line="+145"/>
- <source>The parameter %1 is required, but no corresponding %2 is supplied.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="-71"/>
- <source>The parameter %1 is passed, but no corresponding %2 exists.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/functions/qunparsedtextfn.cpp" line="+65"/>
- <source>The URI cannot have a fragment</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/parser/qxslttokenizer.cpp" line="+519"/>
- <source>Element %1 is not allowed at this location.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Text nodes are not allowed at this location.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+20"/>
- <source>Parse error: %1</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+62"/>
- <source>The value of the XSL-T version attribute must be a value of type %1, which %2 isn&apos;t.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+20"/>
- <source>Running an XSL-T 1.0 stylesheet with a 2.0 processor.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+108"/>
- <source>Unknown XSL-T attribute %1.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+23"/>
- <source>Attribute %1 and %2 are mutually exclusive.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+166"/>
- <source>In a simplified stylesheet module, attribute %1 must be present.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+72"/>
- <source>If element %1 has no attribute %2, it cannot have attribute %3 or %4.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Element %1 must have at least one of the attributes %2 or %3.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+28"/>
- <source>At least one mode must be specified in the %1-attribute on element %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/parser/qmaintainingreader.cpp" line="+183"/>
- <source>Attribute %1 cannot appear on the element %2. Only the standard attributes can appear.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+6"/>
- <source>Attribute %1 cannot appear on the element %2. Only %3 is allowed, and the standard attributes.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>Attribute %1 cannot appear on the element %2. Allowed is %3, %4, and the standard attributes.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+9"/>
- <source>Attribute %1 cannot appear on the element %2. Allowed is %3, and the standard attributes.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+13"/>
- <source>XSL-T attributes on XSL-T elements must be in the null namespace, not in the XSL-T namespace which %1 is.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+12"/>
- <source>The attribute %1 must appear on element %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+8"/>
- <source>The element with local name %1 does not exist in XSL-T.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location filename="../src/xmlpatterns/parser/qxslttokenizer.cpp" line="+123"/>
- <source>Element %1 must come last.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+24"/>
- <source>At least one %1-element must occur before %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+7"/>
- <source>Only one %1-element can appear.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+31"/>
- <source>At least one %1-element must occur inside %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+58"/>
- <source>When attribute %1 is present on %2, a sequence constructor cannot be used.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+13"/>
- <source>Element %1 must have either a %2-attribute or a sequence constructor.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+125"/>
- <source>When a parameter is required, a default value cannot be supplied through a %1-attribute or a sequence constructor.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+270"/>
- <source>Element %1 cannot have children.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+434"/>
- <source>Element %1 cannot have a sequence constructor.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+86"/>
- <location line="+9"/>
- <source>The attribute %1 cannot appear on %2, when it is a child of %3.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+15"/>
- <source>A parameter in a function cannot be declared to be a tunnel.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+149"/>
- <source>This processor is not Schema-aware and therefore %1 cannot be used.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+57"/>
- <source>Top level stylesheet elements must be in a non-null namespace, which %1 isn&apos;t.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+48"/>
- <source>The value for attribute %1 on element %2 must either be %3 or %4, not %5.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+20"/>
- <source>Attribute %1 cannot have the value %2.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+58"/>
- <source>The attribute %1 can only appear on the first %2 element.</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+99"/>
- <source>At least one %1 element must appear as child of %2.</source>
- <translation type="unfinished"></translation>
- </message>
-</context>
-<context>
- <name>VolumeSlider</name>
- <message>
- <location filename="../src/3rdparty/phonon/phonon/volumeslider.cpp" line="+67"/>
- <source>Muted</source>
- <translation type="unfinished"></translation>
- </message>
- <message>
- <location line="+5"/>
- <location line="+15"/>
- <source>Volume: %1%</source>
- <translation type="unfinished"></translation>
+ <translation>無効な文字への参照です。</translation>
</message>
</context>
</TS>
diff --git a/util/webkit/mkdist-webkit b/util/webkit/mkdist-webkit
index 6e8add9..62264ec 100755
--- a/util/webkit/mkdist-webkit
+++ b/util/webkit/mkdist-webkit
@@ -188,7 +188,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 )"